Re: [Forces-protocol] Data Encoding

Jamal Hadi Salim <hadi@znyx.com> Wed, 17 November 2004 16:02 UTC

Received: from ietf-mx.ietf.org (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id LAA11855 for <forces-protocol-web-archive@ietf.org>; Wed, 17 Nov 2004 11:02:06 -0500 (EST)
Received: from megatron.ietf.org ([132.151.6.71]) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CUSIR-0004N1-Nf for forces-protocol-web-archive@ietf.org; Wed, 17 Nov 2004 11:04:40 -0500
Received: from localhost.localdomain ([127.0.0.1] helo=megatron.ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CUS9C-0000ie-5h; Wed, 17 Nov 2004 10:55:06 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CUS5Q-00084m-Pj for forces-protocol@megatron.ietf.org; Wed, 17 Nov 2004 10:51:13 -0500
Received: from ietf-mx.ietf.org (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id KAA10914 for <forces-protocol@ietf.org>; Wed, 17 Nov 2004 10:51:10 -0500 (EST)
Received: from znx208-2-156-007.znyx.com ([208.2.156.7] helo=lotus.znyx.com) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CUS7r-000483-Vn for forces-protocol@ietf.org; Wed, 17 Nov 2004 10:53:44 -0500
Received: from loopback ([208.2.156.2]) by lotus.znyx.com (Lotus Domino Release 5.0.11) with ESMTP id 2004111707544571:26201 ; Wed, 17 Nov 2004 07:54:45 -0800
Subject: Re: [Forces-protocol] Data Encoding
From: Jamal Hadi Salim <hadi@znyx.com>
To: Weiming Wang <wmwang@mail.hzic.edu.cn>
In-Reply-To: <002501c4ccb4$809d2b60$020aa8c0@wwm1>
References: ocaldomain><009e01c4cb24$ba144bd0$020aa8c0@wwm1> <1100610279.1152.33.camel@jzny.localdomain> <002501c4ccb4$809d2b60$020aa8c0@wwm1>
Organization: ZNYX Networks
Message-Id: <1100702562.1140.75.camel@jzny.localdomain>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2
Date: 17 Nov 2004 09:42:43 -0500
X-MIMETrack: Itemize by SMTP Server on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 11/17/2004 07:54:46 AM, Serialize by Router on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 11/17/2004 07:54:56 AM, Serialize complete at 11/17/2004 07:54:56 AM
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 0fa76816851382eb71b0a882ccdc29ac
Content-Transfer-Encoding: 7bit
Cc: "\(Ram Gopal \)" <ram.gopal@nokia.com>, Steve Blake <slblake@petri-meat.com>, "Joel M. Halpern" <joel@stevecrocker.com>, Dong Ligang <donglg@mail.hzic.edu.cn>, "Khosravi, Hormuzd M" <hormuzd.m.khosravi@intel.com>, Avri Doria <avri@acm.org>, forces-protocol@ietf.org, Patrick Droz <dro@zurich.ibm.com>, zsolt@modularnet.com, David.Putzolu@intel.com, Robert Haas <rha@zurich.ibm.com>
X-BeenThere: forces-protocol@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: hadi@znyx.com
List-Id: forces-protocol <forces-protocol.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/forces-protocol>, <mailto:forces-protocol-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/forces-protocol>
List-Post: <mailto:forces-protocol@ietf.org>
List-Help: <mailto:forces-protocol-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/forces-protocol>, <mailto:forces-protocol-request@ietf.org?subject=subscribe>
Sender: forces-protocol-bounces@ietf.org
Errors-To: forces-protocol-bounces@ietf.org
X-Spam-Score: 0.0 (/)
X-Scan-Signature: b280b4db656c3ca28dd62e5e0b03daa8
Content-Transfer-Encoding: 7bit

Weiming/Joel,

On Wed, 2004-11-17 at 09:48, Weiming Wang wrote:

> [Weiming]My thought on this is, we do not have to recognize if it is a KEY or
> not. It's just a kind of element in a path.

Ok, then we need a path TLV. And as Joel has been pushing for eons now,
separate the path from data; but allow recursive relationship.

> > Lets defer your idea of decomposing the ID above for now. I think we can
> > still achieve the goals without it.
> [Weiming]By separate the fieldIDs from Indexes, as Joel just proposed? I just
> have a worry on this expression. Pls see my reply to Joel.

I am not quiet sure i have parsed what you and Joel are talking about.
My approach may even be a third one.

> > Of course we could make KEY_DATA a TLV so we can have variable sized
> > DATA for a KEY, eg to repeat above:
> >
> > Path=4
> > T=KEY_INFO, length = 4 + xx
> >    T=1,  Length= 4 + 4 // 1 is ID for j1
> >    V = 100
> >    T=2, L = 4 + 4
> >    V = 200
> >
> > The above wastes 4 bytes per value because of TLV and is clearly more
> > complex to parse, but we could say thats the cost of doing this.
> [Weiming]This still applies to where KEY is with one ID, not with multiple level
> IDs as 1.2.
> 

To solve that we need something that allows variable path (in addition
to variable data) like:

T=PATH, Length = ZZ
  flags(16bit)=0 IDcount(16bit)=1, ID=4
  T=KEY_INFO, Length = xx
    T=PATH, Length = 4+4
      flags(16bit)=0 IDcount(16bit)=1, ID=1 //j1
    T=DATA, Length = 4+4
      V=100
    T=PATH, Length = 4+4
      flags(16bit)=0 IDcount(16bit)=1, ID=2 //j2
    T=DATA, Length = 4+4
      V=100

Essentially, KEY_INFO contains some content/data as well and reuses
PATH and DATA TLVs. So there could be a nested PATH/DATA pair.
Like i said this maybe the third view (with other two being what you and
Joel are saying)

Essentially grammar becomes:

OPER_TLV : = <PATH-DATA>
PATH-DATA := <PATH_TLV> [PATH_EXTENSIONS] [DATA]
PATH_TLV := flags IDcount <IDs>
PATH_EXTENSIONS := BLOCK_NOTATION | KEY_INFO
KEY_INFO := PATH-DATA
BLOCK_NOTATION :=   BLOCK_RANGE_INDEX_TLV | 
                    BLOCK_COUNT_INDEX_TLV |                
                    BLOCK_LIST_INDEX TLV

We dont distinguish between indices and IDs

I havent thought clearly about this but the recursive nature may
introduce loops. 

Thoughts?

cheers,
jamal




_______________________________________________
Forces-protocol mailing list
Forces-protocol@ietf.org
https://www1.ietf.org/mailman/listinfo/forces-protocol