Subject: RE: OCP - Transaction End (TE)

From: "Stecher,Martin" <[email-masked]>
Date: Wed, 7 Feb 2007 08:58:08 +0100

Hi Martin,

I didn't look up my notes now but trying to remember what we discussed: 

Both agents are allowed to end a transaction at any time.
Messages can be sent at any time from any peer. There is no way to control
that client and server
do not send their TE messages simulatinously.

When an agent sends a TE message it will free the data it has associated
with this transaction.
Still in many cases it will receive messages for this transaction from the
other peer.
But those messages do then belong to an unknown transaction and therefore
must be ignored.
So, whether the other peer sends a TE or not is irrelevant.

I think, it would be at least good practice if an agent sends a TE when
it is done with the transaction, no matter how this decision has been done,
even it is convinced
that the peer has already sent his TE. Sending its own TE does not harm but
if no side is sending
a TE we have a problem. That's why all examples I did have a TE from both
ends.

Regards
Martin Stecher

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]] On Behalf Of Martin Thelian
> Sent: Dienstag, 6. Februar 2007 16:17
> To: Openproxy
> Subject: OCP - Transaction End (TE)
> 
> 
> Hi!
> 
> I have a question regarding the Transaction-End (TE) message 
> of the OPES callout-protocol.
> 
> It is unclear to me whether both OCP-agents have to send a TE 
> message, or if the transaction is terminated with the first 
> TE-message send or received. Is this an XOR or an OR disjunction?
> 
> I've found the following statements in rfc-4037 (OCP-core):
> > 2.5.  Termination
> > [...]   
> >    Usually, the callout server terminates adapted 
> application message
> >    delivery and the transaction.
> > [...]
> >
> > 4.  Transactions
> > [...]
> >    The OPES processor or the callout server can terminate the 
> >    transaction by sending a corresponding message to the other side.
> > [...]
> >    A transaction ends with the first Transaction End (TE) 
> message sent 
> >    or received, explicit or implied.  A TE message can be sent by 
> >    either side.
> > [...]
> >    The figure below illustrates a possible message sequence [...]
> >    P: TS 10;
> >    P: AMS 10 1;
> >       ... processor sending application data to the callout server
> >    S: AMS 10 2;
> >       ... callout server sending application data to the processor
> >       ... processor sending application data to the callout server
> >    P: AME 10 1 result;
> >    S: AME 10 2 result;
> >    P: TE 10 result;
> > [...]
> >
> > 11.5.  Transaction Start (TS)
> > [...]
> >    A callout server MUST maintain the state until it 
> receives a message
> >    indicating the end of the transaction or until it terminates the
> >    transaction itself.
> > [...]
> >
> > 11.6.  Transaction End (TE)
> > [...]
> >    An OCP agent MUST send a Transaction End (TE) message immediately
> >    after it makes a decision to send no more messages related to the
> >    corresponding transaction.
> >   
> So, most parts of the RFC - especially the example shown in 
> chapter 4, indicate that this is an XOR, but chapter 11.6 
> does not clarify this.
> 
> But in the message flow examples shown in RFC4236 (OCP HTTP 
> profile), both agents are sending TE messages to the other endpoint.
> 
> Can someone explain me what's the correct usage of the TE 
> message? Thanks.
> 
> Regards,
> Martin Thelian
> 
>

---

From: "Martin Thelian" <[email-masked]>
Date: Wed, 07 Feb 2007 15:04:49 +0100

Hi!

I also think that both side should send a TE message immediately after they do not want to send any further data (as described in the rfc), but to free the data associated with the whole transaction could cause trouble.

Let's assume a service that appends some data to the original stream. If the OPES-processor sends a TE message after it has finished data-transmission, the service could never finish the delivery of the adapted stream, because the OPES-processor has no data about the transaction anymore.

And what if e.g. the callout-server terminates the transaction with an error while the processor is still sending data. What statuscode should then be used by the processor for its TE message?

By the way the rfc specifies:
|> An OCP agent MUST send a Transaction End (TE) message immediately
|> after it makes a decision to send no more messages related to the
|> corresponding transaction. 

Please note the "to send no more messages". But does that mean that the agent does not want to _receive_ data related to the transaction anymore?

Regards,
Martin Thelian

-------- Original-Nachricht --------
Datum: Wed, 7 Feb 2007 08:58:08 +0100
Von: "Stecher,Martin" <[email-masked]>
An: "Martin Thelian" <[email-masked]>, "Openproxy" <[email-masked]>
CC: 
Betreff: RE: OCP - Transaction End (TE)

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail?ac=OM.GX.GX003K11713T4783a