Method and apparatus for incorporating state information into a URL
First Claim
1. A method performed by a server for maintaining state in a stateless server environment, comprising the steps of:
- receiving a message from a client requesting performance of an operation;
initiating said operation in response to receiving said request;
assembling state information associated with said operation;
determining whether said client will allow said server to cause said state information to be stored at said client;
if said client will allow said server then generating a cookie based on said state information; and
sending said cookie to said client to be used by said client in future requests to said server;
if said client will not allow said server then incorporating said state information into a first universal resource locator (URL); and
sending said first URL to said client to be used by said client in future requests to said server;
wherein said server is not required to persistently maintain said state information, thereby remaining stateless.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides an effective and highly scalable mechanism for supporting multiple-request operations (including but not limited to transactions) in a stateless environment, such as the web. A server is used to coordinate the overall processing of client requests. The server performs this coordination function in such a way that: (1) state information associated with multiple-request operations is maintained by the clients making the requests; (2) the clients are unaware that they are maintaining operation-specific state information; and (3) the server itself is not required to persistently maintain the state information, thereby remaining stateless.
-
Citations
39 Claims
-
1. A method performed by a server for maintaining state in a stateless server environment, comprising the steps of:
-
receiving a message from a client requesting performance of an operation;
initiating said operation in response to receiving said request;
assembling state information associated with said operation;
determining whether said client will allow said server to cause said state information to be stored at said client;
if said client will allow said server then generating a cookie based on said state information; and
sending said cookie to said client to be used by said client in future requests to said server;
if said client will not allow said server then incorporating said state information into a first universal resource locator (URL); and
sending said first URL to said client to be used by said client in future requests to said server;
wherein said server is not required to persistently maintain said state information, thereby remaining stateless. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
receiving a second request from said client, said second request including said first URL;
extracting said state information from said first URL; and
using said state information to resume said operation.
-
-
4. The method of claim 3 further comprising the steps of:
-
assembling updated state information associated with said operation;
incorporating said updated state information into a second URL; and
sending said second URL to said client to be used by said client in another future request.
-
-
5. The method of claim 4 wherein said client maintains said state information in said first URL, and said updated state information in said second URL, without being aware that it is maintaining operation-specific state information.
-
6. The method of claim 1, wherein the step of incorporating said state information includes the step of incorporating said state information into a universal resource locator (URL) that is associate with a link in a Web page.
-
7. The method of claim 1 wherein:
-
the step of incorporating said state information into a universal resource locator (URL) comprises the steps of;
determining that said state information cannot be stored as a cookie at said client; and
generating an HTML document that includes one or more hypertext links that store the state information; and
wherein the step of sending said first URL to said client comprises the step of sending said HTML document to said client from said server.
-
-
8. The method of claim 1 further comprising the step of said server using said state information to commit a multi-request transaction, that includes said operation, as an atomic unit of work.
-
9. The method of claim 1 wherein:
-
the step of receiving a request from a client includes the step of receiving a first browser message that includes a begin transaction command; and
the method further comprising the step of in response to receiving said first browser message that includes the begin transaction command, sending a begin message to a transaction manager to cause said transaction manager to begin a transaction.
-
-
10. The method of claim 9 further comprising the steps of:
-
receiving a second browser message that includes a commit transaction command; and
in response to receiving said second browser message that includes the commit transaction command, sending a commit message to a transaction manager to cause said transaction manager to commit said transaction.
-
-
11. The method of claim 9 further comprising the steps of:
-
receiving a second browser message that includes a rollback transaction command; and
in response to receiving said second browser message that includes the rollback transaction command, sending a rollback message to a transaction manager to cause said transaction manager to roll back said transaction.
-
-
12. The method of claim 11 wherein the step of sending said rollback message includes the step of sending rollback messages to one or more database servers, wherein the rollback messages cause said one or more database servers to roll back changes associated with said transactions as an atomic unit of work.
-
13. The method of claim 9, further comprising the step of receiving said begin transaction command at said server in response to selection of a control associated with a tag of a Web page displayed at said client.
-
14. The method of claim 9, further comprising the step of receiving said commit transaction command at said server in response to selection of a control associated with a tag of a Web page displayed at said client.
-
15. The method of claim 9, further comprising the step of receiving said rollback transaction command at said server in response to selection of a control associated with a tag of a Web page displayed at said client.
-
16. The method of claim 1, wherein:
-
said operation is performed as part of an in-progress transaction; and
said state information indicates a state of said in-progress transaction.
-
-
17. The method of claim 1, wherein:
-
said operation is part of a database transaction; and
said step of sending said first URL to said client is performed while said database transaction has neither been committed or rolled back.
-
-
18. A computer-readable medium having stored thereon sequences of instructions for maintaining state in a stateless server environment, the sequence of instructions including instructions for a server performing the steps of:
-
receiving a message from a client requesting performance of an operation;
initiating said operation in response to receiving said request;
assembling state information associated with said operation;
determining whether said client will allow said server to cause said state information to be stored at said client;
if said client will allow said server then generating a cookie based on said state information; and
sending said cookie to said client to be used by said client in future requests to said server;
if said client will not allow said server then incorporating said state information into a first universal resource locator (URL); and
sending said first URL to said client to be used by said client in future requests to said server;
wherein said server is not required to persistently maintain said state information, thereby remaining stateless. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34)
receiving a second request from said client, said second request including said UR first URL;
extracting said state information from said first URL; and
using said state information to resume said operation.
-
-
21. The computer-readable medium of claim 20, wherein the computer-readable medium further comprises instructions for performing the steps of:
-
assembling updated state information associated with said operation;
incorporating said updated state information into a second URL; and
sending said second URL to said client to be used by said client in another future request.
-
-
22. The computer-readable medium of claim 21, wherein said client maintains said state information in said first URL, and said updated state information in said second URL, without being aware that it is maintaining operation-specific state information.
-
23. The computer-readable medium of claim 18, wherein the step of incorporating said state information includes the step of incorporating said state information into a universal resource locator (URL) that is associate with a link in a Web page.
-
24. The computer-readable medium of claim 18 wherein:
-
the step of incorporating said state information into a universal resource locator (URL) comprises the steps of;
determining that said state information cannot be stored as a cookie at said client; and
generating an HTML document that includes one or more hypertext links that store the state information; and
wherein the step of sending said first URL to said client comprises the step of sending said HTML document to said client from said server.
-
-
25. The computer-readable medium of claim 18 further comprises instructions for performing the step of said server using said state information to commit a multi-request transaction, that includes said operation, as an atomic unit of work.
-
26. The computer-readable medium of claim 18 wherein:
-
the step of receiving a request from a client includes the step of receiving a first browser message that includes a begin transaction command; and
the computer-readable medium further comprises instructions for performing the step of in response to receiving said first browser message that includes the begin transaction command, sending a begin message to a transaction manager to cause said transaction manager to begin a transaction.
-
-
27. The computer-readable medium of claim 26 further comprises instructions for performing the steps of:
-
receiving a second browser message that includes a commit transaction command; and
in response to receiving said second browser message that includes the commit transaction command, sending a commit message to a transaction manager to cause said transaction manager to commit said transaction.
-
-
28. The computer-readable medium of claim 26 further comprises instructions for performing the steps of:
-
receiving a second browser message that includes a rollback transaction command; and
in response to receiving said second browser message that includes the rollback transaction command, sending a rollback message to a transaction manager to cause said transaction manager to roll back said transaction.
-
-
29. The computer-readable medium of claim 28 wherein the step of sending said rollback message includes the step of sending rollback messages to one or more database servers, wherein the rollback messages cause said one or more database servers to roll back changes associated with said transactions as an atomic unit of work.
-
30. The computer-readable medium of claim 26, further comprises instructions for performing the step of receiving said begin transaction command at said server in response to selection of a control associated with a tag of a Web page displayed at said client.
-
31. The computer-readable medium of claim 26, further comprises instructions for performing the step of receiving said commit transaction command at said server in response to selection of a control associated with a tag of a Web page displayed at said client.
-
32. The computer-readable medium of claim 26, further comprises instructions for performing the step of receiving said rollback transaction command at said server in response to selection of a control associated with a tag of a Web page displayed at said client.
-
33. The computer-readable medium of claim 18, wherein:
-
said operation is performed as part of an in-progress transaction; and
said state information indicates a state of said in-progress transaction.
-
-
34. The computer-readable medium of claim 18, wherein:
-
said operation is part of a database transaction; and
said step of sending said first URL to said client is performed while said database transaction has neither been committed or rolled back.
-
-
35. A system for maintaining a state in a stateless server environment, the system comprising:
-
a memory;
one or more processors coupled to the memory; and
a set of computer instructions contained in the memory, the set of computer instructions including computer instructions which when executed by the one or more processors, cause the one or more processors to perform the steps of;
receiving, at a server, a message from a client requesting performance of an operation;
initiating said operation in response to receiving said request;
assembling state information associated with said operation;
determining whether said client will allow said server to cause said state information to be stored at said client;
if said client will allow said server then generating a cookie based on said state information; and
sending said cookie to said client to be used by said client in future requests to said server;
if said client will not allow said server then incorporating said state information into a first universal resource locator (URL); and
sending said first URL to said client to be used by said client in future requests to said server;
wherein said server is not required to persistently maintain said state information, thereby remaining stateless. - View Dependent Claims (36, 37, 38, 39)
receive a second request from said client, said second request including said first URL;
extract said state information from said first URL; and
use said state information to resume said operation.
-
-
38. The system of claim 37, wherein the server is further configured to:
-
assemble updated state information associated with said operation;
incorporate said updated state information into a second URL; and
send said second UTRL to said client to be used by said client in another future request.
-
-
39. The system of claim 38, wherein the client is configured to maintain said state information in said first URL, and said updated state information in said second URL, without being aware that it is maintaining operation-specific state information.
Specification