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.
The present invention is generally related to computer systems, and is particularly related to a distributed data grid.
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.
Described herein is a system and method that can support smart buffer management in a distributed data grid. A buffer manager in the distributed data grid can provide a plurality of buffers in a buffer pool in the distributed data grid, wherein the plurality of buffers are arranged in different generations and each buffer operates to contain one or more objects. The buffer manager can prevent a garbage collector from directly recycling the memory associated with each individual object in the buffer pool, and can allow the garbage collecting of one or more objects in one or more buffers in a particular generation to be performed together
Described herein is a system and method that can support smart buffer management 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, Coherence 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.
Smart Buffer Management
In accordance with an embodiment of the invention, the distributed data grid supports smart buffer management that can be beneficial for data grid operations, such as supporting object serialization and network input/output (I/O) for various applications.
The buffer pool 210 contains a plurality of buffers (222-0, 232-0, 242-0, 222-1, and 222-N), each of which can contain one or more objects (224-0, 234-0, 244-0, 224-1, and 224-N) for one or more applications 202. Each buffer (222-0, 232-0, 242-0, 222-1, or 222-N) can be a shared buffer that holds a byte buffer data structure, and the shared buffer can be released back to the buffer manager 201 when a reference count reaches zero.
Furthermore, the plurality of buffers (222-0, 232-0, 242-0, 222-1, and 222-N) can be arranged in different generations, e.g. from generation 0 to generation N. Also, within each generation, there can be multiple segments, e.g. Segment A to Segment C. The buffer manager 201 can manage the buffers (222-0, 232-0, 242-0, 222-1, and 222-N) in the buffer pool 210 based on the generation concept, i.e. the buffer manager 201 can allocate or release memory (220-0, 220-1, 220-N) for the buffers (222-0, 232-0, 242-0, 222-1, and 222-N) in a particular generation (Generation-0, Generation-1, or Generation-N) at the same time.
For example, the buffer manager 201 can initially create a buffer pool 210 with no buffer. When the buffer manager 201 receives a first request for a buffer from a requester, e.g. application 202, the buffer manager 201 can allocate a portion of the memory 220-0, e.g. 10% of the total memory under the buffer pool 210, for creating the generation 0 buffers in one operation. Then, the buffer manager 201 can create a generation 0 buffer 222-0 from the allocated memory 220-0 and return the allocated buffer 222-0 to the requester. Thus, the memory for buffers in a same generation can be kept close (addresswise) to each other in the memory.
Furthermore, in order to serve the incoming buffer requests, the buffer manager 201 can allocate buffers in a new generation, before reaching the maximum limit for the buffer pool 210, if all the current generations are full. Thus, if generation 0 is full, when the buffer manager 201 receives another request for a buffer, the buffer manager 201 can allocate a portion of the memory 220-1, e.g. 10% of the total memory under the buffer pool 210, for creating the generation 1 buffers in one operation. Then, the buffer manager 201 can create a generation 1 buffer 222-1 from the allocated memory 220-1 and return the allocated buffer 222-1 to the requester. If all generations before generation N are full, when the buffer manager 201 receives another request for a buffer, the buffer manager 201 can allocate a portion of the memory 220-N, e.g. 10% of the total memory under the buffer pool 210, for creating the generation N buffers in one operation. Then, the buffer manager 201 can create a generation N buffer 222-N from the allocated memory 220-N and return the allocated buffer 222-N to the requester.
Additionally, the buffer pool 210 can prevent a garbage collector 203 from directly recycling memory associated with each individual object in the buffer pool 210. The buffer pool 210 can be beneficial for handling large objects with medium length life cycle, e.g. in the tenured space of JAVA heap.
On the other hand, the garbage collectors 203 are preferable for handling small objects with short life cycle. For example, the garbage collector 203 may treat the objects with medium length life cycle as permanent objects. The garbage collector 203 may only try to recycle the memory for the objects with medium length life cycle at the time when a full garbage collection operation is performed. Thus, the memory usage may become inefficient since these objects can become garbage sooner than a full garbage collection operation is performed.
Also, from the perspective of a garbage collector 203, the objects in the buffer pool 210 are garbage collection friendly, since there are generally a limited number of large objects in the buffer pool 210, and the memory for these objects are close (addresswise) to each other. Additionally, these objects are terminal objects that do not reference other objects.
In accordance with an embodiment of the invention, the system allows the garbage collector 203 to recycle the memory allocated for the buffers in different generations according to seniority, or the generation number as shown by arrows 1, 2, and N from garbage collector 203 in
Furthermore, buffers in a particular generation, e.g., generation 15 in Coherence, can be non-pooled buffers. Each non-pooled buffer can be created separately upon request and may be garbage collected as soon as it is dereferenced in the application 202. Additionally, when the buffer pool 210 reaches its limit, the buffer pool 210 automatically looks for the non-pooled buffers and try to garbage collect them if possible.
Each individual buffer can be implemented based on a standard byte buffer or byte array defined in an object oriented programming language, e.g. JAVA. The system can use the size of a buffer, e.g. the last two digit of the size number, as an implicit generation identifier that indicates which generation the buffer is in. For example, the system can allocate a chunk of memory with 1024 K bytes for generation 0 buffers, a chunk of memory with 1025 K bytes for generation 1 buffers, and a chunk of memory with 1026 K bytes for generation 2 buffers.
In accordance with an embodiment of the invention, the plurality of buffers can also be arranged in different segments (e.g. Segment A, Segment B, and Segment C), with different buffers in a same segment having a same size. For example, the system can create the buffers in small, medium, and large segments. Thus, the buffer manager 201 can provide a suitable buffer (222-0, 232-0, 242-0 operative to contain one or more objects 224-0, 234-0, 244-0) in a particular segment, e.g. a buffer 232-0 in segment B in generation 0, according to the need of the requester 202.
Within each segment, there can be different queues, each of which can be associated with a different thread. For example, there can be 24 queues in each segment for a distributed data grid running on a 24 core machine. Thus, the buffer pool 210 can be accessed and managed concurrently via the different queues on 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 equivalents.
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. The current application hereby incorporates by reference the material in the following patent applications: U.S. patent application Ser. No. 13/671,441, entitled “SYSTEM AND METHOD FOR PROVIDING A FLEXIBLE BUFFER MANAGEMENT INTERFACE IN A DISTRIBUTED DATA GRID”, by inventors Charlie Helin, and Mark Falco, filed Nov. 7, 2012 (now U.S. Pat. No. 8,874,811 issued Oct. 28, 2014).
Number | Name | Date | Kind |
---|---|---|---|
5014265 | Hahne et al. | May 1991 | A |
5301350 | Rogan et al. | Apr 1994 | A |
5561785 | Blandy et al. | Oct 1996 | A |
5784698 | Brady et al. | Jul 1998 | A |
6070202 | Minkoff et al. | May 2000 | A |
6338112 | Wipfel et al. | Jan 2002 | B1 |
6826597 | Lonnroth et al. | Nov 2004 | B1 |
7058055 | Mugica et al. | Jun 2006 | B2 |
7139925 | Dinker et al. | Nov 2006 | B2 |
7707513 | Broda et al. | Apr 2010 | B2 |
7861249 | Jiang et al. | Dec 2010 | B2 |
7904493 | Schmelter | Mar 2011 | B2 |
7936753 | Colloff et al. | May 2011 | B1 |
8024445 | Kamijima et al. | Sep 2011 | B2 |
8122006 | de Castro Alves et al. | Feb 2012 | B2 |
8131894 | Cain et al. | Mar 2012 | B2 |
8166095 | Ferwerda et al. | Apr 2012 | B2 |
8249072 | Sugumar et al. | Aug 2012 | B2 |
8259571 | Raphel et al. | Sep 2012 | B1 |
8271980 | Jackson | Sep 2012 | B2 |
8290919 | Kelly et al. | Oct 2012 | B1 |
8332493 | Rowley et al. | Dec 2012 | B2 |
8392368 | Kelly et al. | Mar 2013 | B1 |
8447793 | Burka | May 2013 | B2 |
8510376 | Kaczmarski et al. | Aug 2013 | B2 |
8612386 | Tien et al. | Dec 2013 | B2 |
8621031 | Desai | Dec 2013 | B2 |
8687636 | Sivan et al. | Apr 2014 | B1 |
8768981 | Milne et al. | Jul 2014 | B1 |
20020023173 | Jacobs et al. | Feb 2002 | A1 |
20020196782 | Furukawa et al. | Dec 2002 | A1 |
20040010674 | Boyd et al. | Jan 2004 | A1 |
20040083317 | Dickson et al. | Apr 2004 | A1 |
20040172618 | Marvin | Sep 2004 | A1 |
20050249215 | Kelsey et al. | Nov 2005 | A1 |
20060026169 | Pasqua | Feb 2006 | A1 |
20060112174 | L'Heureux et al. | May 2006 | A1 |
20060129516 | Bradford et al. | Jun 2006 | A1 |
20060161893 | Han et al. | Jul 2006 | A1 |
20060230128 | Chung et al. | Oct 2006 | A1 |
20070168336 | Ransil et al. | Jul 2007 | A1 |
20070230477 | Worley | Oct 2007 | A1 |
20080208960 | Rowley et al. | Aug 2008 | A1 |
20080320501 | Li et al. | Dec 2008 | A1 |
20090077233 | Kurebayashi et al. | Mar 2009 | A1 |
20090116484 | Buford | May 2009 | A1 |
20090177914 | Winchell | Jul 2009 | A1 |
20090219820 | Acke et al. | Sep 2009 | A1 |
20090234897 | Qi | Sep 2009 | A1 |
20100005472 | Krishnaraj et al. | Jan 2010 | A1 |
20100011414 | Banerjee et al. | Jan 2010 | A1 |
20100017461 | Kokkevis et al. | Jan 2010 | A1 |
20100037222 | Tatsubori et al. | Feb 2010 | A1 |
20100042755 | Fuente | Feb 2010 | A1 |
20100060934 | Bellert | Mar 2010 | A1 |
20100093441 | Rajaraman et al. | Apr 2010 | A1 |
20100125624 | Bachhuber-Haller et al. | May 2010 | A1 |
20100265945 | Bejerano et al. | Oct 2010 | A1 |
20100287216 | Ylonen | Nov 2010 | A1 |
20100333099 | Kupferschmidt et al. | Dec 2010 | A1 |
20110004701 | Panda et al. | Jan 2011 | A1 |
20110055322 | Gregersen | Mar 2011 | A1 |
20110137991 | Russell | Jun 2011 | A1 |
20110225120 | Cooper et al. | Sep 2011 | A1 |
20110225121 | Cooper et al. | Sep 2011 | A1 |
20110225122 | Denuit et al. | Sep 2011 | A1 |
20110246550 | Levari et al. | Oct 2011 | A1 |
20110296052 | Guo et al. | Dec 2011 | A1 |
20120113896 | Karol | May 2012 | A1 |
20120144025 | Melander et al. | Jun 2012 | A1 |
20120197840 | Oliver et al. | Aug 2012 | A1 |
20120197959 | Oliver et al. | Aug 2012 | A1 |
20120198455 | Lee et al. | Aug 2012 | A1 |
20120278398 | Lowekamp | Nov 2012 | A1 |
20120331029 | King, III et al. | Dec 2012 | A1 |
20130014114 | Nagata | Jan 2013 | A1 |
20130041969 | Falco et al. | Feb 2013 | A1 |
20130073809 | Antani et al. | Mar 2013 | A1 |
20130074101 | Oliver et al. | Mar 2013 | A1 |
20130103837 | Krueger | Apr 2013 | A1 |
20130128726 | Hellhake et al. | May 2013 | A1 |
20130262632 | Fein | Oct 2013 | A1 |
20130325543 | Magee et al. | Dec 2013 | A1 |
20140016457 | Enyedi et al. | Jan 2014 | A1 |
20140219209 | Soneda et al. | Aug 2014 | A1 |
Entry |
---|
Andrew S. Tanenbaum, Computer Networks: Fourth Edition, Prentice Hall PTR, Upper Saddle River, NJ (2003), 6 pages. |
Martin Sustrik, [zeromq-dev] Subports, Grokbase, Jul. 2011, 6 pages <http://grokbase.com/t/zeromq/zeromq-dev/117vwvr6z9/subports>. |
Class SocketChannel, Java™ 2 Platform Standard Ed. 5.0, Copyright © 2004, 2010 Oracle Int'l Corp. , 12 pages. <http://docs.oracle.com/javase/1.5.0/docs/api/java/nio/channels/SocketChannel.html>. |
Tanenbaum, Andrew S., “Modern operating systems” Prentice-Hall, Inc., Upper Saddle River, New Jersey, 2001. 5 pages. |
Tanenbaum, Andrew S., Computer Networks, Fourth Edition 2003, Prentice Hall PTR, Chapter 5.2.7 Broadcast Routing, 3 pages. |
D. Johnson et al., Network Working Group, RFC 4728; “The Dynamic Source Routing Protocol (DSR) for Mobile Ad Hoc Networks for IPv4”, Microsoft Research Feb. 2007, 107 Pages. |
Number | Date | Country | |
---|---|---|---|
20140108760 A1 | Apr 2014 | US |
Number | Date | Country | |
---|---|---|---|
61714100 | Oct 2012 | US |