On Jon on Eric on RPC and XML

I just read Jon's post on Eric's appearance on a recent Sys-Con panel. Eric raised made an interesting point about the challenge in thinking about distributed systems from an XML document perspective instead of an RPC perspective. Jon agreed that RPC vs. doc/lit was an interesting issue, but I don't think it's the right one. You have to be careful with the term doc/literal. It's really a WSDL detail meaning simply that the message payload is accurately described by the referenced XSD (as opposed to encoded, where that is not the case). Doc/literal is orthogonal to the issue of whether the architecture or programming model is focused on RPC, async messaging or document transfer. In the MS space, ASP.NET Web Services are doc/literal (by default), but the programming model is RPC. Indigo is doc/literal (by default) and the most talked about programming model is RPC, but other programming models are possible. Biztalk is primarily about document transfer, but you can use it to do RPC and async messaging as well (at least that's how I think of it).

Depending on your background, one of these models is likely to feel the most natural. RPC is the easiest for most folks to understand. Many people who've worked on big enterprise integration systems believe async message queuing is the only thing that works. Many people who've worked on cross-enterprise integration systems have relied on document transfer based models. You can do all of them with SOAP and WSDL, though different kits are more naturally aligned with one or another. I think all of them are valid service-oriented architectures, though I try to recast RPC as synchronous messaging instead of replicating a call-stack (the latter approach is the de facto thinking for most developers, and it leads to lots of complexity and inefficiency).

So all that said, the interesting issue is how to leverage the flexibility and extensiblity of XML to maximum advantage? For instance, how do you create a unified definition of "customer" for your company so that instead of defining a single stringent format, you allow multiple alternate formats. The goal is to get to one for efficiency, but allow others for flexibility in when a branch of the business needs it. XML is excellent for this, but most people coming from a DCOM/CORBA/RMI background don't look at systems that way.


Posted Dec 08 2005, 11:46 AM by tim-ewald

Comments

Sam Gentile's Blog wrote New and Notable 85
on 12-08-2005 11:22 AM
Paul Downey wrote RPC/doc-literal divide
on 12-08-2005 1:25 PM
Great post from Tim commenting on Jon's post on Eric's TV appearance [--that's enough name dropping]. Whilst I agree it's possible to be rpc or document based regardless of whether your WSDL description is rpc, document or documentwrapped I think there is one profound difference between encoded and literal, and that's interoperability. Encoding is all about mapping and binding data into programming models and databases. It supports graph structures, encourages Schema annotations in the message in the form of xsi:type as well as a bunch of data structures under the control of the Section 5 soapenc attributes, which is particularly useful when binding dynamic languages such as Perl and Python. Most of all, it constrained the vocabulary of Schema used by WSDL to describe those messages. All this makes databinder to databinder tools interoperate well but processing encoded messages a nightmare at the document level in XML, SAX, DOM, XPath and wot-not. It's impossible to transform XML into a SOAP encoded document generically - you need access to the per message description. In a marvelous piece of aspiration and led by Tim's seminal MSDN article, the WS-I Basic Profile deprecated encoding, which was all well and good, but opened...
Robin Mulkers wrote re: On Jon on Eric on RPC and XML
on 12-09-2005 1:29 AM
I think there are different views on this:
- synchronus vs asynchronus (coupling in time)
- real XML document vs attributes and result sets mapped as XML
- contract first vs implementation first
- independently designed service vs part of an application that is remotely exposed

I think you are right to mention that just substituting doc/literal to RPC encoding is not solving anything.I think there is for example a fundamental difference between remoting and SOA.
The problem is that middleware allows to do both. It is only by looking at the design that you discover this. Using Soap doc/literal does not mean this is a well designed service that could be reused in a SOA.
Eric Newcomer wrote re: On Jon on Eric on RPC and XML
on 12-09-2005 11:49 AM
Tim,

That is exactly right. My comment was much more about how people tend to view Web services and XML in general differently depending on their backgrounds. SOAP and WSDL tried to combine the synchronous (i.e. RPC oriented) and asynchronous (i.e. document oriented) communication models into a single architecture. Typically the software industry has tended to supply separate product suites oriented around one or the other of these dominant communication models. In addition the world of the Web and document markup languages in general has typically not had much if any contact with these distributed computing folks prior to Web services. So we have a kind of understanding gap that needs to be bridged among people with various backgrounds and expertise.

Eric
Stefan Tilkov's Random Stuff wrote RPC vs. Doc
on 12-12-2005 11:34 AM
Another of those permathreads regarding RPC vs. document-oriented Web services: Eric Newcomer on the RPC/doc-literal cultural divide (Jon Udell) On Jon on Eric on RPC and XML (Tim Ewald) RPC/doc-literal divide (Paul Downey) RPC vs Doc Literal (Eric Newcomer) I’m with Tim regarding the mis-use of the document/literal vs. rpc/encoded WSDL distinction, which really has got nothing to do with...
abhijit wrote re: On Jon on Eric on RPC and XML
on 01-20-2006 11:27 AM
Where can I locate the diff between SOAP_RPC_LITERAL and SOAP_DOC_LITERAL?

Andrew S. Townley wrote re: On Jon on Eric on RPC and XML
on 03-26-2006 3:29 AM
I agree with both Tim and Eric, however I think Tim is getting closer to the source of the problem. From experience, most people think about Web services as an extension of distributed objects. Therefore, they apply their accustomed way of thinking to the problem. This results in primarily RPC style services.

However, I think the real issue here is the shift in the minds of developers as to how they think about SOA/Web services. I've been saying for a while now that it's a similar kind of jump between procedural and OO before you really think about SOA/Web services effectively. Once you've made that jump, you start actually thinking about the data you're sending around rather than treating it just as parameters to some remote method. Unfortunately, as has been said many times before, the tools don't help developers change this attitude because their focus is to keep the developer away from the XML.

Until more developers actually have to think about the data they are shipping around rather than just being able to focus on how that data is represented in their IDE as objects, I don't really see this happening. Without opening up another can of worms, I think this is one of the underlying, fundamental assumptions fueling the REST vs. SOAP debate--although most people don't seem to think about it that way.

Bottom line if your tools and technology allow you to approach Web services exactly the same way you write OO code today, that's how you're going to think about the problem. The problem has been made to fit the mindset rather than forcing a shift in thinking to see the problem for what it is. Because most people haven't surfaced this assumption, there's a lot of fuel to the RPC vs. Document and REST vs. SOAP fires.

ast

Add a Comment

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