Transmitting Business Objects
By Juan Ramón Acosta
February, 06 1998
Assume that a workstation connected to the network implements the business model of an OTC desk where Portfolios, Orders, Quotes, etc. are implemented as Business Objects.
Let's consider the following scenario. The workstation requests information for order "1234" to the trading engine. Once the Trading Engine found information for order "1234". It will copy the data to a proprietary structure "ST_ORDER". The structure, will be passed to a "Translation" component to obtain a tagged byte-stream (The byte-stream layout must be such that an Order business object can be created from it), then the byte-stream will have to go the "Data Access" component for conversion into a tagged message". Once the message is ready, it will be transmitted to the workstation.
Upon receiving a message, the "Transport" component will forward it to the "Data Access" component. In the "Data Access" the "Object Factory" will be asked to create an object from the incoming-tagged byte-stream. Within the object factory, if a business object for order "1234" does not exist a new instance will be created. Otherwise the current instance will be asked to update from the byte-stream.
Now, assume a change was made to order "1234". To send the change to the trading engine the business object will be asked to send itself to the server. Once the object acknowledges the request it will transform itself to a "tagged byte-stream", it will get a transaction ID, and it will set an access lock on itself. The bye-stream will be passed long with the transaction ID to the "Data Access". A tagged message will be created and send to the trading engine via the "Transport" component. At the server, the "Transport" component will forward the received message to the "Data Access" where the order byte-stream is extracted and passed to the "Translation" component to obtain a "ST_ORDER" structure.
Well those are my thoughts. I think such mechanism can be implemented. I wrote a simple prototype using MFC serialization and the concept work fine. The prototype is MS dependent, but serialization and object factories could be implemented on standard C++ using templates and namespaces.
|