The present invention relates generally to computers and like devices, and more particularly to methods, apparatuses and systems for web applications and web servers.
The popularity of the Internet, and in particular, the portion of the Internet known as the World Wide Web, continues to grow. The World Wide Web is basically a collection of computers that are operatively linked together through a plurality of communication networks. Typically, users access the World Wide Web through a personal computer or like device, which is connected to the Internet via a modem of some type. For example, many users of the World Wide Web connect to the Internet using a dial-up telephone networked modem configured to establish data communications through an Internet Services Provider (ISP). Other users connect to the Internet with a faster modem, e.g., a cable modem, digital subscriber line (DSL) modem, etc.
Regardless of how a user ultimately connects to the Internet/World Wide Web, once connected the user typically accesses information available therein by using a web browser or like application. A web browser is configured to access web pages that are provided through the Internet by other computers. For example, one or more web server computers may be connected to the Internet and configured with one or more web sites or other supporting web applications. A web site typically has one or more static web pages and/or is capable of supplying one or more dynamically generated web pages that the user may selectively download, view and possible interact with.
To identify a particular web site/page the user will typically select a hyper link to the desired web site/page or may choose to manually enter a unique name for the web site/page. The most common name used for identifying a web site/page is known as the uniform resource locator (URL). By entering a URL, the user will be connected to an appropriate web server which hosts the applicable web application(s), and the requested web page will be downloaded, in this case using a hypertext transfer protocol (HTTP), to the web browser. Within the Internet itself, the selected URL is associated with a specific Internet Protocol (IP) address. This IP address takes the form of a unique numerical identifier, which has been assigned to the targeted web server. Thus, a user may also directly enter an IP address in the web browser. However, the majority of users tend to favor the use of the more easily remembered and entered URL.
A web server application typically receives the web request from the web browser and provides it to a web application or worker process. The worker process responds to the web request and eventually generates a web request response that is then sent back to the web browser.
There is a continuing desire to provide a quick response from the worker process and to make good use of available web server resources. One bottleneck that has existed in many web servers are delays associated with preparing the web request response to be sent back to the web browser(client). Here, for example, for various reasons, portions of the web request response may be spread apart within the web server's memory. As such, before the web server can send the response to the client there is a need to assemble these portions into a contiguous section of memory. This is a burden on the web server's resources, such as the memory, and also requires a certain amount of time to perform.
As such, there is need for improved methods, apparatuses and systems that provide for improved web request response handling.
Methods, apparatuses and systems are provided, which significantly improve web request response handling in web servers and other like server devices.
The above stated needs and others are met, for example, by a web server arrangement that includes user-mode web application logic configured to receive a web request and process the web request and generate a web request response. Vector send logic is then employed to identify a location(s) of content of the web request response using a vector array. Kernel-mode vector receive logic then assembles the web request response in a contiguous section of kernel-mode or other like memory based on the vector array. Kernel mode universal listener logic then sends the assembled web request response to the requesting client application logic.
A more complete understanding of the various methods, apparatuses and systems of the present invention may be had by reference to the following detailed description when taken in conjunction with the accompanying drawings wherein:
Turning to the drawings, wherein like reference numerals refer to like elements, the invention is illustrated as being implemented in a suitable computing environment. Although not required, the invention will be described in the general context of computer-executable instructions, such as program modules, being executed by a server computer, which may take the form of a personal computer, a workstation, a dedicated server, a plurality of processors, a mainframe computer, etc. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
Exemplary computing environment 120 is only one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of the improved methods and arrangements described herein. Neither should computing environment 120 be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in computing environment 120.
The improved methods and arrangements herein are operational with numerous other general purpose or special purpose computing system environments or configurations.
As shown in
Bus 136 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnects (PCI) bus also known as Mezzanine bus.
Computer 130 typically includes a variety of computer readable media. Such media may be any available media that is accessible by computer 130, and it includes both volatile and non-volatile media, removable and non-removable media.
In
Computer 130 may further include other removable/non-removable, volatile/non-volatile computer storage media. For example,
The drives and associated computer-readable media provide nonvolatile storage of computer readable instructions, data structures, program modules, and other data for computer 130. Although the exemplary environment described herein employs a hard disk, a removable magnetic disk 148 and a removable optical disk 152, it should be appreciated by those skilled in the art that other types of computer readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, digital video disks, random access memories (RAMs), read only memories (ROM), and the like, may also be used in the exemplary operating environment.
A number of program modules may be stored on the hard disk, magnetic disk 148, optical disk 152, ROM 138, or RAM 140, including, e.g., an operating system 158, one or more application programs 160, other program modules 162, and program data 164.
The improved methods and arrangements described herein may be implemented within operating system 158, one or more application programs 160, other program modules 162, and/or program data 164.
A user may provide commands and information into computer 130 through input devices such as keyboard 166 and pointing device 168 (such as a “mouse”). Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, serial port, scanner, camera, etc. These and other input devices are connected to the processing unit 132 through a user input interface 170 that is coupled to bus 136, but may be connected by other interface and bus structures, such as a parallel port, game port, or a universal serial bus (USB).
A monitor 172 or other type of display device is also connected to bus 136 via an interface, such as a video adapter 174. In addition to monitor 172, personal computers typically include other peripheral output devices (not shown), such as speakers and printers, which may be connected through output peripheral interface 175.
Computer 130 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 182. Remote computer 182 may include many or all of the elements and features described herein relative to computer 130.
Logical connections shown in
When used in a LAN networking environment, computer 130 is connected to LAN 177 via network interface or adapter 186. When used in a WAN networking environment, the computer typically includes a modem 178 or other means for establishing communications over WAN 179. Modem 178, which may be internal or external, may be connected to system bus 136 via the user input interface 170 or other appropriate mechanism.
Depicted in
In a networked environment, program modules depicted relative to computer 130, or portions thereof, may be stored in a remote memory storage device. Thus, e.g., as depicted in
Attention is drawn to the exemplary improved web server arrangement 200 that is depicted in
With this in mind, improved web server arrangement 200 includes a kernel-mode universal listener (UL) service 204, which is provided on top of TCP/IP service 202. UL service 204 includes or otherwise is configured to access a configuration file 206. For purposes of simplicity, in this example configuration file 206 is illustrated as being logically within the representative block of UL service 204.
Configuration file 206 is configured to support a decision process that determines which, if any, user-mode process should handle a request as received via TCP/IP service 202. Rather than examining the extension-identifying portion of the URL in the received request to make such a determination, UL service 204 and configuration file 206 are configured to examine the hierarchical formatted information in the URL. The resulting decision will then cause UL service 204 to either deny the request or provide the request to a most-appropriate user-mode worker process.
UL service 204 passes the web request to a worker process 216 for further handling. Doing so essentially eliminates user-mode process hops and associated processing delays. Further, each of the user-mode processes can be supported by a private (non-shared) interface with kernel-mode UL service 204. Additionally, UL service 204 may be advantageously configured to provide improved management over such interfaces and/or the various user-mode processes.
In accordance with certain implementations, configuration file 206 is updated or otherwise managed via a user-mode Web Administration Service (WAS) process 212. As depicted, WAS process 212 is operatively associated with a configuration store 214. Configuration store 214 provides the necessary information about the structure/configuration of web server arrangement 200 to s allow for certain associations to be made between at least a portion of the available web accessible sites/pages/services provided therein and the supporting user-mode processes.
WAS process 212 maintains configuration file 206 using the associated information in configuration store 214. Thus, for example, configuration file 206 may include a listing or similar tree-like arrangement that can be quickly examined upon receiving a request based on the hierarchical portion of the URL. A plurality of data may be associated together in configuration groups such that UL service 204 can begin to systematically “walk through” the hierarchical portion of the requested URL to find the best matching configuration group and once found identify the most-appropriate application pool.
Configuration file 214 may also provide guidance or define logical rules with regard to the selection of a user-mode worker process. Thus, for example, a possible rule may prioritize the use of user-mode processes according to some scheme. One such exemplary scheme may cause UL service 204 to look for already running user-mode processes, rather than start a new user-mode process. Rules may also be provided to better manage the private interfaces and the running/halting/closing of user-mode processes.
WAS process 212 is configured to provide user administration capabilities in configuring, maintaining, or otherwise modifying all or part of configuration store 214. In certain configurations, the administrator may be able to define one or more rules or parameters that operatively affect the operation of UL service 204.
Further illustrated in
Vector send logic 218 is essentially configured to generate a vector array associated with a completed web request response. This vector array identifies where, within user-mode memory, various pieces or portions of the completed web request response are located. The vector array is then provided to vector receive logic 208, which uses this identifying information to retrieve or otherwise move/copy the various portions of the completed web request response from their respective locations in the user-mode memory into kernel mode memory or other like memory. In doing so, vector receive logic 208 assembles the completed web request response into a contiguous section of memory from which it can then be sent out using lower layer protocols, etc., such as TCP/IP.
To illustrate a few of the benefits with web server arrangement 200, attention is drawn first to
Based on these three exemplary sections of web request 302, the web application begins to process each of them and in this case places corresponding portions of the resulting web request response into user-mode memory 304. As shown, these portions are not located in a contiguous section of memory because, for example, the web application will likely have completed the static content requests A and C prior to completing dynamic content request B. Moreover, the web application may not have known how big a block of memory to reserve when initially starting to process web request 302 due to the variability in size of dynamic content B. Consequently, once all of the processing has been completed there is a need to reserve the correct size block of contiguous memory and to assemble the response content into that block and in a particular order. This is shown in memory 306. Next, the now contiguous web request response is transferred to kernel-mode or other like memory 310 for transmission by the protocol stack.
Turning to
Thus, for example, this improved process reduced the amount of user-mode memory by 50% and eliminated the need for the additional user-mode assembly step.
Vector array 404 may include, for example, a handle, tag, identifier, or offset and a size for the static content A and also for static content C. For dynamic content B, vector array 404 may include, for example, a pointer in memory and a size. Those skilled in the art will recognize that these and/or other identifying techniques may be employed. Vector array 404 may also include a count of the number of elements identified in the array.
It should also be noted that there may be more fragmentation of response data than what is illustrated in
Reference is now made to
Additional information is provided in the following implementations details for certain further exemplary implementations of the present invention.
As described herein, the improved techniques allow developers to specify a vector of buffers, fragments and/or even file handles, for example. In certain implementations, a function is called an HSE_REQ_VECTOR_SEND Server Support Function and using this function developers can send an entire response in one function call.
By way of example, a couple of scenarios are provided below:
Scenario 1:
The response of a custom ISAPI extension includes a header, some static content, a database query, and footer. The ISAPI developer can now send the entire response in one function call to the HSE_REQ_VECTOR_SEND Server Support Function. The developer can also send a vector of chunks to the client without having to call WriteClient multiple times.
Scenario 2:
ASP templates are provided which have a plurality of small buffers, mainly. static text buffers. ASP.DLL uses the HSE_REQ_VECTOR_SEND Server Support Function to send these buffers to the client making it much faster.
In accordance with certain exemplary implementations of the present invention, HSE_REQ_VECTOR_SEND is a Server Support Function that takes a pointer to a HSE_VECTOR_SEND structure that has to be filled before it is called.
The structure HSE_VECTOR_SEND structure is as follows:
The parameters for the _HSE_VECTOR_SEND structure are described below:
LPHSE_RESPONSE_ELEMENT lpElementArray, is a pointer to a buffer of HSE_RESPONSE_PACKET structures. If an ISAPI extension wants to close the connection lpElementArray and nElementCount must be 0.
DWORD nElemenetCount is the number of elements that the HSE_RESPONSE_ELEMENT buffer contains. If the ISAPI extension wants to close the connection lpElementArray and nElementCount must be 0.
DWORD dwFlags include the following flags: HSE_IO_SYNC, HSE_IO_ASYNC, HSE_IO_DISCONNECT_AFTER_SEND, and HSE_IO_SEND_NO_HEADERS.
CHAR* pszHeaders, which is a list of headers.
DWORD cchHeaderSize, which is the length of the pszHeaders array.
The HSE_RESPONSE_ELEMENT structure is as follows:
The following is a description of each Member of the response Element when used for Vector Send SSF:
Element type: Specifies whether the element is a buffer or a file or a fragment. Fragments, for example, may be stored in a cache buffer in the UL service and used again.
pBuffer: Pointer to the data in memory to be sent. pBuffer has to be set to NULL if a File Handle or a fragment should be sent.
cbSize Specifies number of bytes to transmit. If a file is sent, cbSize specifies the bytes to be sent, beginning from the offset of the file. If a file is sent and cbSize is 0, the transmission begins from the file offset till the end of the file. If a buffer is sent, cbSize specifies the number of bytes to be sent in this buffer. If a fragment is sent, cbSize is set to NULL.
hFile: (Optional) A handle to a file. The function transmits this file's data. The transmission starts at the file offset (cbFileOffset) and sends the number of bytes specified in cbSize. pBuffer has to be NULL, if a file should be transmitted. hFile has to be NULL or INVALID_HANDLE_VALUE if a buffer or fragment should be sent.
cbFileOffset: cbFileOffset specifies an offset within the file at which to start the file data transfer. If cbFileOffset is 0, the transmission begins with the first byte of the file. If the whole file should be sent, cbFileOffset and cbSize need to be 0. If a fragment is sent, cbFileOffset is set to NULL.
This U.S. Patent Application further claims the benefit of priority from, and hereby incorporates by reference the entire disclosure of, co-pending U.S. Provisional Patent Application Ser. No. 60/366,882, filed Mar. 22, 2002, and titled “Vector Send”.
Number | Name | Date | Kind |
---|---|---|---|
5146593 | Brandle et al. | Sep 1992 | A |
5155837 | Liu et al. | Oct 1992 | A |
5535322 | Hecht | Jul 1996 | A |
5590266 | Carson et al. | Dec 1996 | A |
5706507 | Schloss | Jan 1998 | A |
5715386 | Fulton, III et al. | Feb 1998 | A |
5918226 | Tarumi et al. | Jun 1999 | A |
5920867 | Van Huben et al. | Jul 1999 | A |
5920873 | Van Huben et al. | Jul 1999 | A |
5930830 | Mendelson et al. | Jul 1999 | A |
6023702 | Leisten et al. | Feb 2000 | A |
6067580 | Aman et al. | May 2000 | A |
6094654 | Van Huben et al. | Jul 2000 | A |
6098064 | Pirolli et al. | Aug 2000 | A |
6112196 | Zimowski et al. | Aug 2000 | A |
6188698 | Galand et al. | Feb 2001 | B1 |
6209018 | Ben-Shachar et al. | Mar 2001 | B1 |
6212573 | Lim et al. | Apr 2001 | B1 |
6219760 | McMinn | Apr 2001 | B1 |
6223202 | Bayeh | Apr 2001 | B1 |
6223207 | Lucovsky et al. | Apr 2001 | B1 |
6289458 | Garg et al. | Sep 2001 | B1 |
6327594 | Van Huben et al. | Dec 2001 | B1 |
6339771 | Zimowski et al. | Jan 2002 | B1 |
6389421 | Hawkins et al. | May 2002 | B1 |
6463465 | Nieuwejaar | Oct 2002 | B1 |
6542920 | Belkin et al. | Apr 2003 | B1 |
6574712 | Kahle et al. | Jun 2003 | B1 |
6594784 | Harper et al. | Jul 2003 | B1 |
6604106 | Bodin et al. | Aug 2003 | B1 |
6622168 | Datta | Sep 2003 | B1 |
6629266 | Harper et al. | Sep 2003 | B1 |
6636900 | Abdelnur | Oct 2003 | B2 |
6671716 | Diedrichsen et al. | Dec 2003 | B1 |
6732138 | Browning et al. | May 2004 | B1 |
6810495 | Castelli et al. | Oct 2004 | B2 |
6820215 | Harper et al. | Nov 2004 | B2 |
6941379 | Dingsor et al. | Sep 2005 | B1 |
6978398 | Harper et al. | Dec 2005 | B2 |
6990513 | Belfiore et al. | Jan 2006 | B2 |
7028091 | Tripathi et al. | Apr 2006 | B1 |
7028312 | Merrick et al. | Apr 2006 | B1 |
7107329 | Schroder et al. | Sep 2006 | B1 |
7330483 | Peters, Jr. et al. | Feb 2008 | B1 |
7356803 | Bau, III et al. | Apr 2008 | B2 |
20010010053 | Ben-Shachar et al. | Jul 2001 | A1 |
20020047899 | Son et al. | Apr 2002 | A1 |
20020059425 | Belfiore et al. | May 2002 | A1 |
20020062372 | Hong et al. | May 2002 | A1 |
20020065900 | Dor et al. | May 2002 | A1 |
20020069420 | Russell et al. | Jun 2002 | A1 |
20020073132 | Van Garderen et al. | Jun 2002 | A1 |
20020078174 | Sim et al. | Jun 2002 | A1 |
20020083214 | Heisig et al. | Jun 2002 | A1 |
20020087612 | Harper et al. | Jul 2002 | A1 |
20020087797 | Adrangi | Jul 2002 | A1 |
20020120710 | Chintalapati et al. | Aug 2002 | A1 |
20020129123 | Johnson et al. | Sep 2002 | A1 |
20020147823 | Healy | Oct 2002 | A1 |
20020147966 | Frazier | Oct 2002 | A1 |
20020152328 | Kagan et al. | Oct 2002 | A1 |
20020161908 | Benitez et al. | Oct 2002 | A1 |
20030005122 | Freimuth et al. | Jan 2003 | A1 |
20030005181 | Bau et al. | Jan 2003 | A1 |
20030023957 | Bau et al. | Jan 2003 | A1 |
20030061378 | Mazzitelli | Mar 2003 | A1 |
20030079154 | Park et al. | Apr 2003 | A1 |
20030084018 | Chintalapati et al. | May 2003 | A1 |
20030135484 | Mourad et al. | Jul 2003 | A1 |
20030135542 | Boudreau | Jul 2003 | A1 |
20030182400 | Karagounis et al. | Sep 2003 | A1 |
20040205048 | Pizzo et al. | Oct 2004 | A1 |
20040205769 | Ruutu | Oct 2004 | A1 |
20050021689 | Marvin et al. | Jan 2005 | A1 |
20050235290 | Jefferson et al. | Oct 2005 | A1 |
20050246415 | Belfiore et al. | Nov 2005 | A1 |
20070078995 | Benard et al. | Apr 2007 | A1 |
20070204279 | Warshavsky et al. | Aug 2007 | A1 |
Number | Date | Country | |
---|---|---|---|
20030182397 A1 | Sep 2003 | US |
Number | Date | Country | |
---|---|---|---|
60366882 | Mar 2002 | US |