D. A.
Posts: 1
Nickname: fayser
Registered: Aug, 2006
|
|
Re: Messaging is the Right Way to Build a Distributed System
|
Posted: Aug 22, 2006 4:12 AM
|
|
(I know it is one year after the main discussion took place, but I find this topic very interesting)
From my point of view, the big point that makes messaging suitable for distributed systems is the amount and complexity of the state information. Storing the state in the message itself is, in many systems, almost impossible. If your system is almost stateless, use messages. If not, use a distributed object approach.
Imagine you have to develop a distributed system that shall allow several users at the same time to edit concurrently the same document, using lock/unlock mechanisms to share portions of the document, and events to notify each user of changes in portions of the document. The document is big and complex: think for example in something like an Autocad file to be edited by several users at the same time. To make things worse, the document references external data (for example, parts of the plan are templates stored somewhere, or the document is composed of other smaller documents that can be edited separately).
In that case, the "document" is something so big and complex that has no sense to be exchanged continuously between all the systems that collaborate in its edition. I think the only way is to have a server that stores the document and all the external data referenced by the document, providing an API that is used by the different clients to get the document data, lock/unlock/modify parts of the document, be notified of changes on the document, etc. The document itself will be so complex that even in XML format it will be completely unreadable (XML handles badly the links between entities, it is tree based and storing N-M relations makes them very complex), and will be better described using object data structures. Since everybody is editing the same data, synchronisation is so important that I do not see how to implement all that mess using messaging. And to make things worse, all editing operations shall be undoable... but having the state in the server allows having a command queue to implement the undo/redo funcionality (it would be impossible to have that queue in the message itself).
I think messaging is a good approach for some systems... just the same than distributed objects are good for some others.
|
|