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

Re: [xmlblaster] Newbie: best way to implement client-server message queues?

Darrell Berry wrote:


A general question.

In a simple client/server model, where lots of clients will each connect
at various times to pick up whatever mesasges are waiting for them
(individually) on the server, what's the 'best' way to structure things?

The key requirements are that:

- clients may not be online when the messages are posted

PtP messages are queued for such clients if the QoS <forceUpdate/> is set.
PubSub are not delivered if the subscriber was never there (only the most current).

- each client is allowed access only to its 'own' messages

You talk about authorization.

* In PubSub mode:
The security framework of Wolfgang Kleinertz supports this.
the method
 public boolean isAuthorized(String actionKey, String key);

Plugins implementing this interface get isAuthorized() invoked
for every message, the plugin can decide to allow access or not.

No public available plugin is currently available doing this,
but using Cyrilles htpasswd plugin in


could be used - just implement the method isAuthorized() there
(currently it always returns 'true' == access allowed)

The LDAP plugin could be a good base as well.

* In PtP mode
A message send in PtP mode is invisible to other clients.
Only the sender and receiver can see it.

- each client gets each message once and once only

xmlBlaster supports 'at least once'.
On xmlBlaster crash a message can be delivered twice.
'Once and only once' is only guaranteed with transactions
- but xmlBlaster does not yet support transactions.

Effectively I want a set of message queues, one for each client. I can't see one of your demos which does exactly this, but I'm probably missing something very very obvious!

In fact, how does message-level security work? I can see how you
authorize clients for connection, but I can't see how you can restrict
access to particular messages.

Again, missing something I assume -- I can see from the javadoc entries
that you have a secuirty manager, but I'm definitely NOT a java
programmer, so how to use it isn't obvious ;-) if anyone has any
examples in other languages (pref perl or python) that would be MUCH

Sorry, server side plugins are java only. But a tiny java plugin could make
a System.exec() to execute perl or python.

(sorry I said this was a newbie question).

No, this is no newbie question, in this area xmlBlaster has much room of evolution :-)