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

Re: [xmlblaster-devel] HistoryQos with sSQL92 subscrition filters



Nelson Silva wrote:
Hi,

We're currently using xmlBlaster for a couple of ongoing I&D projects.

We had the need to create the concept of sessions with our own login procedures.

Basically after connecting to the server another login command is issued to our SessionManager.

After login all messages published by a client are using our on sessionID as oid and the topic is now a clientProperty.

Clients subscribe to differente topics using sql92 filters transparently.
Couldn't you more simply just extend our authentication plugins to contact your backend SessionManager,
like this you could keep the traditional xmlBlaster concept.

I'd like to know if the HistoryQos set when subscribing to a given topic takes filters into account or does it only get N messages under the specified oid with no filtering?
Filtering on history messages should be possible as far as i know, you are probably looking for something like this:

<qos>
  <!-- Filters messages as implemented in the specified plugin -->
  <!-- Here we use the regex filter and only want contents starting with the letter 'H' -->
  <filter type='GnuRegexFilter' version='1.0'>
     ^H.*$
  </filter>

  <!-- Default is to deliver the current entry (numEntries='1'), '-1' deliver all (default: 1) -->
  <!-- newestFirst let you change the delivery order, it defaults to true -->
  <!-- The higher priority messages are always delivered first. -->
  <!-- In one priority the newest message is delivered first with 'true', setting 'false' -->
  <!-- reverts the delivery sequence in this priority. -->
  <history numEntries='20' newestFirst='true'/>
</qos>

You can try it from command line:

java -Dcom.sun.management.jmxremote org.xmlBlaster.Main -cluster.node.id HERON

java javaclients.HelloWorldPublish -numPublish 5 -content Hello
(publish some Hello, don't erase the topic at the end!)

java javaclients.HelloWorldPublish -numPublish 5 -content OiOi
(publish some OiOi, don't erase the topic at the end!)

java javaclients.HelloWorldGet -numHistory 10 -filter.query "^O.*$"

Will return only the 'OiOi's


Another question is regarding zlib:stream compression. We're creating a sort of VNC using xmlBlaster and started a SOCKET plugin with zlib compression.


Does the server have to unzip the message before distributing it to clients ? Even if all of them are using zlib?
Yes, this is not very nice in your case but as the compression is on SOCKET protocol layer we
have with the current implementation no possibility to avoid it.
To avoid compress/decompress cycles you would need to compress the content yourself.


regards
Marcel

Thanks for you support.

Keep up the good work :)

Regards,

   Nelson Silva