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

Re: [xmlblaster] Demo: Adding client specific properties to the QoS on publishing



Hi David,
technically speaking there is little difference. However sending it in the key is a hack which of course works fine in the most of the cases but it is uggly since the key:


- is supposed to be invariant and
- is put in the big dom tree when the topic is created.

One potentially dangerous side effect could be the following. Suppose you were putting this information into the key:

Client A sends its first message to the 'flowers' topic:
<key oid='flowers'>
  ...
  <clientProperty name='color'>red</clientProperty>
  ...
</key>

Client B sends its first one *without* a 'color' specification:

<key oid='flowers'>
  ...
  <!-- *no color specified in this entry* -->
  ...
</key>

Client C subscribes with the following xpath query:
//clientProperty[ at name='color']

If A published before B the result would be that C would become *all* updates, not only the ones with the color specified. If B would publish before A, C would *never* become an update.

Regards
Michele


David Hooker wrote:
What's the benefit of using these properties instead of the clientTags
in the UpdateKey?

-----Original Message-----
From: owner-xmlblaster at server.xmlBlaster.org
[mailto:owner-xmlblaster at server.xmlBlaster.org] On Behalf Of Michele
Laghi
Sent: Monday, October 13, 2003 11:51 AM
To: xmlblaster at server.xmlblaster.org
Subject: Re: [xmlblaster] Demo: Adding client specific properties to the
QoS on publishing


Hi David, The requirement specifying this is http://www.xmlBlaster.org/xmlBlaster/doc/requirements/engine.qos.clientP roperty.html

Michele


David Hooker wrote:

Is there a REQ I can look at for this?

-----Original Message-----
From: owner-xmlblaster at server.xmlBlaster.org
[mailto:owner-xmlblaster at server.xmlBlaster.org] On Behalf Of Marcel

Ruff

Sent: Sunday, October 12, 2003 3:25 PM
To: xmlblaster
Subject: [xmlblaster] Demo: Adding client specific properties to the

QoS

on publishing


Hi,

Michele has added support to add client specific properties
to the publish QoS, these properties will be delivered
to subscribers in the QoS, to play with it you can use our
Java demo publisher like this:

 java javaclients.HelloWorldPublish -numPublish 50
                      -clientProperty[transactionId] 0x23345
                      -clientProperty[myName] jack

would add the properties to the publish QoS like this:

 <clientProperty name='transactionId'>0x23345</clientProperty>
 <clientProperty name='myName'>jack</clientProperty>


You can look at the received QoS with a subscriber:

 java javaclients.HelloWorldSubscribe

enjoy

Marcel






--
Michele Laghi
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964
http://eclettic.tripod.com
http://www.xmlBlaster.org