Lightweight framework with dynamic self-organizing coordination capability for clustered applications
Abstract
A method, a computer program product, and a computer system for a lightweight framework with dynamic self-organizing coordination capacity for clustered applications are provided. The lightweight framework provides a means for managing tasks that require coordination between application nodes. A node receives a task and determines whether one of other nodes is processing the task. The node runs as an active node to process the task, in response to determining that none of the other nodes is processing the task. The node runs as one of one or more passive nodes that monitor processing of the task, in response to determining that the one of the other node is processing the task.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for a lightweight framework with dynamic self-organizing coordination capacity for clustered applications, the method comprising:
receiving, by a node, an event; determining, by the node, whether one of other nodes is processing a task triggered by the event; in response to determining that none of the other nodes is processing the task, processing, by the node, the task as an active node; and in response to determining that the one of the other nodes is processing the task, running, by the node, as one of one or more passive nodes, wherein the one or more passive nodes monitor processing of the task.
2 . The method of claim 1 , further comprising:
in response to determining that the node does not succeed in task initiation, running, by the node, as the one of the one or more passive nodes.
3 . The method of claim 1 , further comprising:
in response to determining that the node succeeds in task initiation, starting, by the node, heartbeat notifications; running, by the node, executors to process the task; completing, by the node, the task; stopping, by the node, the heartbeat notifications; and sending, by the node, to the one or more passive nodes a notification of completion of the task.
4 . The method of claim 1 , further comprising:
receiving from the active node, by the one or more passive nodes, a notification of completion of the task; and stopping, by the one or more passive nodes, monitoring the processing of the task.
5 . The method of claim 1 , further comprising:
in response to running as the one of the one or more passive nodes, checking, by the node, periodically heartbeat notifications sent from the active node; recording, by the node, a number of missed heartbeat notifications; determining, by the node, whether the number of the missed heartbeat notifications exceeds a predetermined threshold; and in response to determining that the number of the missed heartbeat notifications does not exceed the predetermined threshold, continuing, by the node, to check periodically the heartbeat notifications.
6 . The method of claim 5 , further comprising:
in response to determining that the number of the missed heartbeat notifications exceeds the predetermined threshold, attempting to become the active node.
7 . A computer program product for a lightweight framework with dynamic self-organizing coordination capacity for clustered applications, the computer program product comprising a computer readable storage medium having program code embodied therewith, the program code executable to:
receive, by a node, an event; determine, by the node, whether one of other nodes is processing a task triggered by the event; process, by the node, the task as an active node, in response to determining that none of the other nodes is processing the task; and run, by the node, as one of one or more passive nodes, in response to determining that the one of the other nodes is processing the task, wherein the one or more passive nodes monitor processing of the task.
8 . The computer program product of claim 7 , further comprising the program code executable to:
run, by the node, as the one of the one or more passive nodes, in response to determining that the node does not succeed in task initiation.
9 . The computer program product of claim 7 , further comprising the program code executable to:
start, by the node, heartbeat notifications, in response to determining that the node succeeds in task initiation; run, by the node, executors to process the task; complete, by the node, the task; stop, by the node, the heartbeat notifications; and send, by the node, to the one or more passive nodes a notification of completion of the task.
10 . The computer program product of claim 7 , further comprising the program code executable to:
receive from the active node, by the one or more passive nodes, a notification of completion of the task; and stop, by the one or more passive nodes, monitoring the processing of the task.
11 . The computer program product of claim 7 , further comprising the program code executable to:
check, by the node, periodically heartbeat notifications sent from the active node, in response to running as the one of the one or more passive nodes; record, by the node, a number of missed heartbeat notifications; determine, by the node, whether the number of the missed heartbeat notifications exceeds a predetermined threshold; and continue, by the node, to check periodically the heartbeat notifications, in response to determining that the number of the missed heartbeat notifications does not exceed the predetermined threshold.
12 . The computer program product of claim 11 , further comprising the program code executable to:
attempt to become the active node, in response to determining that the number of the missed heartbeat notifications exceeds the predetermined threshold.
13 . A computer system for a lightweight framework with dynamic self-organizing coordination capacity for clustered applications, the computer system comprising:
one or more processors, one or more computer-readable tangible storage devices, and program instructions stored on at least one of the one or more computer-readable tangible storage devices for execution by at least one of the one or more processors, the program instructions executable to: receive, by a node, an event; determine, by the node, whether one of other nodes is processing a task triggered by the event; process, by the node, the task as an active node, in response to determining that none of the other nodes is processing the task; and run, by the node, as one of one or more passive nodes, in response to determining that the one of the other nodes is processing the task, wherein the one or more passive nodes monitor processing of the task.
14 . The computer system of claim 13 , further comprising the program instructions executable to:
run, by the node, as the one of the one or more passive nodes, in response to determining that the node does not succeed in task initiation.
15 . The computer system of claim 13 , further comprising the program instructions executable to:
start, by the node, heartbeat notifications, in response to determining that the node succeeds in task initiation; run, by the node, executors to process the task; complete, by the node, the task; stop, by the node, the heartbeat notifications; and send, by the node, to the one or more passive nodes a notification of completion of the task.
16 . The computer system of claim 13 , further comprising the program instructions executable to:
receive from the active node, by the one or more passive nodes, a notification of completion of the task; and stop, by the one or more passive nodes, monitoring the processing of the task.
17 . The computer system of claim 13 , further comprising the program instructions executable to:
check, by the node, periodically heartbeat notifications sent from the active node, in response to running as the one of the one or more passive nodes; record, by the node, a number of missed heartbeat notifications; determine, by the node, whether the number of the missed heartbeat notifications exceeds a predetermined threshold; and continue, by the node, to check periodically the heartbeat notifications, in response to determining that the number of the missed heartbeat notifications does not exceed the predetermined threshold.
18 . The computer system of claim 17 , further comprising the program instructions executable to:
attempt to become the active node, in response to determining that the number of the missed heartbeat notifications exceeds the predetermined threshold.Join the waitlist — get patent alerts
Track US2016099999A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.