SYSTEM AND METHOD FOR SUPPORTING OUT-OF-ORDER MESSAGE PROCESSING IN A DISTRIBUTED DATA GRID

Abstract
A system and method can support out-of-order message processing in a distributed data grid. A cluster node in the distributed data grid can receive a plurality of messages at a cluster node in the distributed data grid. The distributed data grid allows each message in the plurality of messages to determine whether it needs to be handled in a particular order on a first thread. The cluster node can dispatch one or more of said messages that do not need to be handled in the particular order on the first thread to one or more different threads.
Description
CROSS-REFERENCED APPLICATIONS

The current application hereby incorporates by reference the material in the following patent applications:


U.S. patent application No. ______, entitled “SYSTEM AND METHOD FOR PROVIDING SUPPORTING GUARANTEED MULTI-POINT DELIVERY IN A DISTRIBUTED DATA GRID,” by inventors Robert H. Lee and Gene Gleyzer, filed ______(Attorney Docket No.: ORACL-05358US0).


U.S. patent application No. ______, entitled “SYSTEM AND METHOD FOR PROVIDING PARTITION PERSISTENT STATE CONSISTENCY IN A DISTRIBUTED DATA GRID,” by inventors Robert H. Lee and Gene Gleyzer, filed ______(Attorney Docket No.: ORACL-05359US0).


U.S. patent application No. ______, entitled “SYSTEM AND METHOD FOR PROVIDING TRANSIENT PARTITION CONSISTENCY IN A DISTRIBUTED DATA GRID,” by inventors Robert H. Lee and Gene Gleyzer, filed ______(Attorney Docket No.: ORACL-05359US1).


U.S. Patent Application No. ______, entitled “SYSTEM AND METHOD FOR SUPPORTING ASYNCHRONOUS MESSAGE PROCESSING IN A DISTRIBUTED DATA GRID,” by inventor Gene Gleyzer, filed ______(Attorney Docket No.: ORACL-05360US0).


COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains material which is subject to Copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.


FIELD OF THE INVENTION

The present invention is generally related to computer systems, and is particularly related to a distributed data grid.


BACKGROUND

Modern computing systems, particularly those employed by larger organizations and enterprises, continue to increase in size and complexity. Particularly, in areas such as Internet applications, there is an expectation that millions of users should be able to simultaneously access that application, which effectively leads to an exponential increase in the amount of content generated and consumed by users, and transactions involving that content. Such activity also results in a corresponding increase in the number of transaction calls to databases and metadata stores, which have a limited capacity to accommodate that demand.


This is the general area that embodiments of the invention are intended to address.


SUMMARY

Described herein are systems and methods that can support out-of-order message processing in a distributed data grid. A cluster node in the distributed data grid can receive a plurality of messages at the cluster node in the distributed data grid. The distributed data grid allows each message in the plurality of messages to determine whether it needs to be handled in a particular order on a first thread. The cluster node can dispatch one or more of said messages that do not need to be handled in the particular order on the first thread to one or more different threads.





BRIEF DESCRIPTION OF THE FIGURES


FIG. 1 is an illustration of a data grid cluster in accordance with various embodiments of the invention.



FIG. 2 shows an illustration of supporting out-of-order message processing at a cluster node in a distributed data grid, in accordance with an embodiment of the invention.



FIG. 3 shows an illustration of handling multiple message streams in a distributed data grid, in accordance with an embodiment of the invention.



FIG. 4 illustrates an exemplary flow chart for supporting out-of-order message processing in a distributed data grid in accordance with an embodiment of the invention.





DETAILED DESCRIPTION

Described herein are systems and methods that can support out-of-order message processing in a distributed data grid.


In accordance with an embodiment, as referred to herein a “distributed data grid”, “data grid cluster”, or “data grid”, is a system comprising a plurality of computer servers which work together to manage information and related operations, such as computations, within a distributed or clustered environment. The data grid cluster can be used to manage application objects and data that are shared across the servers. Preferably, a data grid cluster should have low response time, high throughput, predictable scalability, continuous availability and information reliability. As a result of these capabilities, data grid clusters are well suited for use in computational intensive, stateful middle-tier applications. Some examples of data grid clusters, e.g., the Oracle Coherence data grid cluster, can store the information in-memory to achieve higher performance, and can employ redundancy in keeping copies of that information synchronized across multiple servers, thus ensuring resiliency of the system and the availability of the data in the event of server failure. For example, the Coherence data grid provides replicated and distributed (partitioned) data management and caching services on top of a reliable, highly scalable peer-to-peer clustering protocol.


An in-memory data grid can provide the data storage and management capabilities by distributing data over a number of servers working together. The data grid can be middleware that runs in the same tier as an application server or within an application server. It can provide management and processing of data and can also push the processing to where the data is located in the grid. In addition, the in-memory data grid can eliminate single points of failure by automatically and transparently failing over and redistributing its clustered data management services when a server becomes inoperative or is disconnected from the network. When a new server is added, or when a failed server is restarted, it can automatically join the cluster and services can be failed back over to it, transparently redistributing the cluster load. The data grid can also include network-level fault tolerance features and transparent soft re-start capability.


In accordance with an embodiment, the functionality of a data grid cluster is based on using different cluster services. The cluster services can include root cluster services, partitioned cache services, and proxy services. Within the data grid cluster, each cluster node can participate in a number of cluster services, both in terms of providing and consuming the cluster services. Each cluster service has a service name that uniquely identifies the service within the data grid cluster, and a service type, which defines what the cluster service can do. Other than the root cluster service running on each cluster node in the data grid cluster, there may be multiple named instances of each service type. The services can be either configured by the user, or provided by the data grid cluster as a default set of services.



FIG. 1 is an illustration of a data grid cluster in accordance with various embodiments of the invention. As shown in FIG. 1, a data grid cluster 100, e.g. an Oracle Coherence data grid, includes a plurality of cluster nodes 101-106 having various cluster services 111-116 running thereon. Additionally, a cache configuration file 110 can be used to configure the data grid cluster 100.


Out-of-Order Message Processing

In accordance with an embodiment of the invention, out-of-order message processing can be supported in a distributed data grid.



FIG. 2 shows an illustration of supporting out-of-order message processing at a cluster node in a distributed data grid, in accordance with an embodiment of the invention. As shown in FIG. 2, a cluster node 201 in a distributed data grid 200 can receive a plurality of messages 210, e.g. from either another node or a client outside the distributed data grid 200.


There can be different types of messages in the distributed data grid 200 serving various functional purposes. For example, there can be internal messages that support various system operations within the distributed data grid 200. There can also be external request messages from different outside clients. From the messaging processing perspective, not every message may need to be processed using the implicit ordering guarantee that is provided by the underlying message transfer layer 202.


In accordance with an embodiment of the invention, the distributed data grid 200 can support message processing based on an underlying message transfer layer 202. The underlying message transfer layer 202 can implicitly guarantee that the plurality of messages are received at the cluster node 201 in a stream with a particular order. For example, the underlying message transfer layer 202 can be based on either a standard network protocol such as the Transmission Control Protocol/Internet Protocol (TCP/IP) or a proprietary network protocol such as the Oracle Coherence Tangosol Cluster Management Protocol (TCMP).


The distributed data grid 200 can separate various data grid service functionalities at each cluster node 201 from the underlying message transfer layer 202. For example, various services deployed on the cluster node 201 can handle the different types of incoming messages 210 and can provide the requested functionalities, while the underlying message transfer layer 202 can provide physical means, such as the threading models, for transferring the different types of messages.


As shown in FIG. 2, the cluster node 201 can provide a message queue 204 for handling the different incoming messages 210, e.g. using a single thread model on a message processing service thread 205. Different unrelated incoming messages can be pushed into the message queue 204, and can be processed sequentially on message processing service thread 205 according to a particular order.


Thus, the single thread model can cause a bottle neck at the message processing thread 205, when there are a large amount of incoming messages. In order to alleviate the bottle neck at the message processing service thread 205, the cluster node 201 allows for pre-processing the incoming messages 210, e.g. using a pre-processor 203, before push them into the message queue 204. The pre-processor 203 can dispatch the pre-processing of the incoming messages 210 to other threads, e.g. threads A-B 206-207.


Additionally, each message 210 can specify, or be capable of determining at the runtime, whether it needs to be handled in a particular order on the message processing service thread 205 or to be pre-processed on the other threads. For example, an incoming message 210 can be pre-processed on the other threads than the message processing service thread 205, when it does not have dependencies on the processing on other messages.


Such a self-processing feature enabled in each incoming message 210 allows the processing of the incoming messages 210 to become more transparent. Also, the underlying message transfer layer 202, which can be based on a message transporting protocol, is not in the best position to determine whether each message should be handled in the message processing service thread 205 or not. Thus, the distributed data grid 200 can avoid relying on the underlying message transfer layer 202 for making such sub-optimal decisions.


In accordance with an embodiment of the invention, each message 210 can provide a callback function 211, or a software hook, in the message data structure in order to inform the underlying message transfer layer 202 whether the message 210 can be pre-processed, and/or whether it needs to be handled in the particular order on the message processing service thread 205.


Furthermore, the callback function 211 in each said message can include different application logics. Such application logics can be as simple as a hard coded flag or can be implemented in much more complex application code. The determination of whether a message is capable of being pre-processed can be performed at the runtime on a per message base.


As shown in FIG. 2, the cluster node 201 can request each incoming message 210 to pre-process itself using the callback function. If the incoming message 210 determines that it does not need to be pushed into the message queue 204 for processing on the message processing service thread 205, then, the cluster node 201 can dispatch the incoming messages 210 to other threads, e.g. thread A206 and thread B207, for message processing, or message pre-processing. Thus, the distributed data grid 200 can provide scalability and alleviate the bottleneck in message processing on the cluster node 201 by spreading out the computation load and potentially processing the incoming message 210 in parallel.


In accordance with an embodiment of the invention, the distributed data grid 200 can provide result messages to a client application after receiving a request from the client application and eventually processing the request. The result messages can be processed out-of-order, since the result messages are designated to the user on the client end and no particular order may be required.


Similarly, the request messages can also be processed out-of-order. A request message can be either an internal request message or an external request messages. The distributed data grid allows the processing of the incoming request messages on a message-by-message base. Additionally, when multiple concurrent request messages are received from the same client, the distributed data grid 200 may process these concurrent request messages in parallel under the assumptions that these concurrent request messages are created in parallel at the client side.



FIG. 3 shows an illustration of handling multiple message streams in a distributed data grid, in accordance with an embodiment of the invention. As shown in FIG. 3, the distributed data grid 300 can include a plurality of cluster nodes, e.g. the cluster nodes A-C 301-303.


The different cluster nodes 301-303 can process the messages received. For example, the cluster node A 301 can receive a stream of messages, e.g. message stream 310, from one or more upstream nodes. Additionally, both the cluster node B 302 and the cluster node C 303 can each receive a stream of messages, e.g. message streams 311-312, from the cluster node A 301. These messages 320-322 can either being originated from the cluster node A 301 or from other upstream nodes. Furthermore, the stream of messages 311 received at the cluster node B can further include one or more messages from the cluster node C 303.


Within each message stream 310-312, the messages 320-322 can be transferred in a particular order, as it is implicitly guaranteed by the underlying transfer layer. In accordance with an embodiment of the invention, each cluster node 301-303 within the distributed data grid 300 can be configured to handle out-of-order message processing. Thus, the message pre-processing at each cluster node 301-303 can be on a message-by-message base, without a need for awareness from the underlying transfer layer.


Additionally, the same message can appear in different streams of messages 310-312, and this message can be processed differently by the different cluster nodes 301-303. For example, the cluster node B 302 and the cluster node C 303 can use different thread models to process a same result message when the cluster node B 302 has a message arrived from the cluster node C 303 before the result message.



FIG. 4 illustrates an exemplary flow chart for supporting out-of-order message processing in a distributed data grid in accordance with an embodiment of the invention. As shown in FIG. 4, at step 401, a cluster node in the distributed data grid can receive a plurality of messages. Furthermore, at step 402, the cluster node allows each message in the plurality of messages to determine whether it needs to be handled in a particular order on a service thread. Then, at step 403, the cluster node can dispatch one or more said messages that do not need to be handled in the particular order on the service thread to different threads.


The present invention may be conveniently implemented using one or more conventional general purpose or specialized digital computer, computing device, machine, or microprocessor, including one or more processors, memory and/or computer readable storage media programmed according to the teachings of the present disclosure. Appropriate software coding can readily be prepared by skilled programmers based on the teachings of the present disclosure, as will be apparent to those skilled in the software art.


In some embodiments, the present invention includes a computer program product which is a storage medium or computer readable medium (media) having instructions stored thereon/in which can be used to program a computer to perform any of the processes of the present invention. The storage medium can include, but is not limited to, any type of disk including floppy disks, optical discs, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.


The foregoing description of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to the practitioner skilled in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalence.

Claims
  • 1. A method for supporting out-of-order message processing in a distributed data grid operating on one or more microprocessors, comprising: receiving a plurality of messages at a cluster node in the distributed data grid;allowing each message in the plurality of messages to determine whether it needs to be handled in a particular order on a first thread; anddispatching one or more said messages that do not need to be handled in the particular order on the first thread to one or more different threads.
  • 2. The method according to claim 1, further comprising: using an underlying transporting mechanism to transfer the plurality of messages, wherein the underlying transporting mechanism is based on a message transporting protocol.
  • 3. The method according to claim 2, further comprising: allowing the cluster node to separate data grid service functionalities out from the underlying message transfer layer.
  • 4. The method according to claim 1, further comprising: allowing each said message to provide a callback function in a message structure, wherein the callback function is adaptive to be used by the cluster node to determine whether it needs to handle the message on the first thread.
  • 5. The method according to claim 4, further comprising: setting a flag in the callback function in each said message.
  • 6. The method according to claim 1, further comprising: processing one or more said messages in the particular order using a queue on the first thread.
  • 7. The method according to claim 1, further comprising: processing one or more said messages on the one or more different threads in parallel.
  • 8. The method according to claim 1, further comprising: receiving at least one message in the plurality of messages at another cluster node in the distributed data grid.
  • 9. The method according to claim 8, further comprising: allowing the another cluster node in the distributed data grid to process said at least one message differently.
  • 10. The method according to claim 1, further comprising: allowing at least one message in the plurality of messages to be a result message.
  • 11. A system for supporting out-of-order message processing in a distributed data grid, comprising: one or more microprocessors;a cluster node in the distributed data grid running on the one or more microprocessors, wherein the cluster node operates to perform the steps of receiving a plurality of messages at a cluster node in the distributed data grid;allowing each message in the plurality of messages to determine whether it needs to be handled in a particular order on a first thread; anddispatching one or more said messages that do not need to be handled in the particular order on the first thread to one or more different threads.
  • 12. The system according to claim 11, wherein: an underlying transporting mechanism is used to transfer the plurality of messages, wherein the underlying transporting mechanism is based on a message transporting protocol.
  • 13. The system according to claim 12, wherein: the cluster node separates data grid service functionalities out from the underlying message transfer layer.
  • 14. The system according to claim 11, wherein: each said message operates to provide a callback function in a message structure, wherein the callback function is adaptive to be used by the cluster node to determine whether it needs to handle the message on the first thread.
  • 15. The system according to claim 14, wherein: a flag is set in the callback function in each said message.
  • 16. The system according to claim 11, wherein: the cluster node operates to process one or more said messages in the particular order using a queue on the first thread.
  • 17. The system according to claim 11, wherein: the cluster node operates to process one or more said messages on the one or more different threads in parallel.
  • 18. The system according to claim 11, further comprising: at another cluster node in the distributed data grid operates to receive at least one message in the plurality of messages.
  • 19. The system according to claim 18, further comprising: the another cluster node in the distributed data grid operates to process said at least one message differently.
  • 20. A non-transitory machine readable storage medium having instructions stored thereon that when executed cause a system to perform the steps of: receiving a plurality of messages at a cluster node in the distributed data grid;allowing each message in the plurality of messages to determine whether it needs to be handled in a particular order on a first thread; anddispatching one or more said messages that do not need to be handled in the particular order on the first thread to one or more different threads.
CLAIM OF PRIORITY

This application claims priority on U.S. Provisional Patent Application No. 61/714,100, entitled “SYSTEM AND METHOD FOR SUPPORTING A DISTRIBUTED DATA GRID IN A MIDDLEWARE ENVIRONMENT,” by inventors Robert H. Lee, Gene Gleyzer, Charlie Helin, Mark Falco, Ballav Bihani and Jason Howes, filed Oct. 15, 2012, which application is herein incorporated by reference.

Provisional Applications (1)
Number Date Country
61714100 Oct 2012 US