Can OO be SO?

Clemens Vasters has a post that touches on something I've been thinking about for some time. Basically, he shows 2 examples of messages representing a transfer of funds. In one, the account identifier is in the body of the message. In the other, it's in a header that's part of an endpoint reference. His point is that, in the latter case, the account identifier is like an the implicit this pointer used in an OO system. This isn't surprising. At the last PDC, someone asked Don whether an EPR could be used like a CORBA IOR. The answer was yes, that was part of the design. It wouldn't surprise me at all to see this same mechanism used for Indigo/COM+ integration, though I don't know any of the details.

The much debated WS-Transfer spec really brings this point into sharp relief. The WS-Transfer Get request message has an empty body, an wsa:Action header containing the Get URI, and a wsa:To header that identifiers the target resource. Up to now, most people have thought of the To header as identifying a service, so really what WS-Transfer says is every resource is a service. But doesn't that conflict with the notion that services are relatively coarse-grained?

Putting that theoretical argument aside, there is a very practical issue here. If you expect a WSDL to tell you the (logical or physical) address of a service, what happens if you have literally thousands of services in a process? How do you know what all the legal To values are? If you make a request for a list of valid To URIs, how do you know which ones can be used with which portTypes?

In short, while I agree that you can make services look like objects, is that really where we want to go? No.


Posted Oct 27 2004, 07:36 PM by tim-ewald

Comments

Jon Fancey wrote re: Can OO be SO?
on 10-28-2004 4:16 AM
There is one thing that WSDL doesn't give you that in a dynamic web services environment you are going to need - a decent binding/construction mechanism.

Somehow, something needs to figure out what to do with a request and what service to run. WSDL currently fills this space - but badly. I see the stuff in SOAPAction and wsa as 'processing hints'. The point is that it is not up to the caller to specify how the receiver handles their call - this is an implementation detail of the receiver and should not be visible to the caller at all. That piece of information passed in Clemens' example is just a binding mechanism - shared data. If it is passed out through a service at some earlier point from a back-end system - that's bad - really bad. Now it's tightly coupling two systems across the internet (or whatever) with a piece of internal data - a primary key of a table in a database probably. But the data could live on the client forever. You might get away with it with a bank account number but other data is more perishable, email addresses, phone numbers for example. Long-lived sure, forever, no. This is very different to a 'RainFall' service that takes a State code like 'AZ'.

Consider versioning. Last week there was a lot of talk on this topic. We agreed how URIs squeal when they get burned so procreating in abandon is a bad thing. Why not have a single binding - www.example.com - everything else is figured out from what's passed in the message. How that is passed, as EPR parameters or client-server a priori agreed mechanisms (say, in the message body) is not important. I see one of the horrible things about publishing URIs/URLs as EPRs (whether in WSDL or wsa) left-right-and-centre is that you've got to maintain them, and like you say using the wrong scheme you could end up with thousands.

I do not expect WSDL to effectively tell me the address of an instance of a service or behind a service. It sucks at this. WSA is the mechanism.

Really, the object instance is just an object(service) and state(data); the state just happens to be a piece of shared data. But there needs to be a constructor. The client expects the caller to use a well-known shared (foreign) key to do something with. This is generally bad. The problem of sharing keys between parties is a big one which Clemens has hit on with bank accounts - who owns the key? Everyone will hit this at some point if they are using webservices to fetch stuff and then later update their 'copy' (eg with WS-Transfer) - they need to pass something that was known to both parties last time they talked - the object ref - or instance - or...moniker.

So, I don't see this as a services looking like objects issue per se but rather as an identity problem. How do we exchange and identify such information in time and space in an abstract way to cleanly identify a service from its resources to identify it as a service instance?
XML Eye for the Object Guy wrote SO and OO: on the edge of madness
on 11-11-2004 9:13 AM

Add a Comment

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