[jdev] Re: architecture questions

Joanne jlc020404jabber at jambotech.com
Fri Feb 20 12:45:08 CST 2004


One think I forgot to ask... 

In my load balancing scenario, I suggested writing a jabber component. Is its possible to implement this load balancer as a client instead? That way, I can scale the number of load balancers to support redundancy. Can somone also clarify which is the better way of implementing a load balancer: component or client?

"Joanne" <jlc020404jabber at jambotech.com> wrote in message news:079901c3f7df$afa09410$6401a8c0 at jambotech.com...
I have a few areas I'd appreciate thoughts/opinions on:

(1) message queuing/processing
It seems that jabber's queuing mechanism is only dependent on a a client's "online" status. If a client is offline, jabber will automatically queue the messages in an offline store. But as soon as the client's online presence is detected, jabber will start "pushing" all queued messages to it automatically. Assuming our jabber client had no queuing mechanism, we would have to block while processing each message. Would this block->process type of method work well within the jabber framework in order to take advantage of its built in queuing mechanism? I wrote a simple client to test this type of processing and on the surface it appears to work, but I was just wondering if anyone might see other factors/issues/caveats I might not be considering before I choose this type of implementation.

(2) scalability & redundancy
I would like to connect multiple jabber clients to the same jabber server. Also keep in mind that my clients will only be available within the internal network, so I'm exploiting the A2A (application 2 application) capability of jabber. Although each jabber client does the same thing, they would each need to have unique jids. But I also read that I could run multiple clients with the same jid but with different resource identifiers. Jabber would then decide which client to forward the message to based on the client's presence priority. Unfortunately, this doesn't do any load balancing, but it would allow me to take down one client without disrupting any message processing (since jabber would just forward messages to the next priority client). Is my thinking correct on this?

(3) load balancing
To truly achieve load balancing, it appears to me that I would need to implement a custom jabber component. All messages would be addressed to this component jid (instead of a client jid as described above). The component would then decide which of the available clients it would forward messages to. However, it appears that we would loose the queuing capability of jabber since store/forward is not available to components (according to "Programming Jabber"), so does that mean I would have to implement my own queuing mechanism within the component? I could probably get away with sacrificing the load balancing component and just rely on the presence priority forwarding of jabber to support redundancy in the short run, but eventually, I could build the load balancing component later. 

So how does this all sound? I just need a sanity check here before I start coding away. I'd appreciate comments/suggesteions anyone should have.

Joanne



More information about the JDev mailing list