Friday 23 March 2007

“Brittleness” is a feature, not a bug!

I often hear that standard middleware, be it Web Services based on SOAP or CORBA is too "brittle" for the real world. The provider and the user of a service of such tightly coupled systems have to exactly agree on the interfaces on both sides. This raises problems, because these interfaces always have to be kept in sync, which is hard to manage in real life. If one side changes the interface description, expressed in WSDL or IDL, then the other side does not understand the data transferred anymore.
A often proposed "solution" now is a document centric, loosely coupled message system. Instead of well defined information, now documents, mainly in XML, are sent around and the receiver has to understand only the "relevant" parts. Other parts of the message are processed, modified or reordered somehow.
Great idea! Did the people suggesting this ever hear about type safety and its benefits? What about safety in general? Why do safety critical domains like military or Air Traffic Control use a strict code even for vocal communication? Because in this case both sides exactly know what's going on the other side!
In the loosely coupled approach you never exactly know how a message is handled, whether the ignored parts are relevant or critical.
So strict typing is a feature, not a bug! At at least it gives a clear error message, instead of making a system completely indeterministic.
OK, but the problem is still there! It is a fact that big enterprises have problems to handle all the interfaces, to keep them all in sync. Just by saying that strict typing is a good thing, the problem does not go away.
The real solution is not on the middleware side, a too loosely coupled middleware can be avoided. The solution is on the development and management side. In order to avoid interface clashes, good enterprise wide development tools, e.g. versioning systems with detection of conflicts, and a strict observing of best practices are needed.

No comments: