[Forces-protocol] Data Encoding

"Weiming Wang" <wmwang@mail.hzic.edu.cn> Mon, 15 November 2004 15:11 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 KAA01167 for <forces-protocol-web-archive@ietf.org>; Mon, 15 Nov 2004 10:11:59 -0500 (EST)
Received: from megatron.ietf.org ([132.151.6.71]) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CTiYQ-0000a7-Hl for forces-protocol-web-archive@ietf.org; Mon, 15 Nov 2004 10:14:06 -0500
Received: from localhost.localdomain ([127.0.0.1] helo=megatron.ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CTiVb-0000m8-2L; Mon, 15 Nov 2004 10:11:11 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CTiSB-0007u5-Tt for forces-protocol@megatron.ietf.org; Mon, 15 Nov 2004 10:07:40 -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 KAA00487 for <forces-protocol@ietf.org>; Mon, 15 Nov 2004 10:07:37 -0500 (EST)
Received: from [202.96.99.56] (helo=202.96.99.56) by ietf-mx.ietf.org with smtp (Exim 4.33) id 1CTiRg-0000Pg-Mj for forces-protocol@ietf.org; Mon, 15 Nov 2004 10:09:45 -0500
Received: from [202.96.99.59] by 202.96.99.56 with StormMail ESMTP id 58110.341813895; Mon, 15 Nov 2004 23:27:29 +0800 (CST)
Received: from wwm1 (unverified [219.82.181.128]) by mail.gsu.cn (Rockliffe SMTPRA 6.0.11) with ESMTP id <B0000113398@mail.gsu.cn>; Mon, 15 Nov 2004 23:01:38 +0800
Message-ID: <009e01c4cb24$ba144bd0$020aa8c0@wwm1>
From: Weiming Wang <wmwang@mail.hzic.edu.cn>
To: hadi@znyx.com, "Joel M. Halpern" <joel@stevecrocker.com>
References: <4189F776.4080306@zurich.ibm.com> <00bd01c4c536$fb418ee0$020aa8c0@wwm1> <1099885892.2167.13.camel@jzny.localdomain> <132001c4c551$86023150$845c21d2@Necom.hzic.edu.cn> <1099911200.2169.29.camel@jzny.localdomain> <134f01c4c585$216584c0$845c21d2@Necom.hzic.edu.cn> <4191299F.4020809@zurich.ibm.com> <142a01c4c6d6$13569980$845c21d2@Necom.hzic.edu.cn> <1100100893.2210.24.camel@jzny.localdomain> <14fc01c4c79f$75231f20$845c21d2@Necom.hzic.edu.cn> <6.1.2.0.0.20041111091015.03bafec0@localhost> <155001c4c8c0$5eb73ec0$845c21d2@Necom.hzic.edu.cn> <1100269665.1106.30.camel@jzny.localdomain> <156501c4c8c5$1fb19220$845c21d2@Necom.hzic.edu.cn> <1100271071.1109.38.camel@jzny.localdomain> <1100307886.1110.20.camel@jzny.localdomain> <6.1.2.0.0.20041112220931.03c89ec0@localhost> <009a01c4c934$99cf7990$020aa8c0@wwm1> <6.1.2.0.0.20041112230835.03f0b0f0@localhost> <1100381538.2212.914.camel@jzny.localdomain> <6.1.2.0.0.20041113170557.03b05e00@localhost> <1100458281.2327.23.camel@jzny.l! ocaldomain>
Date: Mon, 15 Nov 2004 23:06:35 +0800
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Spam-Score: 0.4 (/)
X-Scan-Signature: 287c806b254c6353fcb09ee0e53bbc5e
Cc: "Khosravi, Hormuzd M" <hormuzd.m.khosravi@intel.com>, "(Ram Gopal )" <ram.gopal@nokia.com>, Avri Doria <avri@acm.org>, forces-protocol@ietf.org, Patrick Droz <dro@zurich.ibm.com>, zsolt@modularnet.com, slblake@petri-meat.com, David.Putzolu@intel.com, Dong Ligang <donglg@mail.hzic.edu.cn>, Robert Haas <rha@zurich.ibm.com>
Subject: [Forces-protocol] Data Encoding
X-BeenThere: forces-protocol@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
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.4 (/)
X-Scan-Signature: 36c793b20164cfe75332aa66ddb21196

Jamal,  Joel as well,

Good, I'l try to follow the example in the doc. I'm just trying to raise some
question in the line actually trying to show my view further.

To summarize, I strongly believe the Data field should allow IDs other than pure
values. I think in the examples Jamal also has shown some cases where Data are
not pure values (including index, field ids).

Regarding using Data encoding without IDs,  I really have a feeling that it is
more dangerous than with IDs. Note one bit error produced by programmer (e.g.,
mistaken one u32 to u64 and another u64 to 32) will result in the total failure
for the whole Data and the error is hard to be debugged (no IDs to verify it).
One more question is the appearing sequence also become important with this
approach, which makes the FE model schema sequence sensetive. This is really
inconvenient.

I'm trying to add Steve and Zsolt in the list (but seems Steve's server always
takes my post as spam:( .  ).

Cheers,
Weiming
---------------------
OPER_TLV : = <PATH-DATA>
PATH-DATA := flags IDcount <IDs> [BLOCK_OR_KEY_NOTATION] [DATA]
[Weiming]Why don't we just set the PATH as a TLV?

-> IDs := a series of 32bit IDs (whose size is given by IDcount) defining the
path.
[Weiming] Obviously, we need a flag to indicate the ID being index(subscript) or
field ID as
    ID:= flag(1bit)  Index(31bit) | fieldID(31bit)
    flag:=0(fieldID) | 1(index)
[/Weiming]

Assume LFB with following attributes

foo1, type u32, ID = 1

foo2, type u32, ID = 2

table2: type array, ID = 4
 elements are:
 j1, type u32, ID = 1
 j2, type u32, ID = 2
[Weiming] Let me add one more field as
 j3, type u32, ID=3

Then, very often, we may have operations as:

1) delete(or get ) all entries with j1=100, and j2=200 (note j3 is not cared)
2) modify entry with index=10 to j1=100, and j2=200 (note j3 is not to be
changed)

If we allow field ID in Data, this can be expressed easily. I just see some
difficulty using the encoding you and Joel proposed. For 2) you may say it can
be done by using two separate Path-data, but I just think this way is very
tedious, saying if we have 10 fields more. If we allow field ID in data, it can
be tidily expressed.
[/Weiming]

table1: type array, ID = 3
 elements are:
 t1, type u32, ID = 1
 t2, type u32, ID = 2  // index into table 2

[Weiming] I think a compund structural type is very common, which should be
instanced  in the example.  Let me show one as:

foo3, type structure, ID=5
{
    s1, type u32, ID=1
    s2, type structure, ID=2
    {
        g1, type u32, ID=1
        g2, type u32, ID=2
    }
 }

For this type, we then may also have very common operations as:
        Modify s1 to 100 and g1 to 200.
I also see some tidious problem if we don't allow field ID in the DataTLV.
[/Weiming]

1) To get foo1
Path IDs = 1

Result:
Path = 1, DATA_TLV with value of foo1

2) to set foo2 to 10
Path IDs = 2
DATA_TLV: L = 4+4, V=10

3) To dump table2 (get)
Path = 4

Result:
Path = 4
DATA_TLV, Length = 4 + (#of entries in table2)(8+4)
This is followed by data of the form:
subscript,j1value,j2value (subscript is 4 bytes, j1 + j2 is 8 bytes)

Note the above allows for holes in subscripts, i.e if subscript is
not in use it doesnt take space
[Weiming] Note that some tables may or may not have subscript, above format will
then result in ambiguity in semantics. If we uniformly ask IDs in Data, no such
problem then.



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