[JDEV] phew

Dennis Noordsij dennis.noordsij at wiral.com
Fri Dec 1 16:28:17 CST 2000


> A component may create a session by sending:
> <route type="session" to="user at localhost/sms" from="9 at perlsms"/>
>
> All packet for the session will be delivered from jsm to perlsms like so:
>
> <route to="9 at perlsms" from="user at localhost/sms">
>   <message ...../>
> </route>
>
> To kill your session send:
> <route type="error" to="user at localhost/sms" from="9 at perlsms"/>

Schuyler you deserve a medal, or a pizza if you're ever near Helsinki :-) 
That little tidbit finally got me to understand fully the big picture, it all 
makes sense now how jabber works internally. 

One note though, after you create the session jabber sends you an echo reply 
basically, well an acknowledgement, and it has replaced the resource (sms) 
with a number, for example 918A82E. From then on, sending messages and 
destroying the session, you HAVE to use that number rather than the resource 
name (sms). Small detail, but quite essential :)

I have another question with regard to this modular stuff, what if you run 2 
jabber service managers on 2 different systems, both controlling the same 
domain, and you set up one instance to <accept>, and the other one to 
<connect>, ie create a connection between the 2.  (similar to how the 
conferencing module recommends one jabber spawning another jabber for 
stability reasons - i want to do this using tcp/ip so I can have the 
instances on different machines, but not for stability reasons but 
scalability).

Client networking is done on yet another machine (or more) running for 
example jpolld's.

My point is to use a fast 100 mbit link between 2 jabber instances to divide 
the service manager load (the routing) over those machines. If one machine 
receives a message and it doesn't know the destination session it sends it to 
the other jabber instance who should know it. If it does know the user it 
handles it itself. (with the point being that each JSM only has to do a part 
(ideally half) of the routing it would otherwise have to, thus scaling :)

By doing that, and running several jpolld machines you should be able to 
scale as far up as the bandwidth between the components allows.

Any comments? :-)

Kind regards,
Dennis





More information about the JDev mailing list