What's the connection between SOAP and messaging?
People usually associate SOAP with XML messaging, but the more I use it, the more I think that SOAP provides a more general purpose metaphor whose first application is targeted at messaging.
Here's an example. Our new up-coming product, GAIA, includes a P2P XML database. Each node in the database contains a collection of XML records, each of which can represent any kind of data. For example, one XML record could contain data about a specific web service, and another could contain data about a dinosaur such as T-Rex. Each piece of data has associate metadata, such as the author, access permissions, unique key, etc. etc. The question is, how do you store the XML data and its associated metadata?
One approach is to store them as two separate documents, one document containing the data and the other document containing the metadata. Another approach is to store the data and the metadata into a single document. I favor the latter, since it's simple and can emulate the first approach if necessary by representing the data as a link to an external document.
SOAP already provides a structure for achieving this. The high level document (envelope) contains a header (which can contain metadata) and a body (which can contain the primary data).
In the case that SOAP is used for messages, the header can be used for things like routing, or transaction ids, and the body is used for the message itself. But in the case of the GAIA P2P database, the SOAP header is used for things like unique key, author, time to live, and other such stuff. The body is used to contain the actual data.
The questions are:
1. are we using SOAP in a way that wasn't intended but is legitimate?
2. is SOAP at its core really a general mechanism for storing data and its associated metadata in a single document?
comments welcome!
12:50:50 AM
|