Subject: [Simple] COMEDIA vs MSRP Relays: Shared Connections

From: Ben Campbell <[email-masked]>
Date: Mon, 20 Jul 2009 16:14:29 -0500

(As individual)

We've had quite a bit of discussion about how the Transport Connection  
Addressing Section (draft-ietf-simple-msrp-acm-00 section 4.2) may or  
may not work with MSRP relays. I'd like to make sure we're not  
neglecting how the COMEDIA Usage section (Section 4.1 and children)  
interact with MSRP relays.

I think there are some open questions. Since each one seems likely to  
generate a thread of discussion, I'm sending them separately:

How does the COMEDIA negotiation interact with the TCP-connection- 
sharing features of MSRP? We negotiate sessions in the SDP offer/ 
answer, not connections per se. COMEDIA implicitly assumes a one-to- 
one correspondence between these, but MSRP explicitly allows multiple  
sessions to use the same TCP connection.

I can see two approaches. One would be that the COMEDIA attributes are  
only relevant if you have to create a new connection. If a reusable  
connection already exists, you just use it. Alternatively, we could  
state that a connection is only reuseable if it's direction matches  
the COMEDIA attributes, and if devices wanted to reuse an existing  
connection, they would either omit COMEDIA entirely, or choose COMEDIA  
attributes that match the connection.

Neither of those approaches seems obviously wrong to me. I suspect  
there may be some traps here, though--we should analyze this pretty  
closely.

---

From: Hadriel Kaplan <[email-masked]>
Date: Tue, 21 Jul 2009 18:14:42 -0400

I'm not sure I follow you - Comedia has a "connection:existing" attribute setting to re-use the same connection (e.g., in a new offer).  Or do you mean of two separate media m= lines?

-hadriel

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf
> Of Ben Campbell
> 
> _______________________________________________
> Simple mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/simple

---

From: Ben Campbell <[email-masked]>
Date: Tue, 21 Jul 2009 17:31:21 -0500

On Jul 21, 2009, at 5:14 PM, Hadriel Kaplan wrote:

>
> I'm not sure I follow you - Comedia has a "connection:existing"  
> attribute setting to re-use the same connection (e.g., in a new  
> offer).  Or do you mean of two separate media m= lines?

You are right of course. Brain fart on my part. However, the draft  
should probably mention how to apply this--the only reference I see to  
connection:existing is in the ICE section.

---

From: "Christer Holmberg" <[email-masked]>
Date: Wed, 22 Jul 2009 01:02:21 +0200

Hi,
 
Section 4.1.3 talks about the connection attribute.
 
Regards,
 
Christer

________________________________

From: [email-masked] on behalf of Ben Campbell
Sent: Wed 22/07/2009 00:31
To: Hadriel Kaplan
Cc: Simple WG
Subject: Re: [Simple] COMEDIA vs MSRP Relays: Shared Connections

---

From: Ben Campbell <[email-masked]>
Date: Tue, 21 Jul 2009 18:18:55 -0500

On Jul 21, 2009, at 5:31 PM, Ben Campbell wrote:

> should probably mention how to apply this--the only reference I see  
> to connection:existing is in the ICE section.
>
>

Wait, I remember why I brought this up--if a peer is behind an MSRP  
relay, how is it to know whether a reuseable connection already exists  
downstream of that relay?

---

From: Ben Campbell <[email-masked]>
Date: Tue, 21 Jul 2009 18:23:58 -0500

> Section 4.1.3 talks about the connection attribute.

Oops, you are right. My text search fu is weak today.

But note my other comment concerning shared connections downstream of  
a relay.

---

From: "Christer Holmberg" <[email-masked]>
Date: Wed, 22 Jul 2009 10:27:22 +0200

Hi, 

>downstream of that relay?

Even if it knows, how would it tell the relay whether to actually reuse
that connection? I guess that would require some new information
element.

Note, however, that according to section 4.1.3, connection re-use is not
used for initial offer/answers, only for re-negotiations.

In any case, I can add something about this to my presentation.

Regards,

Christer

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 27 Jul 2009 15:27:16 +0200

Hi,

More on this. 

>>>should probably mention how to apply this--the only reference I see
to
>Even if it knows, how would it tell the relay whether to actually reuse
that connection? I guess that would require some 
>new information element.

We also need to think about the meaning of a=connection.

According to my understanding (I guess we can verify that with the
authors) of comedia, a=connection is not used to indicate that one can
use "any existing TCP connection" towards a specific destination.

My understanding is that a=connection is used during a session
modification, to indicate whether the existing TCP connection for that
specific session should be re-used (if possible) or not. So, for a
specific session, the change of address would always trigger a new TCP
connection - even if there exist TCP connections to the same address for
OTHER sessions.

Or?

>Note, however, that according to section 4.1.3, connection re-use is
not used for initial offer/answers, only for re-
>negotiations.

So, for session establishment, there is currently no difference between
ACM and 4975 - if there is a TCP connection to a specific address, then
use it. 

For 4975, I assume the same applies for session modifications
(eventhough 4975 doesn't explicitly says much about session
modifications)...

ACM currently specifies the usage of a=connection for session
modifications, in accordance with comedia.

So, IF we a=connection to work with relays, I guess we would need to
provide the information to the relay inside the MSRP message.

Again, I will add something about this to my presentation.

Regards,

Christer

>>> From: [email-masked] [mailto:[email-masked]] On 
>>> Behalf Of Ben Campbell
>>>

>>> one correspondence between these, but MSRP explicitly allows 
>>> multiple sessions to use the same TCP connection.
>>>
>>> I can see two approaches. One would be that the COMEDIA attributes 
>>> are only relevant if you have to create a new connection. If a 
>>> reusable connection already exists, you just use it. Alternatively, 
>>> we could state that a connection is only reuseable if it's direction

>>> matches the COMEDIA attributes, and if devices wanted to reuse an 
>>> existing connection, they would either omit COMEDIA entirely, or 
>>> choose COMEDIA attributes that match the connection.
>>>

---

From: Ben Campbell <[email-masked]>
Date: Mon, 27 Jul 2009 15:56:24 +0200

> not used for initial offer/answers, only for re-

My read of COMEDIA agrees with yours. It's not clear to me if the  
connection attribute applies at all--RFC4975 says if there is already  
an connection associated with the same host, port, and URI scheme, it  
SHOULD reuse it.  COMEDIA doesn't appear to have been written with  
that sort of thing in mind. I am leaning (not strongly) towards  
suggesting we ignore the COMEDIA connection attribute and just do what  
an MSRP client would normally do, at least for this purpose.

> (eventhough 4975 doesn't explicitly says much about session

You are right, it doesn't say much. I agree that the same would apply  
here. Also, I think all of this so far is the same with or without  
relays.

> provide the information to the relay inside the MSRP message.

I'm not sure I follow--what would you conceptually be telling the relay?

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 27 Jul 2009 16:05:48 +0200

>>So, for session establishment, there is currently no difference 
>>between ACM and 4975 - if there is a TCP connection to a specific 

You would be telling that a session modification has occurred (the
remote address hasn't changed), and whether the relay can continue to
use the existing TCP connection for the session, or whether it should
create a new one.

Ie the client would tell the relay exactly what the client was told in
the session modification SDP.

Regards,

Christer

---

From: Ben Campbell <[email-masked]>
Date: Mon, 27 Jul 2009 16:14:21 +0200

> the session modification SDP.

So, why would we ever need to explicitly signal (in SDP) that a relay  
(or an endpoint for that matter) needs to create a new connection  
instead of reusing an appropriate existing one?

---

From: "Christer Holmberg" <[email-masked]>
Date: Mon, 27 Jul 2009 16:28:10 +0200

Hi,

>So, why would we ever need to explicitly signal (in SDP) that a relay
(or an endpoint for that matter) needs to create a >new connection
instead of reusing an appropriate existing one?

That you would have to ask the people who defined the a=connection
attribute in the first place :) The ACM simply uses it in order to be
compliant with comedia.

Unfortunately I don't remember the use-case discussions etc from the
time comedia was done, but I guess we can check whether the comedia spec
says something about it. 

Regards,

Christer

---

From: Hadriel Kaplan <[email-masked]>
Date: Tue, 28 Jul 2009 11:47:35 -0400

> instead of reusing an appropriate existing one?

I don't know why the authors did it, but I can guess or some up with a plausible story: Comedia was supposed to be agnostic of the "media" being sent or its usage.  So imagine if you were doing file transfers with SIP.  If you sent a re-Invite for a new file, you'd want a new TCP connection for it, if your transfer did not have a framing/control layer in that TCP connection itself to keep the files apart.

-hadriel