Web services database cluster architecture
First Claim
1. A computer-implemented method of performing web services on a database, said database including a master and a replica instance of said database, said method comprising:
- inputting a user request to a URL of a Quality of Service-goal based Router Servlet (QRS), and associating said user request with a thread,wherein said QRS communicates with a session database having a cluster architecture;
assigning, by said QRS, a user identity (UID) to a user session and storing said UID in a session object or reading said UID from said session object;
if said database is marked changed and data in not yet replicated, then adding a database state change flag to said user request, else establishing, by said QRS, a user class and service class from said user request, assigning a Quality of Service (QoS) goal to said user request, and selecting a node from a cluster of nodes that meets said QoS goal, and routing said user request to said selected node;
reading, by a Session Synchronizer Servlet (SSS) of said selected node, said user session using said UID and said database state change flag, if present;
getting, by said SSS, attributes of said session object and setting said attributes from said session object read from said session database, and if said database change state flag is associated with said user request, then adding said database state change flag to said thread;
forwarding, by said SSS, said user request to application logic of said selected node, wherein deployment of an entity bean for read, write, and delete operations and to manage persistent data is re-engineered to enable integration with master and replica database instances by creating a clone entity bean with all of said read and write operations (CEBRW) and a clone entity bean with only said read operations (CEBR);
deploying said CEBRW using a Java Naming and Directory Interface name of an application session bean against a master database instance as an application entity bean, wherein said application session bean interacts with said CEBRW and not with said application entity bean;
intercepting, by said CEBRW, all user requests from said application logic, said CEBRW;
first routing a read request via said CEBR to a replica database instance, if a write flag is not set;
secondly, routing a write request via said application entity bean to a master database instance, if said write flag is set, writing to said master database instance, and time stamping said write request; and
thirdly, routing a read request via said application entity bean to said master database instance, if said write flag is set;
then storing, by said SSS, said session object in said session database;
caching, by said QRS, said database state change flag in said user session and information related to state changes of said user class by said selected node for routing subsequent user requests to said selected node;
recording, by said QRS, performance of said selected node for said service class; and
outputting, by said QRS, a user request result to a user.
1 Assignment
0 Petitions
Accused Products
Abstract
There is disclosed configuring of clustered web services nodes accessing a common database, including implementing a data virtualization layer at each node to abstract an instance of the database from a web service application. In one embodiment, at each node is performed creating a first, data virtualization entity bean having all read and write operations of an application-developed (master) entity bean, creating a second entity bean that carries only the read operations of the master entity bean and addresses the replica instance, receiving an operation request at the first entity bean, and routing a request to either the master entity bean or the second entity bean depending upon the requested operation to access the respective database instance. In another embodiment, at each node is performed implementing an empty database instance having a schema matching the common database, identifying a relevant partitioning in a query utilizing the empty database, and routing the query to a respective partitioned database instance.
-
Citations
3 Claims
-
1. A computer-implemented method of performing web services on a database, said database including a master and a replica instance of said database, said method comprising:
-
inputting a user request to a URL of a Quality of Service-goal based Router Servlet (QRS), and associating said user request with a thread, wherein said QRS communicates with a session database having a cluster architecture; assigning, by said QRS, a user identity (UID) to a user session and storing said UID in a session object or reading said UID from said session object; if said database is marked changed and data in not yet replicated, then adding a database state change flag to said user request, else establishing, by said QRS, a user class and service class from said user request, assigning a Quality of Service (QoS) goal to said user request, and selecting a node from a cluster of nodes that meets said QoS goal, and routing said user request to said selected node; reading, by a Session Synchronizer Servlet (SSS) of said selected node, said user session using said UID and said database state change flag, if present; getting, by said SSS, attributes of said session object and setting said attributes from said session object read from said session database, and if said database change state flag is associated with said user request, then adding said database state change flag to said thread; forwarding, by said SSS, said user request to application logic of said selected node, wherein deployment of an entity bean for read, write, and delete operations and to manage persistent data is re-engineered to enable integration with master and replica database instances by creating a clone entity bean with all of said read and write operations (CEBRW) and a clone entity bean with only said read operations (CEBR); deploying said CEBRW using a Java Naming and Directory Interface name of an application session bean against a master database instance as an application entity bean, wherein said application session bean interacts with said CEBRW and not with said application entity bean; intercepting, by said CEBRW, all user requests from said application logic, said CEBRW; first routing a read request via said CEBR to a replica database instance, if a write flag is not set; secondly, routing a write request via said application entity bean to a master database instance, if said write flag is set, writing to said master database instance, and time stamping said write request; and thirdly, routing a read request via said application entity bean to said master database instance, if said write flag is set; then storing, by said SSS, said session object in said session database;
caching, by said QRS, said database state change flag in said user session and information related to state changes of said user class by said selected node for routing subsequent user requests to said selected node;recording, by said QRS, performance of said selected node for said service class; and outputting, by said QRS, a user request result to a user.
-
-
2. A system for performing web services on a database, said database including a master and a replica instance of said database, said system comprising:
-
a memory configured to store; a user identity (UID) as a session object in a session database; a database state change flag in said user session and information related to state changes of a user class by a selected node for routing subsequent user requests to said selected node, and performance of said selected node for said service class; a processor configured to; perform as a Quality of Service-goal based Router Servlet (QRS) communicating with a session data base having a cluster architecture, said QRS being further configured to; receive an inputted user request to a URL of said QRS; associate said inputted user request with a thread; assign a user identity (UID) to a user session and store said UID in a session object or read said UID from said session object; if said database is marked changed and data is not yet replicated, then add a database state change flag to said user request, else establish a user class and service class from said user request, assign a Quality of Service (QoS) goal to said user request, select a node from a cluster of nodes that meets said QoS goal, and route said user request to said selected node; read, by session a Synchronizer Servlet (SSS) of said selected node, said user session using said UID and said database state change flag, if present; subsequent to read or write operations, cache said database state change flag in said user session and information related to state changes of said user class by said selected node for routing subsequent user requests to said selected node, record performance of said selected node for said service class; and
output a user request result to a user;perform as a Session Synchronizer Servlet (SSS) of said selected node, said SSS being further configured to; read said user session using said UID; get attributes of said session object and set said attributes from said session object read from said session database, and if said database change state flag is associated with said user request, then add said database state change flag to said thread; forward said user request to application logic of said selected node; and subsequently store, after read or write operations, said session object in said session database; perform as a clone entity bean with read and write operations (CEBRW) and a clone entity bean with only read operations (CEBR), wherein deployment of an entity bean for read, write, and delete operations and to manage persistent data is re-engineered to enable integration with master and replica database instances by creating said CEBRW with all of said read and write operations and said CEBR with only said read operations, wherein said CEBRW is deployed using a Java Naming and Directory Interface name of an application session bean against a master database instance as an application entity bean, wherein said application session bean interacts with said CEBRW and not with said application entity bean; wherein said CEBRW intercepts all user requests from said application logic, said CEBRW; first routing a read request via said CEBR to a replica database instance, if a write flag is not set; secondly, routing a write request via said application entity bean to a master database instance, if said write flag is set, writing to said master database instance, and time stamping said write request; and thirdly, routing a read request via said application entity bean to said master database instance, if said write flag is set.
-
-
3. A computer program storage medium readable by computer, tangibly embodying a program of instructions executable by said computer to perform a method of performing web services on a database having a cluster architecture, said database including a master and a replica instance of said database, said method comprising:
-
inputting a user request to a URL of a Quality of Service-goal based Router Servlet (QRS), and associating said user request with a thread, wherein said QRS communicates with a session database having a cluster architecture; assigning, by said QRS, a user identity (UID) to a user session and storing said UID in a session object or reading said UID from said session object; if said database is marked changed and data in not yet replicated, then adding a database state change flag to said user request, else establishing, by said QRS, a user class and service class from said user request, assigning a Quality of Service (QoS) goal to said user request, and selecting a node from a cluster of nodes that meets said QoS goal, and routing said user request to said selected node; reading, by a Session Synchronizer Servlet (SSS) of said selected node, said user session using said UID and said database state change flag, if present; getting, by said SSS, attributes of said session object by reading and setting said attributes from said session object read from said session database, and if said database change state flag is associated with said user request, then adding said database state change flag to said thread; forwarding, by said SSS, said user request to application logic of said selected node, wherein deployment of an entity bean for read, write, and delete operations and to manage persistent data is re-engineered to enable integration with master and replica database instances by creating a clone entity bean with all of said read and write operations (CEBRW) and a clone entity bean with only said read operations (CEBR); deploying said CEBRW using a Java Naming and Directory Interface name of an application session bean against a master database instance as an application entity bean, wherein said application session bean interacts with said CEBRW and not with said application entity bean; intercepting, by said CEBRW, all user requests from said application logic, said CEBRW; first routing a read request via said CEBR to a replica database instance, if a write flag is not set; secondly, routing a write request via said application entity bean to a master database instance, if said write flag is set, writing to said master database instance, and time stamping said write request; and thirdly, routing a read request via said application entity bean to said master database instance, if said write flag is set; then storing, by said SSS, said session object in said session database; caching, by said QRS, said database state change flag in said user session and information related to state changes of said user class by said selected node for routing subsequent user requests to said selected node; recording, by said QRS, performance of said selected node for said service class; and outputting, by said QRS, a user request result to a user.
-
Specification