I am looking for feedback on the patches provided as part of QPID-1786 [1]. As a background, these are patches to the python and java code base which were started by Ted Ross and Rafael Schloming. They add a Java Agent which has an API similar to the CPP agent. In addition, it introduces the notion of "non-managed objects" which are structs which can be sent across the wire. These structs are basically managed objects without methods. The marshalling logic is using annotations and is heavily based on using JAXB.

The muppet scripts generates a schema which looks like the attached file. I have a couple of open questions which I would like to get folks input on based on this schema:

1) Denoting managed types versus not. In the current schema, the only way to tell that a type is managed is to look for the existence of method elements. But, this is not full proof, since a managed object can have no behaviour. Should the type (managed or not) be called out in the schema? 2) Type inheritance. In this example, a Pikelet is a subclass of Crumpet . Said another way, the Pikelet type extends the Crumpet type. There is no notion of this in the schema. Should there be? 3) Enumerations: There is no way to list enumerated strings in the schema. There are range checks, but no valid value lists.

Comments on these questions and any other comments on the code would be appreciated.

Thanks.

-- bk


[1] https://issues.apache.org/jira/browse/QPID-1786
<schema package='org.apache.test'>
        <class name='Muppet'>
                <property name='something' type='long-string' access='ReadOnly' 
optional='False' />
                <method name='doSomething'> 
                        <arg name='arg0' dir='I' type='long-string' />
                </method> 
                <method name='returnSomething'> 
                        <arg name='result' dir='O' type='long-string' />
                </method> 
                <method name='gimmieCrumpet'> 
                        <arg name='arg0' dir='I' type='long-string' />
                        <arg name='arg1' dir='I' type='int32' />
                        <arg name='arg2' dir='I' type='float' />
                        <arg name='arg3' dir='I' type='field-table' />
                        <arg name='result' dir='O' type='object'  
refClass='Crumpet'/>
                </method> 
                <method name='gimmieCrumpet2'> 
                        <arg name='result' dir='O' type='object'  
refClass='Crumpet'/>
                </method> 
                <method name='gimmeLotsOfCrumpets'> 
                        <arg name='result' dir='O' type='list' />
                </method> 
                <method name='divideByZero'> 
                        <arg name='result' dir='O' type='int32' />
                </method> 
                <method name='takeCrumpet'> 
                        <arg name='arg0' dir='I' type='object'  
refClass='Crumpet'/>
                        <arg name='result' dir='O' type='object'  
refClass='Crumpet'/>
                </method> 
                <method name='takeSomething'> 
                        <arg name='arg0' dir='I' type='object'  
refClass='Object'/>
                        <arg name='result' dir='O' type='object'  
refClass='Object'/>
                </method> 
        </class>
        <class name='Pikelet'>
                <property name='shape' type='long-string' access='ReadWrite' 
optional='False' />
                <property name='ingredients' type='list' access='ReadWrite' 
optional='False' />
                <property name='foo' type='long-string' access='ReadWrite' 
optional='False' />
                <property name='bar' type='long-string' access='ReadWrite' 
optional='False' />
        </class>
        <class name='Crumpet'>
                <property name='ingredients' type='list' access='ReadWrite' 
optional='False' />
                <property name='foo' type='long-string' access='ReadWrite' 
optional='False' />
                <property name='bar' type='long-string' access='ReadWrite' 
optional='False' />
        </class>
</schema>


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to