Understanding Data

Saturday, November 18, 2006

How I Lost My Faith In Web Services

I used to loathe web services. I found it to overly complex and complicated for doing something that really isn't that complicated. However living in a grid world, it is hard to avoid web services, so I started looking into it. And I really, really tried to like it. And for while I think I liked it. However while trying to create a WSDL for a service, I realized, as others have, that things are not that simple. Web services appear to be in an infant state; as CORBA once was - only worse. There actually exists an organization which purpose is to create interoperability between the WS stacks and to remove ambiguous items in the standards.

Even the guy who created google web API agrees that web services suck. SOAP also pretty much ignores all HTTP error codes, throwing out a good error model, and usefull stuff such as redirection. There are already several hundreds well functioning HTTP clients and servers. Finding a client library that supports WSRF and whatnot brings down the number of clients to 5-10 options - perhaps even less. And their interoperability is by no means guarenteed, unless you use really simple stuff.

I am also questioning the whole reason to use web services in grid. The need for handling state and receiving notifications (to get an asynchronous system, where polling is not necessary) seem rather obivious to me. Yet they went for web services, which does neither of these. Instead they created WSRF and WS-Notification to model this on top. Now, I am all about minimal protocols and layering, but this is just crazy.

The opposite camp of WS is the REST people. However REST is really a design principle, and not a standard. Usually REST will use HTTP, URIs, and XML for its standards. Notice how it isn't inventing anything new and useless? REST, being a design principle, can be hard to understand as it might change the way you thinking (and we don't want that do we). Even the main grid guy does not understand it.

I find REST to be much better approach than WS. Mostly because it is more simple, yet more flexible - given that you understand HTTP. HTTP is in my opion very well designed, but unfortunately most people see HTTP as something which can only retrieve HTML pages. There is one problem with HTTP though: It doesn't do notifications. So, instead of inventing a beast similar to WS-notifcation, which in turn would require your client to run a server, is there a protocol which supports notifications, yet have the client acting as client? Furthermore it should be reasonable flexible and simple.

Such an animal already exists: XMPP does all of this. As a bonus it is already widely deployed, as it is the underlaying protocol of jabber. Yet it have managed to stay relatively hidden and staying of out of peoples way. I like such technologies; usually it means that just work. Everyone talks about WS these days, so clearly it is not working properly :-). Of couse, this Bill has already suggested using XMPP for grid, so what are waiting for?

1 Comments:

  • Hey Henrik - just to let yo know that ATLAS actually tried to use jabber for their production system, already back in 2003. It was dropped as soon as became possible, as it caused big griefs to everybody - ask Mattias E. :-)

    By Anonymous Anonymous, at 8:43 PM  

Post a Comment

<< Home