SO and OO: on the edge of madness

I've been on the road for a couple of weeks, first at the Applied XML DevCon, then WinDev in Boston, then at the WS-I face-to-face last week in Miami. But now I'm back in the office with time to think and write...

At the end of October, I posted about OO and SO. Jon commented that it wasn't so much an issue of treating services like objects as of identifying information you want to operate on. I agree that you have to very careful to select identifiers whose meaning a service and a client can agree on and which will stable over time. (In fact, a lot of the work I did at MSDN was focused on solving this very problem.) But I do think that the object issue still exists...

As .NET Remoting demonstrates, you can use SOAP and WSDL to describe a rich distributed object system, including support for controlling object lifecycle from a client. But that doesn't mean that a Web service client can talk to you. In fact, in many cases, a remoting endpoint accessed via SOAP cannot be accessed using an ASMX client - a technology that shipped in the same release. Was the remoting stack doing anything wrong or illegal? Well, ignoring the cases where it refered to CLR namespaces as if they were well-known, the answer is no. What it did do, however, was make use of the legal extension points in XSD, WSDL and SOAP to include the information that a remoting client needed to achieve all kinds of rich interactions. Unfortunately, no other Web service kits knew about that special stuff, or what to do with it.

The most obvious problematic piece of this is instance lifecycle. So far, one of things that differentiates Web services from distributed object technologies is that, like traditional Web applications, Web services have been stateless (there is almost always state stored behind the Web service, but it isn't part of a service instance that's somehow bound to a specific client instance). It's interesting to note, then, the following paragraph from section 2 of the draft of WS-Addressing that was submitted to the W3C in August:

Endpoint references will be used instead of WSDL <service/> elements in the following cases:

  • Specific instances of a stateful service need to be identified or its instance-specific configuration details need to be transmitted.

This makes it sound like an endpoint reference is -- or can be -- an object reference, a la' DCOM, CORBA or Java RMI.

Of course, nothing requires that someone use an EPR that way. But if vendors provide tools that hide all this stuff (and surely that is their goal), someone might not even know. In that case, we'll end up in a world where developers have to look at Web services as a whole and then figure out which bits to use to get the loose architecture they want instead of the is-it-a-service-or-is-it-an-object-oh-who-cares thing they might accidentally end up with.

Lately, I’ve started to wonder how much of a risk there is in drawing too close a connection between Web services and objects. I heard someone say last week that if we, the industry, couldn’t get XML to object mappings working for all of XML Schema, then Web services would fail. I don’t believe that’s true. But I do worry that people who want to send XML messages will look at all the Web service infrastructure as it is presented in the tools and conclude that it’s really for distributed objects and that if you just want to do XML messaging, you should look elsewhere.

This concern has been amplified this week because I’ve been spending time looking at various standards for industry-specific messages. If two businesses want to integrate their systems using IFX, OFX, OAGIS, Accord, HL7, Parlay-X, etc, how they choose to transmit their messages including using Web services is really an implementation detail. Clearly Web services provide a range of benefits as an implementation technique, but Web services themselves are not the goal. It’s really about getting a message payload to the other party in a format that they can understand. That can be done in any number of ways.

If we focus all our energy on making messages and endpoints look like objects, we are likely to ignore the people who just want to make systems interoperate by sending XML from A to B. If people who want to do that look at Web services, think “Hmmm. That’s about objects. I want to send XML. I guess it isn’t for me.”, and move on to send raw XML over HTTP, message queues, email or whatever, then the WS stack will be irrelevant. Put another way, while you can use SOAP/WSDL/XSD/etc. to build a distributed object system, that’s a dangerous place to go because you are using technologies everyone associates with Web services and building something that is not, at least in my opinion, a Web service. And muddying these waters at this point is a really bad idea.

 


Posted Nov 11 2004, 11:12 AM by tim-ewald

Comments

JF wrote re: SO and OO: on the edge of madness
on 11-11-2004 12:47 PM
I've not been impressed with the real-world results of mapping messages to objects. Yes, you can make it fly, but I would much rather work with a programming model that isn't based on an object or a DOM.
JF wrote re: SO and OO: on the edge of madness
on 11-11-2004 12:49 PM
Let me clarify...you can "sorta" make it fly...well, at least you can make it fall! :)
Jon Fancey wrote re: SO and OO: on the edge of madness
on 11-11-2004 2:15 PM
Dude, I agree with you 100%. I share your fear; like I think I said at the XML Dev Con though, I can't help feeling that with >6m developers on the planet and 100 people at the conference that what we say as a 'closed' group is largely irrelevant. I refuse to think like that because it's too depressing but come on, what is Indigo if it isn't a replacement for COM and .net remoting? Everyone is making Web services look to the developer like the next distributed object ecosystem with handy-dandy mapping to their favorite language. Why on earth do we need WS- atomic transactions etc otherwise? There are plenty of more losely-coupled ways to model such required abstractions. Way too few people are thinking that the message is what's important and how it gets from A to B is an implementation detail. I just don't know what to do about that. Maybe we're the ones that are wrong?
Service Station wrote Why BizTalk developers get SO and contract-first
on 11-11-2004 2:56 PM
SOAphisticated wrote The role of objects in service-oriented systems
on 11-17-2004 6:30 AM
TheChaseMan's Frenetic SoapBox wrote Revisiting: WS
on 11-22-2004 8:48 AM
TheChaseMan's Frenetic SoapBox wrote Revisiting: WS
on 11-22-2004 8:48 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?