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 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 are forwarded from the store server to the central server to be processed there. The resulting process data is then replicated from central to 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. This works fine as any queries by webpos are also forwarded to the central server.
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 and the data processing happens on the store server. When the connection to the central server is restored the processed data is replicated from store to central.