KR20020046864A - Method of Managing Message Oueue - Google Patents
Method of Managing Message Oueue Download PDFInfo
- Publication number
- KR20020046864A KR20020046864A KR1020000077211A KR20000077211A KR20020046864A KR 20020046864 A KR20020046864 A KR 20020046864A KR 1020000077211 A KR1020000077211 A KR 1020000077211A KR 20000077211 A KR20000077211 A KR 20000077211A KR 20020046864 A KR20020046864 A KR 20020046864A
- Authority
- KR
- South Korea
- Prior art keywords
- message queue
- status
- message
- class
- data
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/163—Interprocessor communication
- G06F15/173—Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
- G06F15/17306—Intercommunication techniques
- G06F15/17331—Distributed shared memory [DSM], e.g. remote direct memory access [RDMA]
Abstract
Description
본 발명은 메시지 큐 처리 방법에 관한 것으로, 특히 유닉스 상에서 동작하는 프로세스 간 메시지 큐를 관리하도록 한 메시지 큐 처리 방법에 관한 것이다.The present invention relates to a message queue processing method, and more particularly, to a message queue processing method for managing an inter-process message queue running on Unix.
일반적으로, 유닉스의 자원인 메시지 큐는 운영 체제에서 제공해 주는 기능이기 때문에 메시지 큐가 프로세스에 가득차거나, 수신 프로세스가 메시지 큐의 수신이 가능한 상태인지를 판단할 수 없었다.In general, because Message Queuing, a UNIX resource, is a function provided by the operating system, it was not possible to determine whether a Message Queuing is full or if the receiving process is capable of receiving Message Queuing.
또한, 프로그램 동작 중에 메시지 큐 삭제와 같은 문제가 발생 시에 정상적인 관리가 이루어지지 않았고, 다대일 통신 처리시, 메시지 큐 별로 자원을 따로 관리해야 하는 불편함이 있었다.In addition, when a problem such as deleting a message queue occurs during a program operation, normal management is not performed, and when many-to-one communication processing is performed, it is inconvenient to separately manage resources for each message queue.
본 발명은 전술한 바와 같은 제반적인 문제점을 해결하기 위한 것으로, 그 목적은 객체 지향 기법을 통해 기본적인 메시지 큐를 처리하는 클래스를 상위 클래스로 생성하고 이를 상속받아 복수 개의 메시지 큐를 처리할 수 있는 클래스를 제공하는데 있다.The present invention is to solve the above-mentioned general problems, the object is to create a class that handles the basic message queue as an upper class through the object-oriented technique, the class that can process a plurality of message queues by inheriting it To provide.
또한, 공유 메모리(Shared Memory)를 사용하여 프로세스 상태를 저장하여, 송신 프로세스가 데이터 전송하기 전에 수신 프로세스 상태를 감시하는데 있다.In addition, by using the shared memory (Shared Memory) to store the process state, the transmission process monitors the reception process status before transmitting data.
또한, 클래스 내부에서 복수 개의 큐 자원을 자동으로 관리하는데 있다.It also manages multiple queue resources automatically within a class.
도1은 본 발명의 실시예에 따른 메시지 큐 처리 구조를 나타내 구성 블록도.1 is a block diagram illustrating a message queue processing structure according to an embodiment of the present invention.
도2는 본 발명의 실시예에 따른 메시지 큐 처리 방법에서 송신 프로세스의 동작을 구현한 순서도.Figure 2 is a flow chart implementing the operation of the transmission process in the message queue processing method according to an embodiment of the present invention.
도3은 본 발명의 실시예에 따른 메시지 처리 방법에서 수신 프로세스의 동작을 구현한 순서도.3 is a flowchart implementing the operation of a receiving process in a message processing method according to an embodiment of the present invention.
*도면의 주요 부분에 대한 부호의 설명** Description of the symbols for the main parts of the drawings *
10a-10n : 송신 프로세스10a-10n: sending process
20 : 메시지 큐 클래스20: message queue class
21a-21n : 공유 메모리21a-21n: shared memory
22a-22n : 메시지 큐22a-22n: Message queue
30a-30n : 수신 프로세스30a-30n: Receive process
상기한 바와 같은 목적을 달성하기 위한 본 발명의 메시지 큐 처리 방법은송신 프로세스에서 전송할 메시지 큐의 키를 선택하는 과정과; 상기 송신 프로세스가 공유 메모리에서 메시지 큐의 키에 대한 인덱스를 읽어오는 과정과; 전송할 데이터를 메시지 큐를 통해 수신 프로세스로 전송하는 과정을 포함하여 이루어진 것을 특징으로 한다.The message queue processing method of the present invention for achieving the above object comprises the steps of selecting a key of the message queue to be transmitted in the transmission process; The sending process reads an index of a key of a message queue from a shared memory; And transmitting the data to be transmitted to the receiving process through the message queue.
이하, 본 발명의 실시예를 첨부한 도면을 참조하여 상세하게 설명하면 다음과 같다.Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings.
본 발명의 실시예에 따른 메시지 큐 처리 구조는 도1에 나타낸 바와 같이, 송신 프로세스(10a-10n)과, 메시지 큐 클래스(20), 수신 프로세스(30a-30n)를 포함하여 이루어져 있다.As shown in Fig. 1, the message queue processing structure according to the embodiment of the present invention includes a transmission process 10a-10n, a message queue class 20, and a reception process 30a-30n.
해당 송신 프로세스(10a-10n)는 전송할 메시지 큐(22a-22n)의 키를 선택하여 공유 메모리(21a-21n)에서 데이터를 전송할 수신 프로세스(30a-30n)의 상태를 메시지 큐(21a-21n)의 키에 대한 인덱스를 통해 읽어온 후, 해당 메시지 큐 클래스(20)로 데이터를 전송하는 역할을 담당한다.The transmission process 10a-10n selects the keys of the message queues 22a-22n to be transmitted to indicate the state of the reception processes 30a-30n to which data is to be transferred from the shared memory 21a-21n to the message queues 21a-21n. After reading through the index of the key of the, it is responsible for transmitting data to the corresponding message queue class (20).
해당 수신 프로세스(30a-30n)는 송신 프로세스(10a-10n)로부터 전송된 메시지 큐(21a-21n)를 수신하며, 해당 메시지 큐(21a-21n)의 생성 시점을 읽기 전에 항상 메시지 큐(21a-21n)를 자동 생성한다.The receiving process 30a-30n receives the message queues 21a-21n transmitted from the sending process 10a-10n, and always reads the message queue 21a- before reading the creation time of the message queues 21a-21n. 21n) is automatically generated.
해당 메시지 큐 클래스(20)는 공유 메모리(21a-21n)와 메시지 큐(22a-22n)를 포함하여, 해당 메시지 큐(22a-22n)의 상태와 수신 프로세스(30a-30n)의 상태를 저장한다.The message queue class 20 includes the shared memories 21a-21n and the message queues 22a-22n to store the state of the message queues 22a-22n and the state of the receiving process 30a-30n. .
본 발명의 실시예에 따른 메시지 큐 처리는 객체 지향 기법을 통해 기본적인 메시지 큐 처리를 하는데, 이때, 객체 지향 개념을 가지는 OOPL(Object-Oriented Program Language :이하, "OOPL"이라 칭함) 사용이 증대되고 있는데, 해당 OOP(Object-Oriented Program : 이하, "OOP"라 칭함)는 실세계의 현상을 컴퓨터 상에서 객체로서 해결하기 위한 프로그램 기법이다. 여기서, 해당 객체는 실체(예컨대, 데이터)와 그 실체에 관련되는 동작(예컨대, 절차, 방법, 기능)을 모두 포함한다.Message queue processing according to an embodiment of the present invention performs a basic message queue processing through an object-oriented technique, in which the use of OOPL (Object-Oriented Program Language: OOPL) having an object-oriented concept is increased The OOP (Object-Oriented Program: hereinafter referred to as "OOP") is a program technique for solving real-world phenomena as objects on a computer. Here, the object includes both an entity (eg, data) and operations (eg, procedures, methods, and functions) related to the entity.
예를 들어, 기차역에서의 승차권 발매에 관해 살펴보면, 실체인 "손님"과 절차인 "승차권 주문"은 하나의 객체이고, 실체인 "역무원"과 절차인 "승차권 발매"도 하나의 객체이다. 어떤 과제를 처리하기 위하여 객체 간에는 메시지를 주고 받게 되는데, 메시지를 수신한 객체는 동작을 수행하게 된다.For example, referring to the ticket release at the train station, the entity "guest" and the procedure "order ticket" are one object, and the entity "staff officer" and procedure "ticket release" are also one object. In order to handle a task, a message is exchanged between objects, and the object receiving the message performs an action.
상술한 바와 같이, 해당 OOP는 실체와 동작을 객체로서 정의하고, 해당 객체 간의 메시지 교환에 주안점을 두고 정보 처리를 수행하게 되는데, 즉 객체 지향은 절차 중심 설계가 아니고 실체(예컨대, 데이터)를 중시하는 설계이다.As described above, the OOP defines objects and operations as objects, and performs information processing with a focus on message exchange between the objects, that is, object orientation is not a procedure-oriented design, but an object (e.g., data) is important. It is design to do.
또한, 해당 OOP의 다른 특징으로 공통의 성질을 가지는 객체는 객체 클래스(Class)로 정의되는데, 동일한 등급에 속하는 객체들은 해당 수신한 메시지에 대한 비슷한 동작을 수행한다.In addition, as another characteristic of the OOP, an object having a common property is defined as an object class, and objects belonging to the same class perform a similar operation on the received message.
상기한 바와 같은 객체 지향 기법을 바탕으로 한 본 발명의 실시예에 따른메시지 큐 처리 방법에서의 송신 프로세스의 동작은 도2의 순서도를 참고하여 설명하면 다음과 같다.The operation of the transmission process in the message queue processing method according to the embodiment of the present invention based on the object-oriented technique as described above will be described with reference to the flowchart of FIG.
먼저, 송신 프로세스(10a-10n)가 전송할 메시지 큐(22a-22n)의 키를 선택하면(단계 S21), 공유 메모리(21a-21n)에서 메시지 큐(22a-22n)의 키에 대한 인덱스를 읽어옴으로써(단계 S22), 공유 메모리(21a-21n)에 저장된 수신 프로세스(30a-30n)의 상태를 읽는다. 해당 결과로, 수신 프로세스(30a-30n)의 상태가 데이터를 수신할 수 있는 정상적인 상태 즉, 블록(Block) 상태가 아닌지를 판단하여(단계 S23), 수신 프로세스(30a-30n)가 데이터를 수신할 수 있는 정상 상태(예컨대, 블록 상태인 경우)가 아니라면 에러 처리를 하여 종료하고(단계 S24), 해당 수신 프로세스(30a-30n)가 데이터를 수신할 수 있는 정상 상태(예컨대, 블록 상태가 아닌 경우)라면 메시지 큐(22a-22n)로 데이터를 전송한다(단계 S25).First, when the transmission process 10a-10n selects the keys of the message queues 22a-22n to be transmitted (step S21), the indexes of the keys of the message queues 22a-22n are read from the shared memory 21a-21n. By turning (step S22), the state of the reception process 30a-30n stored in the shared memories 21a-21n is read. As a result, it is determined whether or not the state of the receiving process 30a-30n is a normal state that can receive data, that is, a block state (step S23), and the receiving process 30a-30n receives the data. If it is not a normal state (e.g., in a block state), an error process is terminated (step S24), and the normal state (e.g., not in a block state) in which the corresponding receiving process 30a-30n can receive data. If yes), data is sent to the message queues 22a-22n (step S25).
또한, 객체 지향 기법을 바탕으로 한 본 발명의 실시예에 따른 메시지 큐 처리 방법에서 수신 프로세스의 동작은 도3의 순서도를 참고하여 설명하면 다음과 같다.In addition, the operation of the reception process in the message queue processing method according to the embodiment of the present invention based on the object-oriented technique will be described with reference to the flowchart of FIG.
우선, 메시지 큐를 자동 생성한 후(단계 S31), 언블록(Unblock) 상태가 되면, 언블록 내부에 공유 메모리(21a-21n)가 없으면, 공유 메모리(21a-21n)를 자동 생성한다(단계 S32).First, after the message queue is automatically generated (step S31), when it is in an unblocked state, if there are no shared memories 21a-21n inside the unblock, the shared memories 21a-21n are automatically generated (step S31). S32).
이후, 메시지 큐에서 송신 프로세스(10a-10n)가 전송한 데이터를 읽어온다(단계 S33).Thereafter, the data transmitted by the transmission processes 10a-10n are read from the message queue (step S33).
이상으로 본 발명의 바람직한 실시예에 대해 상세히 기술되었지만, 본 발명이 속하는 기술 분야에 있어서 통상의 지식을 가진 사람이라면, 본 발명을 여러 가지로 변형 또는 변경하여 실시할 수 있음을 알 수 있을 것이다. 따라서, 본 발명의 실시예들의 변경은 본 발명의 기술적 범위를 벗어날 수 없을 것이다.Although the preferred embodiments of the present invention have been described in detail above, it will be understood by those skilled in the art that the present invention may be modified or modified in various ways. Therefore, changes of the embodiments of the present invention will not be able to escape the technical scope of the present invention.
이상에서 설명한 바와 같이 본 발명은 객체 지향 기법을 통해 기본적인 메시지 큐 처리를 하는 클래스를 상위 클래스로 생성하고 이를 상속받아 복수 개의 메시지 큐를 처리할 수 있는 클래스를 제공하게 된다.As described above, the present invention provides a class capable of processing a plurality of message queues by generating a class that performs basic message queue processing as an upper class through an object-oriented technique and inheriting it.
또한, 공유 메모리(Shared Memory)를 사용하여 프로세스 상태를 저장하여 상대방 프로세스 상태를 감시할 수 있게 되고, 클래스 내부에서 복수 개의 큐 자원을 자동으로 관리하여 코딩 시간을 절약하게 된다.In addition, by using the shared memory (Shared Memory) to store the process state can monitor the other party's process state, and saves coding time by automatically managing a plurality of queue resources in the class.
메시지 전송시 마다 자동으로 메시지 큐 상태를 파악하고, 자동으로 큐를 생성함으로써, 불필요한 조건문을 생략할 수 있게 된다.By automatically grasping the message queue status every time a message is sent and automatically creating a queue, unnecessary conditional statements can be omitted.
또한, 프로세서간 메시지 큐 통신이 안정적으로 이루어지게 된다.In addition, message queue communication between processors is stable.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR10-2000-0077211A KR100472406B1 (en) | 2000-12-15 | 2000-12-15 | Method of Managing Message Queue |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR10-2000-0077211A KR100472406B1 (en) | 2000-12-15 | 2000-12-15 | Method of Managing Message Queue |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20020046864A true KR20020046864A (en) | 2002-06-21 |
KR100472406B1 KR100472406B1 (en) | 2005-03-07 |
Family
ID=27682374
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR10-2000-0077211A KR100472406B1 (en) | 2000-12-15 | 2000-12-15 | Method of Managing Message Queue |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100472406B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100441742B1 (en) * | 2002-07-26 | 2004-07-23 | (주)엔텔스 | A method for controlling inter-process communication data using an information exchange bus and the system thereof |
CN102865203A (en) * | 2011-05-17 | 2013-01-09 | 北京智慧剑科技发展有限责任公司 | Factorial agricultural multi-stage solar energy and other energy complementary thermal power generation and poly-generation system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR960013262B1 (en) * | 1993-12-09 | 1996-10-02 | 양승택 | Unix process communication |
JPH1115680A (en) * | 1997-06-26 | 1999-01-22 | Fujitsu Ltd | Multiprocess managing device and program storing medium |
KR19990079607A (en) * | 1998-04-07 | 1999-11-05 | 김영환 | Message queue management method of mobile communication system |
KR100311223B1 (en) * | 2000-01-19 | 2001-10-12 | 오길록 | Method for transmitting and receiving message between processors based on shared message queue |
-
2000
- 2000-12-15 KR KR10-2000-0077211A patent/KR100472406B1/en not_active IP Right Cessation
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100441742B1 (en) * | 2002-07-26 | 2004-07-23 | (주)엔텔스 | A method for controlling inter-process communication data using an information exchange bus and the system thereof |
CN102865203A (en) * | 2011-05-17 | 2013-01-09 | 北京智慧剑科技发展有限责任公司 | Factorial agricultural multi-stage solar energy and other energy complementary thermal power generation and poly-generation system |
Also Published As
Publication number | Publication date |
---|---|
KR100472406B1 (en) | 2005-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100324976B1 (en) | Data processing apparatus, method and computer program product for carrying out workload management with respect to a group of servers in an asynchronous client/server computing system | |
US6202099B1 (en) | Method and apparatus for providing inter-application program communication using a common view and metadata | |
US20070250835A1 (en) | Grid Computing System, Information Processing Apparatus, Job Execution Request Generating Apparatus, Control Method, and Recording Medium | |
AU773557B2 (en) | Communication architecture for distributed computing environment | |
US10303700B1 (en) | Preventing pauses in algorithms requiring pre-image information concerning modifications during data replication | |
CN108270739A (en) | A kind of method and device of managing encrypted information | |
CN109802951A (en) | A kind of message forwarding method, equipment and storage equipment, program product | |
US6370590B1 (en) | Method and apparatus for providing inter-application program communication using a common view | |
KR100472406B1 (en) | Method of Managing Message Queue | |
CN109286636A (en) | Key management method, key server and storage medium | |
JP2008544371A (en) | How to handle lock-related inconsistencies | |
CN114969851B (en) | FPGA-based data processing method, device, equipment and medium | |
CN110045983A (en) | Version repository management method, device and server | |
CN205510073U (en) | Remove data security store and forward device based on quantum encryption technology | |
CN112235205B (en) | Method, device and storage medium for transmitting and consuming MQ message | |
CN101640667B (en) | Process execution method, process execution system and configuration equipment and configuration method of process execution system | |
US20100111115A1 (en) | Node-to-node synchronizing apparatus, node-to-node synchronizing method, and computer product | |
CN109918209B (en) | Method and equipment for communication between threads | |
KR100288061B1 (en) | Emulator for Telecommunications Management Network (TMN) Management Agent | |
US9235457B2 (en) | Proactively communicating information between processes through a message repository | |
CN117221006A (en) | Data exchange method, device, equipment, system and storage medium | |
JP3883216B2 (en) | Distributed service processing control method | |
KR100332836B1 (en) | Data processing using an application layer of FIP | |
CN114650301A (en) | Message queuing method based on transaction system | |
JPH03250335A (en) | Inter-service process data correspondence control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
N231 | Notification of change of applicant | ||
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20090130 Year of fee payment: 5 |
|
LAPS | Lapse due to unpaid annual fee |