Synchronized Transactions in Multi-Server Environments
OB Commerce can be deployed in a multi-server environment with Store Servers to support stores and a Central Server to support the backoffice. In this environment, transactions (new ticket, changed business partner etc.) can be handled asynchronously or synchronously by the server. Both modes are supported in a multi-server environment.
The asynchronous mode is the default mode for OB Commerce. Synchronous mode is enabled by setting the preference WebPOS Synchronized Mode to Y. When set to Y then all WebPOS transactions (ticket, business partner, cashup, cash management, etc.) will run in synchronized mode.
This page discusses synchronous mode and its operation in multi-server environments.
Synchronous mode - Multi-Server Process Call
The synchronous mode implementation is based on the Multi-Server-Process-Calls concept. So synchronous requests are replicated over different servers if needed.
The main reason for choosing synchronous behavior is that you want to be absolutely sure that a transaction was processed correctly on the server. On a multi-server environment there are multiple servers. The Central Server is the source of truth. Therefore in a multi-server environment the synchronized transaction concept is such that a transaction should be processed on the Central Server to be absolutely sure that everything went well.
Therefore synchronous transactions use the central-first approach as described in this page. This means that a synchronous request is first processed on the central server (if online) before processing it on the store server.
A few things to note:
- The above illustration uses the term ticket but the above flow applies to every transactional action, this can include multiple changed records which are send together in one transaction.
- The Store Server is updated through replication from the central server. This ensures that the central server and store server are completely insync even on the most detailed data level.
- The response from the store server to the WebPOS system will not wait for the replication to finish. So when the user gets back control the data may not yet be present on the store server. Any store server logic searching data should be prepared for this and if necessary query the central server for any missing data.
Synchronized Transactions Multi-Server: offline and transitioning to online
Synchronized transaction mode is also supported in offline cases. With offline there is no connection between the Store Server and Central Server.
For these and other cases, like transition to offline or store server down, the synchronized transaction mode works the same as described in the multi-server-process-call concept.