[jdev] Message Routing

Jonathan Dickinson jonathanD at k2.com
Mon May 19 03:02:53 CDT 2008

How does the semantics of message routing work (involving resources)?

I have come up with the following (for a message sent to joe at server.com<mailto:joe at server.com>):

1.       Is the destination on this server?

a.       No -> Open or use S2S connection and route the packet there.

2.       Does it have a resource?

a.       No -> Find the lowest resource and route.

3.       Is the resource online?

a.       Yes -> Route it to that connection.

b.      No -> Is the user online?

                                                               i.      Yes -> *What to do here?* (Assuming that joe at server.com<mailto:joe at server.com> or joe at server.com/resource<mailto:joe at server.com/resource> is online)

                                                             ii.      No -> Store it in DB for later.

I know this has come up before,  but what about duplicate destinations? If a *nuclear reactor is overheating* packet is sent to joe at server.com<mailto:joe at server.com> and he has three resources:

joe at server.com/mobile<mailto:joe at server.com/mobile> (0)
joe at server.com/pc<mailto:joe at server.com/pc> (1)
joe at server.com/allfail<mailto:joe at server.com/allfail> (0)

Thus now he has identical resources in case a message is sent to his mobile, and it needs urgent action (but he isn't online). Can't messages be routed to all resources with identical priorities?

Thanks for your time.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20080519/dfeb260b/attachment-0002.htm>

More information about the JDev mailing list