Sagas vs. protocols

The basic WS protocols sprang out of a real concrete need for a simpler way to make two applications talk across the network. The lessons learned from DCOM, RMI, and CORBA have been learned and now, functionality wise, it provides what I had with sockets, similar to RPC but (preferrably) with a very different programming model). This is a great tool for integration.

Now I wonder about the WS-ReliableMessaging (+ queuing) and WS-AtomicTransaction protocols. They are designed to detect and recover from the problems you encounter in any distributed system. The goal is to hide a whole bunch of possible weird failure modes from the application programmer. This has been attempted before, most recently with COM+ and J2EE. The problem with this approach is that unless everything in your system understands these protocols, they can't protect you completely. For instance, imagine you have a Web service that saves data to disk in a temporary file. Message delivery to the service may be reliable and the WS may be transational, but if the file system is not those protocols don't help you very much. Similarly, imagine that your WS is a veneer on top of an existing legacy system that doesn't know anything about these protocols. I think of this as a variation of “the last mile problem”. Unless these protocols go everywhere, they don't really solve your problem. The trouble is that driving these protocols out to all of your legacy apps takes a lot of time, if it's possible at all.

Instead of pushing advanced protocols for failure detection and recovery out to all the things you have to talk to, what if you keep them centralized in a system that knows how to durably roll forward or backward using basic WS invocations? In other words, build a driver application that has the logic to detect errors, retry and, if necessary, rollback by invoking other application operations (a saga). Yes, this means that your apps have to support this sort of functionality, but it might well be easier to do this than to drive in deep support for durable protocols. The driver application could be an orchestration in Biztalk or something similar or it could be an app in C#, Java or VB.NET that uses a database to keep track of forward and reverse progress.

Would that model would get you where you want to go more easily or am I just slipping (further) off the deep end?


Posted Mar 14 2005, 02:22 PM by tim-ewald

Comments

Craig wrote re: Sagas vs. protocols
on 03-14-2005 1:07 PM
Tim, Tim, Tim...those are two totally separate questions.

And yes to both.

:)
Adam Watkin-Jones wrote re: Sagas vs. protocols
on 03-16-2005 1:08 AM
Further to "the last mile problem", this venerable paper may be of interest:

http://www.reed.com/Papers/EndtoEnd.html
Ed Pinto wrote re: Sagas vs. protocols
on 03-16-2005 6:58 AM
Tim,
I think that having a driver is one approach that may be useful in certain situations, but I not sure there is a generalized solution to this problem. Wherever our transctional / reliable protocols run out, we end up translating failure scenarios back to those protocols. Moving the complexity of this translation to a central place might make sense where you have a high ratio of "translatable" applications to "failure adapters", but if the ratio is too low, then the burden of generalizing the translation may be too high. If you are asking this from an infrastructure vendor perspective, then I think this kind of functionality would be an excellent tool to have in our Biztalk, or custom app toolkit. One last note - if the apps that interact with the driver need to be modified, that is a non-starter in a lot of situations.
Cheers,
Ed
John Cavnar-Johnson wrote re: Sagas vs. protocols
on 03-21-2005 8:34 PM
Umm... excuse me, I design software for a company that has a real business. They don't pay me to re-implement message queuing or 2PC transactions. That's the job of software vendors. When you all decide on a standardized way of doing it, I'll use it when I need it (which is fairly often for reliable messaging and much less so for 2PC transactions). Until then, I'll make do with proprietary protocols, thank you very much.
Tim wrote re: Sagas vs. protocols
on 03-22-2005 5:29 AM
John,

You really hit on the point I was trying to make. You have all these existing tools - be they application level or existing proprietary protocols - to solve these problems. You could just wire them together instead of waiting for WS-* to be ubiquitous, which will take a while.

That said, to bridge those solutions together, you need something that can provide reliability across individually durable operations. A saga engine in some form does that. Of course if you don't need to bridge them, then yes, just use them in the raw.

Tim-
goffinf@hotmail.com (Fraser) wrote RE: Sagas vs. protocols
on 03-28-2005 1:32 PM
The idea of centralised control of transactions (in 2PC sense) and/or reliable delivery of messages is often seen as an attractive proposition. More recently the big buzz in service orientation circles is of ESB, and implicitly a move away from this type of classic 'hub and spoke' approach.

Relating to your earlier post (Services inside an application), some application designers would be unhappy for every message to have to travel via a message broker (aka BizTalk, Websphere SF, etc.) particularly in cases where scalability and performance are of primary concern and what might be viewed as an un-necessary 'hop' was introduced.
goffinf@hotmail.com (Fraser) wrote RE: Sagas vs. protocols
on 03-28-2005 1:34 PM
The idea of centralised control of transactions (in 2PC sense) and/or reliable delivery of messages is often seen as an attractive proposition. More recently the big buzz in service orientation circles is of ESB, and implicitly a move away from this type of classic 'hub and spoke' approach.

Relating to your earlier post (Services inside an application), some application designers would be unhappy for every message to have to travel via a message broker (aka BizTalk, Websphere SF, etc.) particularly in cases where scalability and performance are of primary concern and what might be viewed as an un-necessary 'hop' was introduced.

Add a Comment

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