- From: Constantine Plotnikov <cap@mail.novosoft.ru>
- Date: Mon, 06 Mar 2000 15:32:18 +0600
- To: "Box, Don" <dbox@develop.com>
- CC: "'xml-dist-app@w3.org'" <xml-dist-app@w3.org>, Dave Winer <dave@userland.com>, SOAP@discuss.develop.com, "Tim O'Reilly (E-mail)" <tim@oreilly.com>, timbl@w3.org, tbray@textuality.com, ken@bitsko.slc.ut.us, Daniel.Veillard@w3.org, connolly@w3.org, eric@w3.org, "Henrik Frystyk Nielsen (E-mail)" <henrikn@microsoft.com>, "Steve Vinoski (E-mail)" <vinoski@iona.com>
> "Box, Don" wrote: > > > -----Original Message----- > > From: Constantine Plotnikov [mailto:cap@mail.novosoft.ru] > > Sent: Friday, March 03, 2000 6:36 AM > > To: Dave Winer > > Cc: Box, Don; SOAP@discuss.develop.com; Tim O'Reilly > > (E-mail); timbl@w3.org; tbray@textuality.com; > > ken@bitsko.slc.ut.us; Daniel.Veillard@w3.org; > > connolly@w3.org; eric@w3.org; xml-dist-app@w3.org; Henrik > > Frystyk Nielsen (E-mail); Steve Vinoski (E-mail) > > Subject: Re: A personal plea for peace and just a wee bit of > > patience (and I do mean a wee bit) > > > > > > "Box, Don" wrote: > > > > > > No one had concrete criticisms of the SOAP serialization > > format. That does > > > not mean it is perfect. However, it means that no one who > > has looked at the > > > spec has any credible technical show-stoppers that they are > > willing to share > > > in an open forum. > > > > > I personally like XMI 1.1 serialization algorithm more. > > Many of us have familiar at XMI and MOF in general. However, I believe > the OMG is in the process of revamping the XMI encoding, which was > done prior to namespaces and schema language. One of my personal goals > is to make obvious how XMI fits into this picture. > I have not specified what I like in XMI and what is looking strange in SOAP from my point of view. I'm sure that I do not understand the idea in foundation of SOAP serialization. The SOAP algorithm looks complicated from my current understanding of what is it. Before SOAP, I have seen several algorithms (I even reinvented the one during my days at university). Many of them have a similar idea. 1. When reference to object is writen, a. if object is not started to be serialized, its content started to be written and mapping between object reference and identifier is establilshed. b. if object is started to be serialized (it is not important whether finished or not), only reference is written using identifier from mapping. // serialization class SeralizationInfo { map<Object, id> map; int lastId; Values<boolean, int> get(Object) } void writeSimpleAttributes(Object o) { ... // not important for this message } void write_objects(SeralizationInfo si, Object o) { int id; boolean firstTime; (firstTime, id) = si.get(o); if(firsTime) { startObject(id) // "<" <Class(o)> "id=\"id"<id>"\">" writeSimpleAttributes(); for each reference r { startField(r.name) // "<" <r.name> ">" writeSimpleAttributes(o); writeObject(si, r.value); endField(r.name) // "</" <r.value> ">" } endObject(p); // "</" <Class(o)>\">" } else { writeReference(id) // "<" <Class(o)> "href=\"id"<id>"\"/>" } } This is very simplified version that does not contains any optimizations. The traffic can be greatly reduced if some trick are applied. The advantage of this algorithm that there is a very little difference between handling of shared and not shared objects. It also should be noted when object is serialized, the only one one element will present in any case, whether it contains shared objects or not. AFAIU In SOAP encoder should know by some way wherether object is shared or not ahead of serialization time. I'm interested why this design decision was made. Constantine
Received on Monday, 6 March 2000 04:32:55 UTC