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 software such as middleware, and is particularly related to systems and methods for zero buffer copying in a middleware environment.
Within any large organization, over the span of many years the organization often finds itself with a sprawling IT infrastructure that encompasses a variety of different computer hardware, operating-systems, and application software. Although each individual component of such infrastructure might itself be well-engineered and well-maintained, when attempts are made to interconnect such components, or to share common resources, it is often a difficult administration task. In recent years, organizations have turned their attention to technologies such as virtualization and centralized storage, and even more recently cloud computing, which can provide the basis for a shared infrastructure. However, there are few all-in-one platforms that are particularly suited for use in such environments. These are the general areas that embodiments of the invention are intended to address.
Systems and methods are provided for zero buffer copying in a middleware environment. In accordance with an embodiment, such a system can include one or more high performance computing systems, each including one or more processors and a high performance memory. The system can further include a user space, which includes a Java virtual machine (JVM) and one or more application server instances. Additionally, the system can include a plurality of byte buffers accessible to the JVM and the one or more application server instances. When a request is received by a first application server instance data associated with the request is stored in a heap space associated with the JVM, and the JVM pins the portion of the heap space where the data is stored. The data is pushed to a first byte buffer where it is accessed by the first application server instance. A response is generated by the first application server using the data, and the response is sent by the first application server.
In the following description, the invention will be illustrated by way of example and not by way of limitation in the figures of the accompanying drawings. References to various embodiments in this disclosure are not necessarily to the same embodiment, and such references mean at least one. While specific implementations are discussed, it is understood that this is done for illustrative purposes only. A person skilled in the relevant art will recognize that other components and configurations may be used without departing from the scope and spirit of the invention.
Furthermore, in certain instances, numerous specific details will be set forth to provide a thorough description of the invention. However, it will be apparent to those skilled in the art that the invention may be practiced without these specific details. In other instances, well-known features have not been described in as much detail so as not to obscure the invention.
As described above, in recent years, organizations have turned their attention to technologies such as virtualization and centralized storage, and even more recently cloud computing, which can provide the basis for a shared infrastructure. However, there are few all-in-one platforms that are particularly suited for use in such environments. Described herein is a system and method for providing a middleware machine or similar platform (referred to herein in some implementations as “Exalogic”), which comprises a combination of high performance hardware, together with an application server or middleware environment, and additional features, to provide a complete Java EE application server complex which includes a massively parallel in-memory grid, can be provisioned quickly, and can scale on demand.
In particular, as described herein, systems and methods are provided for zero buffer copying in a middleware environment. In accordance with an embodiment, such a system can include one or more high performance computing systems, each including one or more processors and a high performance memory. The system can further include a user space, which includes a Java virtual machine (JVM) and one or more application server instances. Additionally, the system can include a plurality of byte buffers accessible to the JVM and the one or more application server instances. When a request is received by a first application server instance, data associated with the request is stored in a heap space associated with the JVM, and the JVM pins the portion of the heap space where the data is stored. The data is pushed to a first byte buffer where it is accessed by the first application server instance. A response is generated by the first application server using the data, and the response is sent by the first application server.
In accordance with an embodiment, the system can use zero buffer copying, which avoids buffer copies in components such as WebLogic Server (WLS), JRockit or Hotspot JVM, Oracle Linux or Solaris, and the operating system (OS). Traditionally, each layer (e.g., the server layer, the JVM layer, the OS layer, etc) of a system keeps a private memory space that other layers, applications and processes cannot access. This is to protect the overall stability of the system by preventing foreign systems from corrupting key memory spaces and data and contributing to a system crash. As such, during request and response processing, data related to the request and response are copied between layers, from private memory space to private memory space. That is, after a given layer has processed the data, it pushes it to the next layer which then copies the data in to its private memory space, operates on it and pushes it to the next layer, etc. However, embodiments of the present invention provide tight integration between the various layers, enabling them to share memory spaces safely, without increasing risk to system stability. As such this reduces CPU utilization in the User & Kernel space, and as such reduces latency.
Zero Buffer Copying
In accordance with an embodiment, the platform also supports use 318 of Socket Direct Protocol (SDP) that avoids copying of the byte buffer data from the JVM running in user space to the network stack in the kernel space. This further reduces the number of buffer copies while serving HTTP requests. Avoiding copying saves CPU cycles both in the user and the kernel space which reduces latencies for HTTP traffic.
In an exemplary embodiment, the application server (e.g. WebLogic Server) can be modified to achieve zero buffer copies while serving HTTP requests. A WebLogic Server JSP Compiler can write static JSP content directly into Java New I/O (NIO) byte buffers. At runtime, a web container can pass these byte buffers directly to byte buffer-aware WebLogic Server 10 Streams without any copying. These byte buffers can be then directly written out by the NIO Muxer using gathered writes. A JVM (e.g. JRockit or HotSpot JVM) running on Exalogic can pin these byte buffers in memory and avoid making a copy of the data to the native memory.
In accordance with an embodiment, the method shown in
The present invention can 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 non-transitory 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 computer readable storage 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 computer readable 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.
This application claims the benefit of priority to U.S. Provisional Patent Application titled “MIDDLEWARE MACHINE PLATFORM”, Application No. 61/383,285, filed Sep. 15, 2010; and U.S. Provisional Patent Application titled “MIDDLEWARE MACHINE PLATFORM”, Application No. 61/384,227, filed Sep. 17, 2010, each of which applications are herein incorporated by reference. This application is related to U.S. patent application Ser. No. 13/170,490, filed on Jun. 28, 2011, entitled “SYSTEM AND METHOD FOR PROVIDING SCATTER/GATHER DATA PROCESSING IN A MIDDLEWARE ENVIRONMENT”; U.S. patent application Ser. No. 13/109,871, filed on May 17, 2011, which is now U.S. Pat. No. 8,756,329, issued on Jun. 17, 2014, entitled “SYSTEM AND METHOD FOR PARALLEL MULTIPLEXING BETWEEN SERVERS IN A CLUSTER”; and U.S. patent application Ser. No. 13/167,636, filed on Jun. 23, 2011, entitled “SYSTEM AND METHOD FOR SUPPORTING LAZY DESERIALIZATION OF SESSION INFORMATION IN A SERVER CLUSTER”, each of which applications are herein incorporated by reference.
| Number | Name | Date | Kind |
|---|---|---|---|
| 5109384 | Tseung | Apr 1992 | A |
| 5333274 | Amini | Jul 1994 | A |
| 6427161 | LiVecchi | Jul 2002 | B1 |
| 6895590 | Yadav | May 2005 | B2 |
| 6938085 | Belkin et al. | Aug 2005 | B1 |
| 7394288 | Agarwal | Jul 2008 | B1 |
| 7554993 | Modi et al. | Jun 2009 | B2 |
| 7831731 | Tang | Nov 2010 | B2 |
| 7991904 | Melnyk et al. | Aug 2011 | B2 |
| 8130776 | Sundararajan | Mar 2012 | B1 |
| 8131860 | Wong et al. | Mar 2012 | B1 |
| 8578033 | Mallart | Nov 2013 | B2 |
| 8601057 | Han | Dec 2013 | B2 |
| 20020174136 | Cameron et al. | Nov 2002 | A1 |
| 20030014480 | Pullara et al. | Jan 2003 | A1 |
| 20030078958 | Pace et al. | Apr 2003 | A1 |
| 20030110232 | Chen | Jun 2003 | A1 |
| 20030120822 | Langrind et al. | Jun 2003 | A1 |
| 20040122953 | Kalmuk | Jun 2004 | A1 |
| 20040177126 | Maine | Sep 2004 | A1 |
| 20040205771 | Sudarshan et al. | Oct 2004 | A1 |
| 20050021354 | Brendle et al. | Jan 2005 | A1 |
| 20050027901 | Simon | Feb 2005 | A1 |
| 20050038801 | Colrain et al. | Feb 2005 | A1 |
| 20050094577 | Ashwood-Smith | May 2005 | A1 |
| 20050102412 | Hirsimaki | May 2005 | A1 |
| 20050223109 | Mamou | Oct 2005 | A1 |
| 20050262215 | Kirov et al. | Nov 2005 | A1 |
| 20060015600 | Piper | Jan 2006 | A1 |
| 20060031846 | Jacobs et al. | Feb 2006 | A1 |
| 20060143525 | Kilian | Jun 2006 | A1 |
| 20060176884 | Fair | Aug 2006 | A1 |
| 20060209899 | Cucchi et al. | Sep 2006 | A1 |
| 20060294417 | Awasthi et al. | Dec 2006 | A1 |
| 20070156869 | Galchev | Jul 2007 | A1 |
| 20070198684 | Mizushima | Aug 2007 | A1 |
| 20070203944 | Batra et al. | Aug 2007 | A1 |
| 20070245005 | Banerjee | Oct 2007 | A1 |
| 20080044141 | Willis et al. | Feb 2008 | A1 |
| 20080098458 | Smith | Apr 2008 | A2 |
| 20080140844 | Halpern | Jun 2008 | A1 |
| 20080195664 | Maharajh | Aug 2008 | A1 |
| 20080286741 | Call | Nov 2008 | A1 |
| 20090024764 | Atherton | Jan 2009 | A1 |
| 20090034537 | Colrain et al. | Feb 2009 | A1 |
| 20090150647 | Mejdrich et al. | Jun 2009 | A1 |
| 20090172636 | Griffith | Jul 2009 | A1 |
| 20090182642 | Sundaresan | Jul 2009 | A1 |
| 20090327471 | Astete et al. | Dec 2009 | A1 |
| 20100138531 | Kashyap | Jun 2010 | A1 |
| 20100198920 | Wong | Aug 2010 | A1 |
| 20100199259 | Quinn et al. | Aug 2010 | A1 |
| 20110029812 | Lu et al. | Feb 2011 | A1 |
| 20110055510 | Fritz et al. | Mar 2011 | A1 |
| 20110066737 | Mallart | Mar 2011 | A1 |
| 20110071981 | Ghosh et al. | Mar 2011 | A1 |
| 20110119673 | Bloch | May 2011 | A1 |
| 20110161457 | Sentinelli | Jun 2011 | A1 |
| 20110185021 | Han | Jul 2011 | A1 |
| 20120023557 | Bevan | Jan 2012 | A1 |
| 20120066400 | Reynolds | Mar 2012 | A1 |
| 20120066460 | Bihani | Mar 2012 | A1 |
| 20120131330 | Tonsing | May 2012 | A1 |
| 20120144045 | Revanuru | Jun 2012 | A1 |
| 20120218891 | Sundararajan | Aug 2012 | A1 |
| 20120239730 | Revanuru | Sep 2012 | A1 |
| 20130004002 | Duchscher | Jan 2013 | A1 |
| 20130014118 | Jones | Jan 2013 | A1 |
| 20140059226 | Messerli | Feb 2014 | A1 |
| Number | Date | Country |
|---|---|---|
| 2492653 | Jan 2013 | GB |
| Entry |
|---|
| Richard G. Baldwin, “The ByteBuffer Class in Java”, Aug. 20, 2002, developer.com. |
| International Search Report and Written Opinion dated Dec. 6, 2011, PCT/US2011/051697, 11 pages. |
| International Search Report and Written Opinion dated Dec. 6, 2011, PCT/US2011/051459, 9 pages. |
| International Searching Authority at the European Patent Office, International Search Report and Written Opinion for PCT International Patent Application PCT/US2013/067286, Feb. 5, 2014, 10 pages. |
| Pfister, An introduction to the InfiniBand Architecture, 2002, pp. 617-632. |
| Anonymous, What is Scatter-Gather DMA (Direct Memory Access)?, Jul. 22, 2010, 2 pages. |
| Number | Date | Country | |
|---|---|---|---|
| 20120066459 A1 | Mar 2012 | US |
| Number | Date | Country | |
|---|---|---|---|
| 61383285 | Sep 2010 | US | |
| 61384227 | Sep 2010 | US |