Many complex distributed applications are built from remote services, such as storage services, database management systems, authentication and configuration services, and services for interfacing with external components (e.g., credit card processing, banking, vendors, etc). These services are frequently invoked via remote procedure calls or equivalent mechanisms (e.g., remote method invocations). It is common for an application to perform multiple remote procedure calls to accomplish a task, such as accessing data. For example, the application may call a configuration service using one remote procedure call to obtain the name of servers providing authentication services and database services. The application may then call an authentication service at a named server using a second remote procedure call to obtain credentials to access the data. Finally, the application may call a database service at a named server using a third remote procedure call to access the data.
Each local server providing a service may be in a separate machine, rack, room, or site. As servers become more complex and ubiquitous, the geographical dispersion increases. As a result, the communication costs of multiple remote procedure calls in succession can be significant, in terms of latency which causes application delays, and bandwidth which could be limited.
FIG. 1 is an illustration of a prior art system 100 using remote procedure calls. The system 100 may include a client A executing a variety of applications such as an email application, for example. The system 100 may further include a plurality of servers (e.g., servers B, C, D, E, and F). The servers B-F may be adapted to receive and execute remote procedure calls generated from the application executing on the client A. As illustrated by the dashed lines, the client A may be located at a site 1, the servers B, E, and F may be located at a site 2, and the servers C and D may be located at a site 3.
As part of executing the email application, the client A may make three remote procedure calls. As illustrated, the email application executing at the client A makes a remote procedure call (101) to the server B. For example, the server B may be a server that is responsible for authenticating a user of the email application executing on client A. As part of the execution of the remote procedure call for authenticating the user, the server B may further make a remote procedure call (102) to the server C. The server C may execute the remote procedure call and provide a result of the remote procedure call to the server B (103). The server B may receive the result, and use the result to make a further remote procedure call (104) to the server D. The server D may execute the remote procedure call and provide a result of the remote procedure call to the server B (105). For example, the result may be an authentication token.
The server B may then provide the result of the remote procedure call to the client A (106). Upon receiving the result, the email application executing at the client A may make a second remote procedure call (107) to the server E using the result received from the server B. For example, the server E may be a database server that stores email messages, and may require the authentication token that was provided to the client A from the server B in order to retrieve email messages for the email application executing on the client A. The server E may execute the remote procedure call and provide a result of the remote procedure call to the client A (108). For example, the result may be email messages received by the user of the email application executing on the client A.
Finally, the client A may make a third remote procedure call (109) to the server F using the result provided by the server E. For example, the server F may be an advertisement server that provides advertisements to display in the email application based on the content of the emails received by the user. The server F may execute the remote procedure call and provide a result of the remote procedure call to the client A (110). For example, the result may be set of advertisements to display in the email application. Upon receiving the results from the three remote procedure calls to the servers B, E, and F, the email application executing on the client A may present the email messages and advertisements to the authenticated user at the client A.
As illustrated, the use of conventional remote procedure calls to implement the email application illustrated above creates several inefficiencies and creates several opportunities for failures in the system 100. For example, there were six communications sent and received between client A and servers B, E, and F, and four communications between server B and servers C and D. Each communication sent and received has an associated transmission time and may be lost or delayed due to network congestion or failure. Moreover, all ten communications crossed between sites, even though servers C and D, and servers B, E, and F, were located at the same site. Intrasite communications may have an even larger transmission time than intersite communications, and may be even more susceptible to network congestion or network failure.
USPTO Backgrounds
USPTO Backgrounds