[JDEV] To resource or Not to resource?
chrisj at ctel.net
chrisj at ctel.net
Fri Sep 22 21:09:30 CDT 2000
I'm working on some dedicated clients and I'm not sure I understand
the rules for deliver when multible JID's are logged in. I login with
user at jabber.srvr/Work and get any messages to my complete JID
(user at jabber.srvr/Work - makes sense :), my incomplete JID
(user at jabber.srvr - Still makes sense ;), but I also seem get messages
meant for other resources (as long as they aren't logged in) This
doesn't make sense to me - I makes it difficult for me to have dedicated
clients logged in that don't "steal" messages meant for me. I'm working
on an x10 client for my firecracker that I would like to connect with
user at jabber.srvr/x10 and have it only receive messages to that complete
JID.
Is there are good reason for the "cross resource" deliver to happen?
If so, would it make sense to have a special priority (-1?) that would
say to the server, "I only want what's really meant for me!"
Is this delivery algorithm documented anyplace other than the server
code?
If I had to guess it goes something like:
1. If JID/1 had a higher priority than JID/2, deliver message for JID to
JID/1
2. even if JID/1 had a higher priority than JID/2, deliver message for
JID/2 to JID/2
3. If JID/1 and JID/2 have the same priority, deliver to the last one to
connect.
4. If JID/1 is the only one connected deliver JID and JID/1 messages
there.
5, if JID/1 is the only one connected deliver JID/2 messages there.
It's the 5th rule that I think should be changed to store the message
instead of delivering it.
case 4 should also be extended to say that JID/1/A... messages will also
be delivered to JID/1
Please feel free to reorder my neurons if they seem out of whack here...
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
More information about the JDev
mailing list