[2] RE: [Forces-protocol] RE: GET/SET in one msg ?
Jamal Hadi Salim <hadi@znyx.com> Sun, 17 October 2004 15:21 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 LAA00128 for <forces-protocol-web-archive@ietf.org>; Sun, 17 Oct 2004 11:21:04 -0400 (EDT)
Received: from megatron.ietf.org ([132.151.6.71]) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CJD27-0001HX-5J for forces-protocol-web-archive@ietf.org; Sun, 17 Oct 2004 11:33:19 -0400
Received: from localhost.localdomain ([127.0.0.1] helo=megatron.ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CJCoO-0003wK-OX; Sun, 17 Oct 2004 11:19:08 -0400
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CJCnq-0003pg-Or for forces-protocol@megatron.ietf.org; Sun, 17 Oct 2004 11:18:35 -0400
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 LAA29983 for <forces-protocol@ietf.org>; Sun, 17 Oct 2004 11:18:32 -0400 (EDT)
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 1CJCze-0001Fj-KG for forces-protocol@ietf.org; Sun, 17 Oct 2004 11:30:47 -0400
Received: from [127.0.0.1] ([208.2.156.2]) by lotus.znyx.com (Lotus Domino Release 5.0.11) with ESMTP id 2004101708210696:31033 ; Sun, 17 Oct 2004 08:21:06 -0700
Subject: [2] RE: [Forces-protocol] RE: GET/SET in one msg ?
From: Jamal Hadi Salim <hadi@znyx.com>
To: zsolt@nc.rr.com
In-Reply-To: <1097984736.2681.210.camel@localhost.localdomain>
References: <468F3FDA28AA87429AD807992E22D07E02E985A6@orsmsx408> <1097900642.19064.13.camel@localhost.localdomain> <1097927770.1043.35.camel@jzny.localdomain> <1097940541.1043.51.camel@jzny.localdomain> <1097984736.2681.210.camel@localhost.localdomain>
Organization: ZNYX Networks
Message-Id: <1098026308.1043.115.camel@jzny.localdomain>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2
Date: Sun, 17 Oct 2004 11:18:29 -0400
X-MIMETrack: Itemize by SMTP Server on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 10/17/2004 08:21:08 AM, Serialize by Router on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 10/17/2004 08:21:09 AM, Serialize complete at 10/17/2004 08:21:09 AM
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 343d06d914165ffd9d590a64755216ca
Content-Transfer-Encoding: 7bit
Cc: "Khosravi, Hormuzd M" <hormuzd.m.khosravi@intel.com>, "Joel M. Halpern" <jhalpern@megisto.com>, ram.gopal@nokia.com, forces-protocol@ietf.org, "Steven Blake (petri-meat)" <slblake@petri-meat.com>, Alan DeKok <alan.dekok@idt.com>, Ellen M Deleganes <ellen.m.deleganes@intel.com>, "Yang, Lily L" <lily.l.yang@intel.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: c0aa019322dfce838bd8604f5a841b57
Content-Transfer-Encoding: 7bit
On Sat, 2004-10-16 at 23:45, Zsolt Haraszti wrote: > On Sat, 2004-10-16 at 11:29, Jamal Hadi Salim wrote: > Assuming the SET/ADD/DEL CONFIG-REQUEST operators (I use ADD > here instead of INS, because I slightly prefer ADD over INS; > but otherwise it has the same meaning as INS in all previous > discussions), all we need for the above purpose is a single flag: > F_PEDANTIC (or F_PICKY). (We can choose the inverse meaning, but > I could not come up with a good word to describe that...) If you assume BSDism (probably std database table manipulation) then a single flag is insufficient. You need the equivalent of EXCL and REPLACE. i.e an ADD with EXCL|REPLACE to a table implies create and update with passed values. This allows you to at times just create and have default values populated. You seem to be saying a ADD = CREATEing an element and a SET is an update to an existing entry? > Before further discussing the meaning of this flag, a couple of > notes: > > 1. For SET operations this flag plays a role only if path > refers to an entry in an ARRAY data element, i.e., when > path[:-1] refers to an ARRAY (in which case path[-1] is the > index to be used inside the ARRAY). In all other cases the flag > must be ignored. > We may be on the same page, you are refering to non-terminal in this case. > (Notation hint: path refers to the list of IDs, path[-1] refers > to the last element of the list, and path[:-1] means the > first part of the list without the last element.) > > So the meaning of the flag in this scope is as follows: > > if element[path] exists: > element[path] = data > report success/failure of assignment > else: > if OP_FLAGS & F_PEDANTIC: > report error > else: > # attempt to add new element to array: > add(element[path[:-1]], # ARRAY > index=path[-1], # INDEX > value=data) # initial value > report success/failure of assignment > > In words, if F_PEDANTIC is cleared, create entry if it > does not yet exist. If F_PEDANTIC is set, report error > if entry does not yet exist. > Ok, now i am sure we mean the same thing, except you have separated update from create. I think it is valuable to keep them together. > 2. For ADD/DEL operations: > We will have actually two forms of ADD/DEL operations: > a One where path specifies the entry in an ARRAY which is > to be added/deleted, i.e., path[-1] is the entry index > within the ARRAY, and path[:-1] is the reference to the > ARRAY itself. > b Another where path refers to the ARRAY itself and the > index/indices of the entries to be added/removed are given > as part of the [block] description. (For the ADD the > indices may not be provided at all, in which case the FE > can pick the indices; a.k.a. INS vs. INS_IDX.) > Obviously this b) form is meant for block operations, > though b. can do what a. can. I still would like to > allow both forms because in single-entry operations the > a. form is more staright-forward. > > BTW, we will have to signal in the OP TLV header > which form we mean, because in the special case when > both path[:-1] and path refer to an ARRAY (i.e., path[:-1] > is an ARRAY of ARRAYs), the above two forms collide. This > can be done via an F_BLOCK flag indicating b. when set, > or separate SET/SET-BLOCK, ADD/ADD-BLOCK, and DEL/DEL-BLOCK > operations (T's). Flags are OK. > > Now, the meaning of the F_PEDANTIC flag (assuming the above > scope conditions are satisfied) is as follows: > > For ADD as in a.: > > if element[path] does not exists: > add(element[path[:-1]], # ARRAY > index=path[-1], # index > valude=data) # initial value > report success/failure of assignment > else: > if OP_FLAGS & F_PEDANTIC: > report error > else: > element[path] = data # over-write element value > report success/failure of assignment > > For ADD as in b.: > > for index in BLOCK: # Take each index specified in BLOCK > # Do the same as above pseudo code, but replace > # path with path+index, path[:-1] with path, > # and path[-1] with index > if element[path + index,] exists: > add(element[path], index, data) > report success/failure > else: > if OP_FLAGS & F_PEDANTIC: > report error > else: > element[path + index,] = data > report success/failure > > For DEL as in a.: > > if element[path] exists: > del(element[path[:-1]], index=path[-1]) > report error > else: > if OP_FLAGS & F_PEDANTIC: > report error > else: > report success > > For DEL as in b.: > > for index in BLOCK: > if element[path + index,] exists: > del(element[path], index) > else: > if OP_FLAGS & F_PEDANTIC: > report error > else: > report success > > By now you can infer the overall meaning of the F_PEDANTIC flag: > If cleared, the FE should try to correct/ignore the element existence > issue if there is one; if set, the FE must regard any entry existence > issues as error and handle it accordingly. > Ok, so the conclusion i reach is you have separated CREATE from UPDATE, everything else seems to be the same (you didnt refer to terminals vs non-terminals). In what i described earlier both are under the same umbrella of ADD with differentiation being the flags. Is there any good reason you are deviating from the norm (or what i consider to be the norm). To compare against netlink and BSD route socket approach in operations to ADD: F_REPLACE: Replace existing matching config object with this request. F_EXCL: Do not replace the config object if it already exists. F_CREATE: Create config object if it does not already exist. BSD ADD operation equates to F_CREATE or-ed with F_EXCL BSD CHANGE operation equates F_REPLACE BSD Check operation equates F_EXCL BSD APPEND equivalent is actually mapped to F_CREATE The existence of a passed index is actually in addition to the above. > > > > A CREATE operation with F_EXCL|F_REPLACE is equivalent to SET! > > > > ** Other flags used for block operations mentioned in the BLOCK > section. > > > > BLOCK and KEY path selection > > ----------------------------- > > > > The <all> variant described in [1] is not needed. To get access > > to all of table contents, the IDs merely need to point to the table. > > True. But with whatever notation you will come up to define the > BLOCK, it will always allow for encoding the ALL case as an extreme > case. And I don't think we should make that case illegal. > What i meant is if i wanted to get table 7 then my ID will be 7. The BLCOK will be a further filter. > > Therefore to access a range, the IDs field will contain the ID > > leading to a table and an optional TLV will include the range > > information. > > > > - Additional flags needed: > > 1)F_BLOCK_ON, to indicate block selector embeded > > 2)F_KEY_ON, to indicate a key selector embeded > > ACK > > > #1 and #2 are mutually exclusive. > > I agree provided that the KEY can include multiple keys of the > same key type. > Makes sense. > > 3) F_REV_TRAVERSE, to indicate reverse progress in the access. > > I guess this would be meaningful only in QUERY (GET) operations, > but I would NOT bother with this option. > It was mentioned in the doc you guys posted; will restrict it to being a flag. > > 4) F_KEY_MODE (2 bits or more) to select the KEY mode in case #2 is > > on. > > 5) F_BLOCK_MODE (1 bit); indicates count or range for second > > parameter of BLOCK Notation. > > > > It may be cleaner to encode these modes inside the respective TLV, > either as separate T values or as a special flag in the value part. The start/end values are a TLV as shown below. Did you mean something else? > > In the case of block operations: > > > > Two modes exist. [a,b] or [a,N] > > We introduce a block TLV > > > > T = BLOCK_TLV > > start // "a" > > end // "b" or "N" > > > > The flag F_BLOCK_ON will indicate the presence of this TLV. > > F_BLOCK_MODE will indicate that "end" is an "a" or "N" > > F_REV_TRAVERSE will indicate whether reverse or forward progress > > > > In the case of the associative paths: > > the flag F_KEY_ON will indicate that we are using associative approach > > F_KEY_MODE will define the mode . > > > > We introduce a KEY_INFO TLV. > > > > T = BLOCK_TLV > > You meant KEY_INFO_TLV, I assume. > Of course ;-> That was intentionaly entered bug to see if people read the doc ;-> Now i know you paid good attention ;-> > > KEY > > KEY_DATA > > > > The length of the TLV will help deducing the size of the KEY_DATA. > > I presume KEY specifies the key-type (in case more than one type > of keys are allowed on the target). Remember: each key type is a > collection of the struct fields that together can form a key. > > KEY_DATA is one **or more** data blocks satisfying the KEY definition. > Each data block contains the necessary field values according to > the KEY definition. > The content aspect of things i dont have good clarity on. so provide me with better definition on how things should be laid out and i will update the doc. > > > > DATA: > > ----- > > Not discussing the optional data right now; a lot of details > > above need ironing out first. > > DATA is complex twist when it comes with variable sized data. > > Steve and I will propose an encoding soon, to start that discussion. Factor in the litmus test i provided in earlier email. cheers, jamal _______________________________________________ Forces-protocol mailing list Forces-protocol@ietf.org https://www1.ietf.org/mailman/listinfo/forces-protocol
- [Forces-protocol] GET/SET in one msg ? Khosravi, Hormuzd M
- [Forces-protocol] Re: GET/SET in one msg ? Joel M. Halpern
- [Forces-protocol] RE: GET/SET in one msg ? Yang, Lily L
- [Forces-protocol] RE: GET/SET in one msg ? Khosravi, Hormuzd M
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- Re: [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- [Forces-protocol] RE: GET/SET in one msg ? Khosravi, Hormuzd M
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- RE: [Forces-protocol] RE: GET/SET in one msg ? Khosravi, Hormuzd M
- RE: [Forces-protocol] RE: GET/SET in one msg ? Deleganes, Ellen M
- RE: [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- RE: [Forces-protocol] RE: GET/SET in one msg ? Steven Blake
- RE: [Forces-protocol] RE: GET/SET in one msg ? Khosravi, Hormuzd M
- RE: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- RE: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- RE: [Forces-protocol] RE: GET/SET in one msg ? Zsolt Haraszti
- RE: [Forces-protocol] RE: GET/SET in one msg ? Zsolt Haraszti
- RE: [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- RE: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- RE: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- [2] RE: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- RE: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- RE: [Forces-protocol] RE: GET/SET in one msg ? Khosravi, Hormuzd M
- Re: [Forces-protocol] RE: GET/SET in one msg ? Weiming Wang
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Weiming Wang
- [Forces-protocol] Data encoding -- first part Zsolt Haraszti
- Re: [Forces-protocol] RE: GET/SET in one msg ? Steven Blake
- RE: [Forces-protocol] RE: GET/SET in one msg ? Zsolt Haraszti
- [Forces-protocol] Re: Data encoding -- first part Alan DeKok
- [Forces-protocol] Re: Data encoding -- first part Zsolt Haraszti
- [Forces-protocol] Re: Data encoding -- first part Joel M. Halpern
- [Forces-protocol] Re: Data encoding -- first part Alan DeKok
- [Forces-protocol] Re: Data encoding -- first part Zsolt Haraszti
- [Forces-protocol] Re: Data encoding -- first part Zsolt Haraszti
- [Forces-protocol] Re: Data encoding -- first part Joel M. Halpern
- [Forces-protocol] Re: Data encoding -- first part Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- [Forces-protocol] Re: Data encoding -- first part Zsolt Haraszti
- [Forces-protocol] Re: Data encoding -- first part Joel M. Halpern
- Re: [Forces-protocol] RE: GET/SET in one msg ? Wang,Weiming
- Re: [Forces-protocol] RE: GET/SET in one msg ? Zsolt Haraszti
- RE: [Forces-protocol] RE: GET/SET in one msg ? Khosravi, Hormuzd M
- Re: [Forces-protocol] RE: GET/SET in one msg ? Wang,Weiming
- Re: [Forces-protocol] RE: GET/SET in one msg ? Wang,Weiming
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- [Forces-protocol] Re: Data encoding -- first part Alan DeKok
- [Forces-protocol] Re: Data encoding -- first part Alan DeKok
- Re: [Forces-protocol] RE: GET/SET in one msg ? Robert Haas
- Re: [Forces-protocol] RE: GET/SET in one msg ? Wang,Weiming
- Re: [Forces-protocol] RE: GET/SET in one msg ? Wang,Weiming
- Re: [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Weiming Wang
- [Forces-protocol] Instance Select Wang,Weiming
- [Forces-protocol] Re: Instance Select Joel M. Halpern
- [Forces-protocol] Re: Instance Select Weiming Wang
- [Forces-protocol] Re: Instance Select Joel M. Halpern
- Re: [Forces-protocol] RE: GET/SET in one msg ? Zsolt Haraszti
- Re: [Forces-protocol] RE: GET/SET in one msg ? Steven Blake
- Re: [Forces-protocol] RE: GET/SET in one msg ? Joel M. Halpern
- Re: [Forces-protocol] RE: GET/SET in one msg ? Robert Haas
- Re: [Forces-protocol] RE: GET/SET in one msg ? Steven Blake
- Re: [Forces-protocol] RE: GET/SET in one msg ? Robert Haas
- Re: [Forces-protocol] RE: GET/SET in one msg ? Steven Blake
- Re: [Forces-protocol] RE: GET/SET in one msg ? Steven Blake
- Re: [Forces-protocol] RE: GET/SET in one msg ? Wang,Weiming
- Re: [Forces-protocol] RE: GET/SET in one msg ? Wang,Weiming
- Re: [Forces-protocol] RE: GET/SET in one msg ? Ligang Dong
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Ligang Dong
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim
- Re: [Forces-protocol] RE: GET/SET in one msg ? Robert Haas
- Re: [Forces-protocol] RE: GET/SET in one msg ? Ligang Dong
- Re: [Forces-protocol] RE: GET/SET in one msg ? Jamal Hadi Salim