Thursday, November 22, 2007

SOA kills ORM?

Recently I participated in several projects that heavily utilized services (message-based, shared-nothing, over-the-wire thingies). What I noticed is that object/relational mapping (ORM) tools are virtually useless for such projects. Indeed, significant, if not most value of ORM comes from ability to modify values in memory, using OO language constructs for that, and then just synchronize the memory with the database. This functionality goes completely unutilized in typical SOA application, where reads and writes are separated in time, use different objects and acces paths, and in fact can be performed from different machines. E.g., one service can read a list of tasks from the DB and return them as a message to the network peer. After traveling between peers this information (but not this specific object or message) in combination with information from other sources (e.g., user input) can be used to update a specific property of a specific task (written back to the DB). Has need for service/relational (or message/relational) mapping indeed arrived?


The Ubiquitous Mr. Lovegroove said...

I think that there is no need for a Service/Relation mapping tool.
Depending from use-case, the service may return a simple dat set, e.g. http://server/getUserInfo?id=123 , which can be done via a single select with a join or two at most or it may perform a complex operation, such as http://server/payWithCreditCard?details=.... in which case the underlying system will probably use objects anyhow to process the data and ORM covers data access there.

Andris Birkmanis said...

The Ubiquitous Mr. Lovegroove: You may be right that messages (of services) are closer to result sets (of RDBMS) than objects are to result sets. E.g., both messages and result sets are immutable and contain no beahvior.
This does not mean, however, that the difference is zero, and could not benefit from using a tool:
just last week I had to write an AJAX service that creates a JSON object from a join of 7 tables. Some tool would help a lot.

Mohit SEO said...

ORM Services are about to reduce impact of negative feedback by put down negative feedback in search engine ranking.

ORM Services Delhi