On Thu, Apr 12, 2007 at 08:56:12PM -0400, Reed Hedges wrote:

> Will messages be like they are now, essentially a map? Or could we have 
> a Message subclass generated from the OTD, with pointers into the 
> message data for each field, so we don't have to look up fields by name 
> each time?

We could do that, although actually as implemented in the current s5, 
the fields are converted into arguments to a method, so the user doesn't 
see the actual message structure, just gets a method call with the 
fields as parameters.  This is why type conversion to the expected 
method signature is important.

> Yeah, it would be nice not to have to do too much processing on the 
> Message object to send it out over the network-- just grab a data buffer 
> out of the object and byteswap it (or not).

Some processing is necessary if messages are to remain abstracted from 
the concrete serialization format.  In particular, it ought to be 
possible to convert a VOS message to both a lightweight binary format or 
to something like SOAP or XML-RPC for interoperating with 3rd party 
systems.  That's where having both a binary encoding and ASCII encoding 
for primitive types comes into play.

> One thing that would be nice in s5 is to be able to very easily nest 
> message structures, either through just embedding a second message 
> inside another as a field, or by a "struct definition" in the OTD and 
> putting struct type data in the message.

Actually s5 has structs already!  As it stands now it is fairly weak 
(only combinations of primitive datatypes or other structs allowed, no 
recursive nesting, no dynamic-sized arrays) but I certainly agree that 
structs are useful.

Here's some testing code in the current s5 interface.  This is real 
interface code which can be processed by the code generator:

<interfaces>
 <namespace name="a3dl">
    <struct name="vector3">
      <field name="x" type="float" />
      <field name="y" type="float" />
      <field name="z" type="float" />
    </struct>

    <struct name="rotation">
      <field name="axis" type="vector3" />
      <field name="angle" type="float" />
    </struct>

    <class name="object3d">
      <child name="position" type="vector3" />
      <child name="orientation" type="rotation" />
      <child name="transform-group">
        <child type="object3d" count="any" />
      </child>
    </class>
 </namespace>

  <namespace name="misc">
    <class name="talkative">
      <child name="relay-listeners">
        <child type="talkative" count="any" />
      </child>

      <method name="say">
        <param name="text" type="string" />
        <param name="scope" type="uint16" />
        <param name="priority" type="uint8" />
        <param name="in-reply-to" type="uint32" />
      </method>

      <method name="resend">
        <param name="resendTo" type="vobject" />
        <param name="text" type="string" />
        <param name="scope" type="uint16" />
        <param name="priority" type="uint8" />
        <param name="in-reply-to" type="uint32" />
      </method>
    </class>
  </namespace>
</interfaces>

-- 
[   Peter Amstutz  ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vos-d mailing list
[EMAIL PROTECTED]
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to