摘要 |
A system, method, and techniques for providing high availability to an application are provided. An example system includes a plurality of databases and a persistence layer that generates, based on a request, one or more sets of database commands that is specific to a database. The system also includes a high-availability layer that is an intermediary between the persistence layer and the plurality of databases, and includes a transaction manager and an execution engine. The transaction manager starts a composite transaction including a sub-transaction corresponding to each database of the plurality of databases and determines whether each applied sub-transaction has successfully completed. A sub-transaction includes a set of database commands. The execution engine applies each sub-transaction to its corresponding database. |
主权项 |
1. A system for providing high availability to an application, comprising:
a plurality of databases, wherein databases in the plurality of databases are isolated instantiations relative to each other; a persistence layer that receives a request including a transient entity to persist and generates, based on the request, one or more sets of database commands that is specific to a database of the plurality of databases and that manipulates the database; a plurality of application servers that deploy a high-availability application, wherein the high-availability application creates the transient entity and sends the request to the persistence layer; and a high-availability layer that is an intermediary between the persistence layer and the plurality of databases, and includes a transaction manager and an execution engine,
wherein the transaction manager, executed by at least one hardware processor, starts a composite transaction including a sub-transaction corresponding to each database of the plurality of databases and determines whether each applied sub-transaction has successfully completed, wherein when each sub-transaction is determined to have successfully completed, the transaction manager sends to the persistence layer a message indicating successful completion of the composite transaction, and wherein a sub-transaction includes a set of database commands; andan execution engine, executed by at least one hardware processor, that applies each sub-transaction to its corresponding database, wherein when a particular database successfully completes a sub-transaction, the particular database sends a confirmation of successful completion of the sub-transaction. |