Methods, systems, and machine readable programming for interposing front end servers between servers and clients
DCFirst Claim
1. Computer programming recorded in computer readable memory designed to be used on a host computer system having an operating system including calls for communicating with remote client programs running on other computer systems connected to the host over a computer network, said programming comprising a dynamically-loaded library which includes:
- programming which enables the library to intercept certain standard operating system calls made by a back end server program running in the same operating system space as the library, including programming which causes the library to intercept a standard accept call from the back end server which instructs the operating system to accept a connection from a remote client over the computer network;
programming which responds to the intercept of such an accept call by communicating, through a pipe, a representation of the accept call and its parameters to a front end server program running as a separate process in the same operating system space as the library;
programming which receives from the front end server, over a pipe, a socket associated with a connection with a remote client established by the front end server; and
programming which returns program flow from the library'"'"'s execution of the accept call back to the back end server with information specifying the socket received from the front end server in the same format in which the operating system returns socket information in response to an accept call.
6 Assignments
Litigations
0 Petitions
Accused Products
Abstract
A client-server system includes a new front end server which interposes itself between a prior (back end) server and its clients using an interposed dynamically-loaded library linked to the back end. The interposed library and front end can provide enhanced services without requiring reconfiguration of either the back end server or its clients. The front end can accept network connections on the same port as the back end server is programmed to. The interposed library intercepts standard network system calls by the back end and emulates their behavior by communicating with the front end. The front end can send file descriptors of either direct connections with clients, or of pipes for relaying requests and response from and to clients through the front end, to the interposed library for return to calls by the back end to accept connections. The capabilities which the front end can provide include caching, protocol conversion, session affinity, filtering, traffic conversion, and spreading load between multiple back end processes.
-
Citations
28 Claims
-
1. Computer programming recorded in computer readable memory designed to be used on a host computer system having an operating system including calls for communicating with remote client programs running on other computer systems connected to the host over a computer network, said programming comprising a dynamically-loaded library which includes:
-
programming which enables the library to intercept certain standard operating system calls made by a back end server program running in the same operating system space as the library, including programming which causes the library to intercept a standard accept call from the back end server which instructs the operating system to accept a connection from a remote client over the computer network;
programming which responds to the intercept of such an accept call by communicating, through a pipe, a representation of the accept call and its parameters to a front end server program running as a separate process in the same operating system space as the library;
programming which receives from the front end server, over a pipe, a socket associated with a connection with a remote client established by the front end server; and
programming which returns program flow from the library'"'"'s execution of the accept call back to the back end server with information specifying the socket received from the front end server in the same format in which the operating system returns socket information in response to an accept call. - View Dependent Claims (2, 3, 4, 5)
which includes the front end server program; and
wherein the front end server program includes;
programming which sends to the library, as said socket to be returned to the back end server'"'"'s accept call, a socket connected to a relay pipe, which connects to the front end server; and
programming which receives data sent by the back end server over the relay pipe by sending corresponding data to the socket'"'"'s associated remote client over the connection which the front end server has accepted from the client.
-
-
3. Computer programming as in claim 2, wherein the front end server further includes:
-
programming which sends to the library, as the socket to be returned to the back end server'"'"'s accept call, a socket which connects directly to the client, so the back end server can communicate directly with the client without sending communications through the front end server; and
programming which determines, in response to a communication from a given remote client which of said two different types of sockets to send to the library in association with the given client, the socket which connects to a relay pipe or the socket which connects directly to the client.
-
-
4. Computer programming as in claim 1 further including
programming in the library which intercepts an operating system calls from the back end server to establish a network service listen socket using a given file descriptor, and responds to such a call by sending communications to the front end which causes the front end to establish a listen socket for the same network service and by associating the resulting front end network service listen socket with the given back end server file descriptor; -
programming which determines if subsequent intercepted calls from the back end server should be communicated to the front end'"'"'s network service listen socket, based on whether the file descriptor used in the intercepted call is one associated with the network service listen socket; and
programming in the library which intercepts operating system calls from the back end server which seeks an alias file descriptor for said given file descriptor, as responds to such a call by making a corresponding call to the operating system for such an alias file descriptor, by associating the alias file descriptor returned by the operating system with the given front end network service listen socket, and by then returning the alias file descriptor to the back end server;
so that when the library intercepts a call from the back end server using the alias file descriptor it programming which determines if the call should be communicated to the front end'"'"'s network service listen socket will know the alias file descriptor is associated with the network service listen socket.
-
-
5. Computer programming as in claim 1:
-
which includes the front end server program; and
wherein the front end server program includes programming which sends to the library, as the socket to be returned to the back end server'"'"'s accept call, a socket which connects directly to the client, so the back end server can communicate directly with the client without sending communications through the front end server.
-
-
6. A computerized method for interposing a front end server between a back end server program running in a given operating system space on a given computer and one or more client programs running on remote computers connected to the given computer via a computer network, comprising:
-
running an interposed dynamically-loaded library which is linked to the back end server in the given operating system space;
running a front end server program which is loaded in the given operating system space;
using the library to respond to standard operating system calls by the back end server, including using the library to respond to an operating system call by the back end server to accept a connection from a remote client by communicating the call and its parameters to the font end server over a first pipe;
using the font end server to accept a connection from a remote client;
using the font end server to communicate a socket associated with the client connection to the library; and
using the library to return program flow from the library'"'"'s execution of the accept call back to the back end server with information specifying the socket received from the front end server in the same format in which the operating system returns socket information in response to an accept call. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
maintain a cache of data objects requested by clients;
respond to a request by a client for a certain data object, by determining whether or not the requested data object is currently stored in the cache;
respond to a determination that the requested data object is in the cache, by sending a copy of the requested object from the cache to the client over the front end server'"'"'s connection with the client;
respond to a determination that the requested data object is not in the cache by using the front end server to;
send to the library, as the socket to be returned in response to the back end server'"'"'s accept call, a socket connected to a relay pipe, which connects to the front end server; and
send to the back end server the client'"'"'s request for the data object; and
respond to a data object received through the relay pipe from the back end server in response to the client'"'"'s request by caching the data object and sending it out to the client over the front end server'"'"'s connection with the client.
-
-
8. A computerized method as in claim 7 wherein the front end server'"'"'s response to a determination that the requested data object is in the cache does not include sending to the library, as the socket to be returned in response to the back end server'"'"'s accept call, a socket associated with the client'"'"'s requests or sending to back end server the client request.
-
9. A computerized method as in claim 7 wherein the front end server performs the steps of:
-
responding to a request from a client by determining if the requested data object is of a type to be stored in the cache; and
responding to a determination that the requested data object is of a not of a type to be stored in the cache by sending to the library, as the socket to be returned in response to the back end server'"'"'s accept call, a socket connected directly to the client, so the back end server can respond to the request by sending the requested data object directly to the client.
-
-
10. A computerized method as in claim 6 wherein:
-
the back end server calls the library and makes calls using the socket returned to it by the library using a first network protocol;
the front end server responds to those calls by the back end server and sends sockets and other communications to the back end server using the first network protocol;
the front end server accepts communication from and communicates with remote clients using a second network protocol; and
the front end server performs protocol conversion when relaying connections and communications between the back end server and remote clients.
-
-
11. A computerized method as in claim 10 wherein the second network protocol with which the front end server communicates with clients is a newer version of the first protocol with which the back end server communicates with the front end server.
-
12. A computerized method as in claim 10 wherein
the first network protocol used by the back end server uses a separate socket to receive and respond to each separate request from a given client; -
the second network protocol used by a client allows a client to make multiple requests over a single sustained socket with a server; and
the front end server accepts multiple requests from a given client over a single sustained connection defined by a single sustained socket and for each of the multiple requests, the front end server;
sends to the library, as the socket to be returned to a back end server'"'"'s accept call, a separate socket associated with the individual request, which is connected to an associated separate relay pipe connected to the front end server;
sends the individual request to the back end server over the request'"'"'s associated relay pipe;
receives the back end server'"'"'s response to the individual request over the request'"'"'s associated relay pipe; and
sends the request'"'"'s response to the client over the single sustained connection.
-
-
13. A computerized method as in claim 6:
-
further including the step of having application server programming loaded in the given operating system space for providing a given type of service to clients, which application server programming is capable of running multiple sustained processes, each capable of responding to multiple separate requests for the given type of service from a given client; and
the front end server causes multiple requests for the given type of service from a given client to be sent directly to the same process of the application server programming without passing through the back end server.
-
-
14. A computerized method as in claim 6 wherein the front end server filters communications between clients and the back end server.
-
15. A computerized method as in claim 14 wherein the front end server selects whether or not to relay a communication from a client to the back end server based on information about the client.
-
16. A computerized method as in claim 14 wherein the front end server selects whether or not to relay a request from a client to the back end server based on the type of request made by the client.
-
17. A computerized method as in claim 6 wherein the font end server maintains data structures which record information about communications with client, and the front end server updates those data structures in response to new communications with clients.
-
18. A computerized method as in claim 6 wherein:
-
multiple back end server processes are run in the given operating system space, each of which is linked to the library;
the library intercepts standard operating system calls by each of the multiple back end servers, including responding to accept calls from each back end server by communicating the call and its parameters to the front end server;
the front end server accepts a plurality of connections and associated requests from clients, and associates a socket with each such connection; and
either the library or the front end server allocates the sockets associated with the different client connections between the back end servers, causing the library to return sockets associated with different client connections to the accept calls of different back end servers, so as to spread the load of responding to multiple client requests between the back end servers.
-
-
19. A computer system for serving requests from remote clients connected to the system over a computer network, the system comprising:
-
operating system programming loaded in memory and providing a given operating system space within that memory;
a back end server program loaded in the given operating system space;
an interposed dynamically-loaded library loaded in the given operating system space and linked to the back end server; and
a front end server program loaded in the given operating system space;
wherein;
the library includes programming which responds to standard operating system calls by the back end server, including programming which responds to a call by the back end server to accept a connection from a remote client by communicating the call and its parameters to the font end server through a pipe between the library and the front end server;
the front end server includes;
programming which accepts a connection from a remote client; and
programming which communicates a socket associated with the client connection to the library through a pipe between the front end server and the library; and
the library further includes programming which returns program flow from the library'"'"'s execution of the accept call back to the back end server with information specifying the socket received from the front end server in the same format in which the operating system returns socket information in response to an accept call. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27, 28)
programming which sends to the library, as the socket to be returned to the back end server'"'"'s accept call, a socket connected to a relay pipe, which is connected to the front end server; and
programming which responds to a request received from a client over the front end server'"'"'s connection with the client by relaying that request over the relay pipe; and
programming which responds to a response to the request received from the back end server over the relay pipe by relaying that response over the front end server'"'"'s connection with the client.
-
-
21. A computer system as in claim 20 wherein:
-
the back end server includes programming which issues separate operating system calls to read and write data using the socket returned to the back end server in response to an accept call;
the front end server programming which relays a request received from a client over the relay pipe includes;
programming which issues operating system calls to read data from the connection with the remote client; and
programming which writes corresponding data to the relay pipe, so the corresponding data can be received by the back end server in response to a read call made by the back end server using the socket connected to the relay pipe; and
the front end server programming which relays a response received from the back end server to the client includes;
programming which issues operating system calls to read data from the relay pipe, to read data placed in the relay pipe by a write call made by the back end server using the socket connected to the relay pipe; and
programming which writes corresponding data to the connection with the remote client.
-
-
22. A computer system as in claim 20 wherein the front end server further includes:
-
programming which sends to the library, as the socket to be returned to the back end server'"'"'s accept call, a socket which connects directly to the client, so the back end server can communicate directly with the client without sending communications through the front end server; and
programming which determines, in response to a communication from a given remote client which of said two different types of sockets to send to the library in association with the given communication, the socket which connects to the relay pipe or the socket which connects directly to the client.
-
-
23. Computer system as in claim 19 wherein the library further includes:
-
programming in the library which intercepts of an operating system calls from the back end server to establish a network service listen socket using a given file descriptor, and responds to such a call by sending communications to the front end which causes the front end to establish a listen socket for the same network service and by associating the resulting front end network service listen socket with the given back end server file descriptor;
programming which determines if subsequent intercepted calls from the back end server should be communicated to the front end'"'"'s network service listen socket, based on whether the file descriptor used in the intercepted call is one associated with the network service listen socket; and
programming in the library which intercepts operating system calls from the back end server which seek an alias file descriptor for said given file descriptor, as responds to such a call by making a corresponding call to the operating system for such an alias file descriptor, by associating the alias file descriptor returned by the operating system with the given front end network service listen socket, and by then returning the alias file descriptor to the back end server;
so that when the library intercepts a call from the back end server using the alias file descriptor it programming which determines if the call should be communicated to the front end'"'"'s network service listen socket will know the alias file descriptor is associated with the network service listen socket.
-
-
24. A computer system as in claim 19 wherein the front end server further includes programming which sends to the library, as the socket to be returned to the back end server'"'"'s accept call, a socket which connects directly to the client, so the back end server can communicate directly with the client without sending communications through the front end server.
-
25. A computer system as in claim 19 wherein:
-
the front end server further includes;
programming which receives a client requests over a connection the front end server has accepted from a remote client; and
programming which determines, based on the received request, whether or not the request should be communicated to the back end server; and
wherein the programming which communicates the socket associated with a client connection to the library includes programming;
which delays such communication until after the determination of whether or not the client request received on the connection should be communicated to the back end server; and
which only communicates the socket associated with the client connection to the library when said determination indicates the client request should be communicated to the back end server.
-
-
26. A computer system as in claim 19 wherein the front end server further includes:
-
programming which receives requests from clients over the front end server'"'"'s connections with such clients, including requests for cachable data objects;
a cache of cachable data objects requested by clients;
programming which determines whether or not a requested cachable data object is currently stored in the cache; and
programming which responds to a determination that the requested cachable data object is in the cache, by sending a copy of the requested data object from the cache to the requesting client over the front end server'"'"'s connection with said client; and
programming which responds to a determination that the requested cachable data object is not in the cache, including;
programming which causes the socket sent to the library for return to a back end server'"'"'s accept call to be connected to a relay pipe, which is connected to the front end server;
programming which causes the client request for the data object to be communicated over the relay pipe; and
programming which receives the requested data object received from the back end server over the relay pipe in response to the client request;
programming which caches the received data object; and
programming which sends the received data object over the front end server'"'"'s connection with the client.
-
-
27. A computer system as in claim 26 wherein the front end server further includes programming which responds to receipt of a client request which is for a non-cachable response by causing the socket sent to the library for return to the back end server'"'"'s accept call to be connected directly to the client, so the back end server can make the non-cachable response directly to the client without the need to relay it through the front end server.
-
28. A computer system as in claim 19
further including application server programming loaded in the given operating system space, which application server programming is capable of running sustained processes, each of which is capable of responding to each of multiple requests for a given type of service from a given client; - and
the front end server further includes programming which causes multiple requests for the given type of service from a given client to be sent to the same process of said application server programming.
- and
Specification