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 using a separate process. This is because if the transaction is processed correctly centrally then that's what counts most. The store server can be updated in a separate process. As the Central Server is a more complex and more constrained environment and if the transaction succeeds centrally then it will very likely also succeed in the Store Server.
- The update process on the Store Server is instant it happens at the same time when the response is sent back to the WebPOS UI.
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.