Message scheduling method
AssigneeTmaxData Co., Ltd.
InventorsEui-Geun Chung, Dongjin Lee, Juhyun Kim
Life of this patent
Estimating the term…
Abstract
Disclosed are a message scheduling method performed by one or more processors of a computing device and a device thereof. The message scheduling method performed by one or more processors of the computing device may include: receiving, by a control thread, a message from a client; adding, by the control thread, a flag to the received message based on contents of the message; storing, by the control thread, the message with the flag added in a queue; and allocating, by the control thread, the message stored in the queue to each worker thread based on the flag.
Claims9
A message scheduling method performed by one or more processors of a computing device, the method comprising:
- receiving, by a control thread, a message which is an exclusive mode message which needs to be exclusively processed or a shared mode message enabled to be processed in parallel from a client;
- adding, by the control thread, a flag to the received message based on contents of the message;
- storing, by the control thread, the message with the flag added in a queue corresponding to a workgroup of one or more workgroups that is a minimum unit which needs to maintain the consistency according to information of the received message;
- determining, by the control thread, whether the message is an exclusive mode message or a shared mode message based on the flag of the message stored in the queue;
- allocating, by the control thread, the exclusive mode message corresponding to the workgroup to one worker thread when the message is an exclusive mode message, and allocating, by the control thread, a next message in the queue after receiving a processing completion report from the worker thread,
- allocating, by the control thread, the shared mode message corresponding to the workgroup to one worker thread when the message is a shared mode message, and determining whether to allocate a next message in the queue to another worker thread regardless of whether the processing completion report from the worker thread is received or not;
- and
- waiting, by the control thread, for allocating the next message until receiving the processing completion report from the worker thread when the next message is an exclusive mode message, and allocating the next message to another worker thread when the next message is a shared mode message.
A computing device for providing message scheduling, the device comprising:
- one or more processors;
- a memory storing commands executable in the one or more processors and including a queue for storing a message with a flag add depending on a message content;
- wherein the one or more processors
- receive a message which is an exclusive mode message which needs to be exclusively processed or a shared mode message which is enabled to be processed in parallel from a client, and adding a flag to the message based on message contents and storing the message with the flag added in a queue corresponding to a workgroup of one or more workgroups that is a minimum unit which needs to maintain the consistency according to information of the received message, and
- determine whether the message is an exclusive mode message or a shared mode message based on the flag of the message stored in the queue,
- allocate the exclusive mode message corresponding to the workgroup to one worker thread when the message is an exclusive mode message, and allocate a next message to the worker thread in the queue after receiving a processing completion report from the worker thread
- allocate the shared mode message corresponding to the workgroup to one worker thread when the message is a shared mode message, and determine whether to allocate a next message in the queue to another worker thread regardless of whether the processing completion report from the worker thread is received or not;
- and
- wait for allocating the next message until receiving the processing completion report from the worker thread when the next message is an exclusive mode message, and allocate the next message to another worker thread when the next message is a shared mode message.
A computer program stored in a computer readable storage medium, which includes encoded commands, wherein when the computer program is executed by one or more processors of a computer system, which allows the one or more processor to perform the following steps for providing message scheduling, the steps comprising:
- receiving, by a control thread, a message which is an exclusive mode message which needs to be exclusively processed or a shared mode message which is enabled to be processed in parallel from a client;
- adding, by the control thread, a flag to the received message based on contents of the message;
- storing, by the control thread, the message with the flag added in a queue corresponding to a workgroup of one or more workgroups that is a minimum unit which needs to maintain the consistency according to information of the received message;
- and
- determining, by the control thread, whether the message is an exclusive mode message or a shared mode message based on the flag of the message stored in the queue;
- allocating, by the control thread, the exclusive mode message corresponding to the workgroup to one worker thread when the message is an exclusive mode message, and allocating, by the control thread, a next message in the queue after receiving a processing completion report from the worker thread,
- allocating, by the control thread, the shared mode message corresponding to the workgroup to one worker thread when the message is a shared mode message, and determining whether to allocate a next message in the queue to another worker thread regardless of whether the processing completion report from the worker thread is received or not;
- and
- waiting, by the control thread, for allocating the next message until receiving the processing completion report from the worker thread when the next message is an exclusive mode message, and allocating the next message to another worker thread when the next message is a shared mode message.
Dependencies are inferred from the claim text.