Connection-Oriented Request-Response with Notifications

This is the messaging pattern traditionally used where connection-oriented messaging is used between the peers. The most common messaging procedure is Requst-Response (Req/Cfm/Rej) from client to server, but since the there is a connection, the server can also optionally send asynchronous notifications to the clients (Ind)​.

Websocket / HTTP

Once the connection is established, both the server and the client can send signals or messages to each other at any time, without a strict predefined order. This means that both sides have equal communication privileges, and they can initiate communication independently.

  • Connection Establishment: The WebSocket connection is established through an initial HTTP-based handshake.

  • Bidirectional Communication: Once the connection is established, both the client and the server can send messages or signals to each other independently and in real-time. There’s no strict sequence or predefined initiator.

  • Simultaneous Interaction: The client and server can exchange messages simultaneously, which is particularly useful for real-time updates, live data streams, and interactive applications.

  • The WebSocket Protocol: The official specification for the WebSocket protocol by the Internet Engineering Task Force (IETF).

  • MDN Web Docs - WebSocket: The Mozilla Developer Network (MDN) provides detailed documentation and tutorials on using WebSocket in web development.

  • WebSocket API Specification: The World Wide Web Consortium (W3C) provides an official specification for the WebSocket API, including methods, events, and examples.
  • HTTP Ptotocol: RFC 7231: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content

  • Encoding : json
    • JSON (JavaScript Object Notation) is a lightweight data interchange format that is commonly used for encoding data in web applications, including WebSocket communication. JSON provides a way to represent structured data in a human-readable and easily parseable format. It is widely used for data serialization and communication between client and server.
  • Stateful : The connection is maintained as long as both the client and the server keep it open. The state of the connection is maintained throughout the communication session. Both parties can send messages at any time, and the connection remains open until explicitly closed by either the client or the server. The server can keep track of the state of each connected client and maintain context between messages, allowing for more interactive and real-time applications.

Disk RAID

RAID : Redundant Array of Independent Disks

  • RAID
    • Multiple disks are used as one disk
    • Cost reduction + reliability improvement + performance improvement
  • Hardware RAID
    • Hardware manufacturer makes equipment with several hard disks and supplies itself
    • A bit more stable but expensive
  • Software RAID
    • Alternative to expensive hardware RAID
    • The method supported by the operating system
    • More secure data storage at low cost

RAID type

RAID type

  • Add hdd : Add simple volume, 1 hdd
  • Linear raid: At least 2 HDDs, 2 HDDs attached to use as 1, sequential data storage, 100% space utilization
  • raid 0: at least 2, simultaneous storage on all disks, 100% space utilization
    • RAID 0: A minimum of two hard disks are required, and all disks are simultaneously saved. It has 100% space efficiency and has fast performance. However, if one disk fails, all information becomes unavailable, so reliability is low.
  • raid 1 : mirroring - 1/2 space, low space efficiency, important data storage, high reliability.
    • RAID 1 : Also called mirroring method, the same data is stored equally on two or more hard disks. That is, the space efficiency is reduced by 1/2. Instead of reducing space efficiency, the same data is stored on other hard disks, so even if one device has a defect, it can be used without any problem. There is no difference in storage speed because the same information is input to different disks.
  • raid 5 : 3 or more hdd, 2 HDDs for data, 1 for storing parity values, good data stability, good space efficiency
    • RAID 5: By using a combination of the space efficiency of RAID 0 (100%) and the data stability of RAID 1, you can use Parity to recover defective data. However, if two or more disks fail, recovery is impossible even with parity.
    • Using the parity bit means that, for example, when there are disk 1, disk2, and disk3, if disk1 data is ‘0’ and disk2 data is ‘1’, disk3 has a parity bit by XORing 0 and 1 and returns a value of ‘1’. save
      • For reference, the XOR operation is (0 if equal, 1 if different)
  • raid 6 : improvement of raid5, 4 or more hdd, 2 parity, use of redundant parity information
    • RAID 6 : This is a further improvement of the RAID 5 method, and although the space efficiency is lower than that of RAID 5, the data is not damaged even if two disks fail at the same time.

Batch

  • Batch means:
    • a group of things or people that are dealt with at the same time
    • A group (processed in batches), that is, a group in which something is processed
  • Registering a batch is a program created to process various tasks at once.
    • (Resolved through a batch program rather than directly typing commands for a large number of tasks at a fixed time every day or periodically)
  • Executing this batch is done by the scheduler, not the developer.

Scheduler

  • What is Scheduler:
    • A program that executes a batch program at a certain period or at a specific time;
    • Linux has Crontab as a representative.

Cron

  • What is Cron?:
    • The cron command is used when you want to automatically perform a task at a specific time or at a specific time.
    • cron is a scheduling function that allows you to perform a specific task at a specific time.
    • It is not a concept unique to Linux, but a concept in many OSs.
    • The cron system has cron settings that are used by default in the system, and this is called system cron.
    • In addition, there is a user cron that root or general users use by directly setting their cron settings.
  • What is crontab:
    • The file that configures cron jobs is called crontab file.
    • The cron process reads the settings in the /etc/crontab file and performs tasks.
    • The crontab file is saved in a different location for each OS.
    • In general, BSD-based Linux is /var/spool/cron/ID

    • On Solaris, it is located in /var/spool/cron/crontabs/ID.
  • What is anacron?
    • It is located in /usr/sbin/anacron,
    • A program that works like a cron, and is a tool used to ensure that tasks are executed even when the server is stopped for a certain period of time.