Transaction Manager Design
The design of this module mainly targets atomic operation standards, transaction storage, transaction processing, and coordination among various transactions. The most involved method in this module is the enumeration method. The enumeration method is used to list and uniformly number each operation on a data table, and define a specification, some users only need to list numbers according to certain conventions and pass appropriate parameters to wait for the Information replied by the terminal.
Overall Structure Design
In this design, we need to use a key design model.-----In Singleton mode, we also need Singleton mode in Data Set construction. No matter how many customers connect to the server and instantiate the operation, the interface implementation class stored on the server is instantiated only once, ensure the uniqueness of the data so that the data changed by others will be global.
InGlobalserviceThis method accepts a transaction request, executes the transaction operation, and finally returns the results required by the customer. BecauseGlobalserviceIs for a transaction, so the server needs to setSingcallThat is to say, each time someone requests a new instantiated object, they must be given to ensure that their operations do not conflict.
Request mode example
The customer instantiated himselfGlobalserviceThen, each client can assemble its own transaction entity,GlobaserviceIt will help you execute it as appropriate. In actual coding, the customer mainlyQueueserviceDeal.
Relationship between request mode and Server