Welcome to TechNet Blogs Sign in | Join | Help

The WS-RM Sequence Lifetime in Indigo

There are two mechanisms in the WS-ReliableMessaging protocol that affect the lifetime of a sequence - the Expires element located in CreateSequence and CreateSequenceResponse messages and the InactivityTimeout policy assertion located in a service's WSDL. In Beta 1, Indigo simply ignores the first one and has a mechanism in place that tries to prevent the timeout defined by the second one from ever being actually reached. Indigo's architects and developers had good reasons to do things this way. It all makes sense when you think about the two reliable communication models that are currently available in the product - a queued one and a direct one. The queued communication model is meant mainly for long-running, disconnected, durable applications; on the other hand, the direct communication model is "alive" - both parties need to be online at the same time and their state is stored in-memory as they exchange their messages. This post addresses the second model.

Let's cover the optional Expires element first. Indigo clients never generate it and Indigo services echo back whatever the client asked for as that's what's required by the WS-RM specification. That's also all an Indigo service will do - if the client was serious enough about the Expires duration to put it in the CreateSequence, it will be up to the client to enforce it, as well. There is nothing in the spec that says the RM Receiver is obligated to terminate the sequence when the duration expires.

The InactivityTimeout is more interesting. If there is no traffic on an RM sequence, and that includes application as well as protocol messages, for the duration of the inactivity timeout, the sequence can be considered terminated. An Indigo service resets its inactivity timer every time it receives a message on a given sequence. When the timer goes off, however, it will send a SequenceTerminated fault to the client and erase all state it had associated with that sequence. An Indigo client is different. An Indigo client wants to keep the "direct" sequence alive for the user and prevent the service from terminating it due to inactivity. To do this, it sends "keep-alive" messages. Keep-alives are simple AckRequested messages that probe the sequence to a) make sure it's not dead and b) to inform the service the client is still active. If an Indigo client doesn't receive acknowledgements for its keep-alives for the duration of the inactivity timeout, it will also terminate the sequence and send a SequenceTerminated fault to the service.

Let's get into the nitty-gritty details about when we actually send these keep-alive messages. We'll send the first one when the client hasn't heard back from the service for half of the inactivity timeout. At that point, we split the second half of the inactivity timeout into MaxRetryCount segments. If the server continues to respond with silence, we'll send one AckRequested at the end of every one of the calculated segments. The client will give up after MaxRetryCount AckRequesteds.

I hope this gave you some more insight into how Indigo deals with the lifetime of a sequence and that this will all come in handy when debugging isses that arise as a result of it - whether in Indigo-to-Indigo or cross-vendor configurations.

Published Friday, September 30, 2005 8:27 PM by onhrebic

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Sunday, November 20, 2005 5:39 AM by Guy Crets

# re: The WS-RM Sequence Lifetime in Indigo

Ondrej,
Very interesting blog. 2 questions/remarks:

1. Why not consider a Sequence like a queue? The sequence is created at deployment time by an Administrator. InactivityTimeOut=0 (forever) and the LastMessage attribute is never used.

2. What I never see is the use of a single sequence for different services: it would be most interesting to do e.g. a CreateCustomer and CreateOrder within the same Sequence. Just as you can send different message types via the same queue.

I welcome your thoughts.

See also http://www.javapolis.com/confluence/display/JP05/Secure+and+Reliable+Web+Services
Wednesday, November 30, 2005 12:40 PM by onhrebic

# re: The WS-RM Sequence Lifetime in Indigo

Hi Guy,

1. The WCF offers two models for reliable messaging. One uses WS-RM and is meant for "live sequences" - those where both parties are up at the same time and actively communicating. We used to call it the "TCP of Indigo." The other one uses MSMQ and behaves exactly like you describe - the queue is created at deployment time and never expires.

2. WS-RM sequences are always created between exactly two endpoints (the sending endpoint's address is the CreateSequence's ReplyTo EPR, the receving endpoint's address is the WSDL address). In WCF, an endpoint is uniquely defined by its EPR, its binding, and its service contract. As such, it wouldn't make sense to have one WS-RM sequence "span" multiple WCF services. Of course, if the CreateCustomer and CreateOrder actions are both exposed on the same contract, one WS-RM sequence will work just fine.

Feel free to post back,
Ondrej
Saturday, January 14, 2006 10:56 AM by Guy Crets

# re: The WS-RM Sequence Lifetime in Indigo

Ondrej,
Thanks for your answers.

1. Still, I would love to have Indigo/WCF support "long lived sequences" without MSMQ.

WS-RX could then be used as the standard for messaging and B2B protocols. WS-RX could then be use as THE messaging protocol. No more MSMQ, proprietary JMS protocols, MQSeries, AS2, ...

I don't really see the purpose of "live sequences". Unless you do SOAP over UDP.

3. And something else: support for clients sitting behind firewalls. There was an initiative from IBM for WS-Polling. Don't know if it is catching on.

Regards, Guy Crets
Wednesday, January 30, 2008 4:54 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

Si proprio <a href='http://www.train.trenibuti.info' >train detto</a> [URL=http://www.sin-bragas.trenibuti.info] stato bragas sin [/URL] ogni anni <a href='http://www.diseno-cocina.trenibuti.info' >diseno altro cocina</a>.

Tuesday, March 04, 2008 6:20 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.dailygmat.com/cognomi] cognomi [/URL]   <a href='http://www.dailygmat.com/cognomi'> cognomi </a>

Tuesday, March 04, 2008 2:02 PM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.dailygmat.com/modelle] modelle [/URL]   <a href='http://www.dailygmat.com/modelle'> modelle </a>

Tuesday, March 04, 2008 8:54 PM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.friland.net/lightscribe-software] lightscribe software [/URL]   <a href='http://www.friland.net/lightscribe-software'> lightscribe software </a>

Wednesday, March 05, 2008 9:54 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.friland.net/ragazze-belle] ragazze belle [/URL]   <a href='http://www.friland.net/ragazze-belle'> ragazze belle </a>

Sunday, March 09, 2008 11:48 PM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.rubesch.com/incontri-segreti] incontri segreti [/URL]   <a href='http://www.rubesch.com/incontri-segreti'> incontri segreti </a>

Friday, March 14, 2008 10:54 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.cedricleroy.com/friuli] friuli [/URL]   <a href='http://www.cedricleroy.com/friuli'> friuli </a>

Friday, March 14, 2008 4:40 PM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.cedricleroy.com/azione-italia] azione italia [/URL]   <a href='http://www.cedricleroy.com/azione-italia'> azione italia </a>

Saturday, March 15, 2008 10:00 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.huraiyth.com/galapagos-vacanza] galapagos vacanza [/URL]   <a href='http://www.huraiyth.com/galapagos-vacanza'> galapagos vacanza </a>

Saturday, March 15, 2008 3:41 PM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.huraiyth.com/piede-donna] piede donna [/URL]   <a href='http://www.huraiyth.com/piede-donna'> piede donna </a>

Sunday, March 16, 2008 10:43 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.betamate.com/appunti-architettura] appunti architettura [/URL]   <a href='http://www.betamate.com/appunti-architettura'> appunti architettura </a>

Sunday, March 16, 2008 11:06 PM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.ncfliving.net/penne-stilografiche] penne stilografiche [/URL]   <a href='http://www.ncfliving.net/penne-stilografiche'> penne stilografiche </a>

Monday, March 17, 2008 5:01 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.key4fun.com/cassa-edile] cassa edile [/URL]   <a href='http://www.key4fun.com/cassa-edile'> cassa edile </a>

Tuesday, March 18, 2008 1:07 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.fxtend.net/rossignol] rossignol [/URL]   <a href='http://www.fxtend.net/rossignol'> rossignol </a>

Tuesday, March 18, 2008 6:01 PM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.michaelsteven.net/volo-nice-cote-d-azur] volo nice cote d azur [/URL]   <a href='http://www.michaelsteven.net/volo-nice-cote-d-azur'> volo nice cote d azur </a>

Wednesday, March 19, 2008 12:58 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

Thursday, March 20, 2008 11:07 AM by zxevil165

# re: The WS-RM Sequence Lifetime in Indigo

Saturday, April 19, 2008 5:40 AM by ...

# re: The WS-RM Sequence Lifetime in Indigo

[URL=http://www.albudab.org/paris-champs-elysees.php] Paris champs elysees [/URL]   <a href='http://www.albudab.org/paris-champs-elysees.php'> Paris champs elysees </a>

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker