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

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



Hi,

First of all thank you for your prompt reply :D

I first intended to extend your authentication plugins, still as i'm not yet sure it will run in the same machine as the xmlBlaster server i chose to implement it as a client .. as soon as it's finnished i'll lokk into that.

Regarding the history i'm aware that it is possible to filter history messages the problem is that what i'd like to have is a way to ask the server for the N history messages that comply with a given filter.

What would happen if you first published 5 messages with OiOi then 5 with Hello, and the subscribe with the filter with history=5 ?! would you get the 5 messages with the OiOi content or with it simply return null since in the last 5 history messages there was none with OiOi as content ?

Tanks !

Nelson Silva

Marcel Ruff wrote:
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