Subject: [Simple] Comparing CPIM and SIP MESSAGE

From: "Petri K. Koskelainen" <[email-masked]>
Date: Fri, 5 Oct 2001 10:32:46 -0400 (EDT)

There have been a lot of statements that SIP has far more overhead 
than CPIM. This is absolutely not true. See examples below:
Sending an IM with "hello world!". 

CPIM example taken from cpim-draft.
It has probably some not-so-important headers like MyFeatures*.
Note that at least Subject and Date CPIM header have new syntax
so this is incompatibility with SIP spec.

It seems that they have similar message size, depending whether
some special headers are used. In many cases CPIM has more 
overhead than SIP.

So, I don't think that message size or unnecessary headers 
are an issue here. 
Also, CPIM is still work-in-progress while SIP is ready and will
surely be implemented everywhere.

CPIM example:

m: Content-type: message/cpim
s:
h: From: MR SANDERS <im:[email-masked]>
h: To: Depressed Donkey <im:[email-masked]>
h: Date: 2000-12-13T13:40:00-08:00
h: Subject: the weather will be fine today
h: Subject:;lang=fr beau temps prevu pour aujourd'hui
h: NS: MyFeatures <mid:[email-masked]>
h: Require: MyFeatures.VitalMessageOption
h: MyFeatures.VitalMessageOption: Confirmation-requested
h: MyFeatures.WackyMessageOption: Use-silly-font
s:
e: Content-type: text/xml; charset=utf-8
e: Content-ID: <[email-masked]>
e:
e: <body>
e: Hello World!
e: </body>

Similar example with SIP MESSAGE:

MESSAGE sip:[email-masked] SIP/2.0
Via: SIP/2.0/UDP 128.59.19.106:5060
CSeq: 1 MESSAGE
Contact: sip:[email-masked]:5060
From: MR SANDERS <im:[email-masked]>
Date: Fri, 05 Oct 2001 14:16:58 GMT
Call-ID: [email-masked]
Content-Type: text/plain
To: Depressed Donkey <sip:[email-masked]>
Content-Length: 13

Hello world!

--
Petri

---

From: Ben Campbell <[email-masked]>
Date: Fri, 05 Oct 2001 09:55:26 -0500

You comparison uses optional meta-data in the cpim example (not to 
mention an xml body part), but only required headers in the MESSAGE 
example, so it is hardly a fair comparison. A closer example (I've taken 
the liberty of removing the only Contact: from the SIP example, since it 
is the only header that I think is not required here):

CPIM example:

Content-type: message/cpim

From: MR SANDERS <im:[email-masked]>
To: Depressed Donkey <im:[email-masked]>
Date: 2000-12-13T13:40:00-08:00
Content-type: text/plain; charset=utf-8

Hello world!

Hello world!

Note that 3 of the required SIP headers and the start line are there for 
transport reasons, and are not relevant here. But they are still 
required by the SIP spec. We _could_ come up with a relaxed SIP spec for 
this, but that would basically be the same as defining a new message format.

Petri K. Koskelainen wrote:

> _______________________________________________
> simple mailing list
> [email-masked]
> http://mailman.dynamicsoft.com/mailman/listinfo/simple
>

---

From: "Petri K. Koskelainen" <[email-masked]>
Date: Fri, 5 Oct 2001 11:23:22 -0400 (EDT)

> example, so it is hardly a fair comparison. A closer example (I've taken 

You are right, I just took it directly from cpim-draft.

Anyway, in high-speed links this minor overhead is not an issue
and in low-speed links there will (in most cases) be compression
which eliminates the overhead. So I don't think that
the message size is an issue here.

Also, some people have proposed that CPIM is carried in SIP
payload. This means that there are duplicate headers and
information. 

Also, as said earlier, CPIM borrows some headers from SIP
but they have different syntax and CPIM-draft is still 
work-in-progress. Also, full CPIM parser is probably needed
unless we define a subset "CPIM format for IM" which does not
use any extensions.

Therefore, I vote for SIP MESSAGE format.

--
Petri