Archive of UserLand's first discussion group, started October 5, 1998.
Lightweight Distributed Objects (LDO); was Re: Encodings
Author: Ken MacLeod Posted: 1/30/1999; 7:35:35 AM Topic: XML-RPC Spec Comments Msg #: 2583 (In response to 2574) Prev/Next: 2582 / 2584
The Casbah Project <http://www.ntlug.org/casbah/> has been working on a similar protocol to XML-RPC called Lightweight Distributed Objects (LDO) which is patterned after Apple's (nee NeXT's) Portable Distributed Objects (PDO). We've addressed many similar issues (persistent connections, XML tags, data typing, protocol layering) and would be glad to add our findings to the discussion here.
I have been working on some final design changes and the LDO documentation recently because Casbah is nearing it's first developer release, so hopefully I will soon have a lot of specs handy to look at. In the meantime I want to followup to a few threads already going on.
This message specifically is in response to Bob Atkinson's message about using fewer tags.
LDO's XML tag set uses only four tags. The primary data-defining tags are
(similar to XML-RPC's ),
), and (which most closely matches without subelements). The fourth tag is which allows an already defined data element to be reused verbatim (this is not for circular object references, that's implemented at a higher level in LDO).
The data-defining tags all accept a `type' attribute that defines their object or value type. Type's are similar to MIME types or URIs and are of the form `LANGUAGE:TYPE', where LANGUAGE is the language or standard (`python', `COM', `MIME') that defines types and TYPE is a type name from that language or standard (`float', `jpeg', `text/xml').
's are where data is actually stored, like numbers, strings, or other types. also accepts an `encoding' attribute for using `base64'.
keys can be any data type in addition to just strings (simple names), so dictionaries are defined as pairs of items, where the first item is the key and the second item is the value. In most cases, dictionaries are simply structs so the first item would be an containing the name of the struct member.
Here is an example of an LDO XML serialization of a simple list of two structures:
computer Macintosh os Mac OS X computer Gateway 2000 os Windows 2000
In LDO, remote procedure calls are encoded at a higher level than the serialization, so they are represented as dictionaries. For XML-RPC the keys would be `methodName' and `params'. The first example in the XML-RPC spec would be encoded like this:
methodName examples.getStateName params
The document type definition (DTD) for LDO XML serialization is available at <http://bitsko.slc.ut.us/~ken/casbah/ldo/ldo-xml.dtd>.
There are responses to this message:
- Re: LDO, Dave Winer, 1/30/1999; 7:55:19 AM
This page was archived on 6/13/2001; 4:47:40 PM.
© Copyright 1998-2001 UserLand Software, Inc.