sbisson: (Default)
Add MemoryShare This Entry
I'm currently sitting in the main hall at TechEd, filling in the gap between the first and second parts of Don Box's 3 part extravaganza presentation. He's talking about the problems that can arise when using web services to handle distributed computing - and thinking about the solutions...

One key point is the concept of idempotent messages: messages that can be sent many times with the same effect - so there is no difference in the result between message 1 and message n.

To explain a bit further, this can be very important if you're in the middle of a transaction and a send-action-response sequence fails to send the response, so you resend, only to trigger another instance of the action... Leaving you to deal with the consequences of send-action-send-action-send-action-response - where the response only reports the last send-action pair...

Now, the idea's clear... but the implementation? Something that could need quite a bit of thought, but one option is the obvious inclusion of a sequence header in the XML message.
Mood:: 'tired' tired
Music:: The inter session music track
There are 5 comments on this entry. (Reply.)
 
posted by [identity profile] codepope.livejournal.com at 01:19am on 05/07/2002
Nah, what you want is a higher level protocol which allows you to bundle messages
into a named sequence which you can then commit.

The server can then "buffer" the sequence until it's (a) contiguous (b) matches
the rules of the start of sequence message (c) gets the end sequence/commit message
...

The end sequence or start sequence would contain the "bundling" rules for any of the messages that return data, and send back a single response composed of the results bundle.

If it returns "incomplete sequence, missing x", the protocol would resend x, and
try to close the sequence again. Repeat until all sequence rules are met or until an action raises a fatal error which forces the abandoning of the sequence. This process of course would be hidden from the coder.


 
posted by [identity profile] marypcb.livejournal.com at 06:25am on 05/07/2002
or kerberos-type tickets; the ticket number only gets accepted once

 
posted by [identity profile] sbisson.livejournal.com at 01:48am on 08/07/2002
After seeing another session where the latency issue was dealt with by including Kerberos tickets in the SOAP headers, I'm pretty sure that that is the appropriate way of dealing with the integrity issue as well as the idempotence problem...
 
posted by [identity profile] pmcmurray.livejournal.com at 12:55am on 08/07/2002
This sounds like a very commercial product. The first thing I thought about was the number of websites which tell you not to touch anything while they're processing your credit card, for fear of charging for the same thing twice. I know this puts some potential customers off - it's one of the things that makes people nervous about using credit cards online - and that it costs companies time (and hence money) to put right mistakes where it does happen.
 
posted by [identity profile] sbisson.livejournal.com at 01:46am on 08/07/2002
It's something we need to think about when we design distributed architectures. We have no control over the remote, autonomous system and we need to be able to ensure transactions without actually being able to manage the remote system...

It's fascinating stuff. I've been having some interesting thoughts about the issues as a result of those sessions. Really made the conference for me, in fact...

January

SunMonTueWedThuFriSat
  1 2 3 4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31