[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster-devel] Unifying property names #2

Hi again,

in a discussion with Juergen he complained that our
administrative hierarchy
is a mix.

He would not use instance names as xml-tags.
His approach is pure XPath:

Instead of


the extended hierarchy (without xml-attributes)


and in XPath notation (and instances are attribute id's)

 /root/node[ at id='heron']/client[ at id='joe']/session[ at id='2']/maxEntries=1000

with this XML markup:

  <node id='heron'>


    <client id='joe'>

      <session id='2'>
        <queue id='cb'>

any comments?



------ Original discussion ------------ Hi,

Michele and i where just discussing to unify the properties naming
convention of xmlBlaster:

o command line properties
o xmlBlaster.properties

o xml QoS markup, see e.g.


o code naming of properties, see e.g.


o administrative markup of porperties
  (which covers SNMP, telnet, command-messages and JMX)

* Currently it is a mess as you can see in the examples below:

 -cb.queue.maxMsg 1000                       (command line)

 cb.queue.maxMsg=1000                        (xmlBlaster.properties)

 <queue relating='session' maxMsg='1000'/>   (ConnectQos markup)

 long getMaxNumOfEntries();                  (code example)

 /node/heron/client/joe/cbQueueNumMsgs=1000  (administrative command,
telnet, SNMP etc.)

We believe the administrative approach is most universal and simple (please see the XML structure in http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.commands.html)

* Here are some examples with the new approach:

-queue/cb/maxEntries=1000 (relative addressed on client command line) -/node/heron/client/joe/queue/cb/maxEntries=1000 (command line, absolute addressed)

 queue/cb/maxEntries=1000           (xmlBlaster.properties, relative

   <cb>                             (the 'relating' from above - the
callback queue)
     <maxEntries>1000</maxEntries>  (ConnectQos markup, relative to the
invoking client)

 long getMaxEntries();              (code example)

 /node/heron/client/joe/queue/cb/maxEntries=1000   (administrative command)

                                    (add a CORBA plugin to heron)


 JdbcQueuePlugin/tablePrefix=xmlblast               (configure a
specific plugin)

* As you may have noted the markup consists of pairs like 'node/heron' where 'node' is the tag or class name and 'heron' is the instance ID 'topic/helloWorld' where 'topic' is the tag or class name and 'helloWorld' is the instance ID

 Only for assignement the '=' signature is used ('/' would be possible
as well)
 to visualize the purpose and to be URL compliant.

* Benefits: o Unified naming approach o Simple syntax o local (relative) settings are clusterwide expandable o XPath compliant syntax o URL compliant syntax o Automatic conversion from flat hierarchical view to XML view and vice versa o No [] brackets anymore which frightens Michele, Bjorn and even Cyrille (only for pugin type and version and for property arrays we still use [])

* Drawback for URL setting As described in the admin.commands requirement we have up to now used a '?' syntax when passing values, e.g. client/joe/-17/queue/cb/?maxEntries=30000 to be URL comforming. This '?' will now be dropped for all configurations (like command line or telnet) and will be only used for browser write access. URL read access works fine without a '?'.

Comments are very welcome!

best regards

Marcel + Michele

PS: Thanks to Heinrich, Bjorn and Cyrille for their feedback