For the quickest reply, please use our new Customer Helpdesk and Feedback platform
 
   
 
Priority handling
Posted: 28 January 2010 01:22 PM   [ Ignore ]
Newbie
Rank
Total Posts:  12
Joined  2010-01-27

Hello!

Synopsis
XMPP allows clients to be assigned a priority.
Among all open clients, the one with the highest priority is then served with messages and is displaying the status.

Relevant configuration
.(JavaScript must be enabled to view this email address)/MacBook (iChat, v5.0.1 b743) is set to 50 (highest)
.(JavaScript must be enabled to view this email address)/iPhone (OT iPhone, v3.2.3) is set to 25 (lowest)

Expected Situation
1. Both clients are online. The strongest client (MacBook) receives the messages.
2. The strongest client (MacBook) logs out. Now iPhone receives the messages.
3. The strongest client comes (MacBook) back. Now both clients are online. iPhone gives control back to MacBook.

Problem
While steps one and two work as expected, step three does not happen.
iPhone remains in control of the connection and receives all messages and sends it’s own status message.
This is annoying since it forces me to logout iPhone and log back in to send and receive with iChat.

Possible causes from my (uneducated) perspective in random order
a) iChat does not respect the priority set in it’s .plist
b) OneTeam.im does not respect the priority of iChat

Possible solutions from my (again uneducated) perspective
If a): Set OneTeam for iPhone to also accept negative priorities! So we can go below zero which is the iChat default.
If b): Modify OneTeam.im so that it honors the priorities of it’s clients.


I hope this bug report/question/feedback is clear enough.
Let me know if you’re missing something or need some more testing and experimenting from me.

Kind regards
Chris

Profile
 
 
Posted: 28 January 2010 01:28 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12

The problem is that some client send directed messages to a given resource once the conversation has been started.
Doing this bypass the priority. Send a message to .(JavaScript must be enabled to view this email address)/MacBook will reach the macbook no matter how the priority are set.

Profile
 
 
Posted: 28 January 2010 02:00 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  12
Joined  2010-01-27
Mickaël Rémond - 28 January 2010 01:28 PM

The problem is that some client send directed messages to a given resource once the conversation has been started.
Doing this bypass the priority. Send a message to .(JavaScript must be enabled to view this email address)/MacBook will reach the macbook no matter how the priority are set.

Hi Mickaël

Thanks for your excellent reply!
I will note that.

However:
How about the transports?
When someone is writing to me over MSN/AIM/etc. the same situation applies.
Is this a problem with the transport or with the clients on the other side of the transport?

Cheers
Chris

Profile
 
 
Posted: 29 January 2010 08:20 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  12
Joined  2010-01-27

I have now tested it again with two virgin clients.
Basically a second iPhone and another mac, freshly installed.

Even without any conversation started. Priority seems only to trickle down.
If the higher priority disconnects, it goes down the line but not up again, if a new higher client connects.

I tested this by assigning the various clients different status messages.
The messages therefore change immediately when another client assumes priority.

Especially, when I didn’t start a conversation, isn’t it supposed to go back to the highest priority client?

Profile
 
 
Posted: 29 January 2010 08:53 AM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12

Not sure I understand your question.
OneTeam does not change priority when session is opened.

It use two priority:
- Configured one (15 as default) when client is running.
- 0 in push mode.

So, to state the rule on the server side: The message goes to the highest priority resource unless the message is send to full JID (including the resource). In this case, the message goes to that resource without the server taking the priority into account.

Profile
 
 
Posted: 29 January 2010 08:57 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12
Chris Leduc - 28 January 2010 01:22 PM

Possible solutions from my (again uneducated) perspective
If a): Set OneTeam for iPhone to also accept negative priorities! So we can go below zero which is the iChat default.

I do not see the point about this. If you do that, you will not receive any message if this is the only connected client. The point of running a client on the mobile is to receive message. Otherwise, you should simply disconnect it.

Chris Leduc - 28 January 2010 01:22 PM

If b): Modify OneTeam.im so that it honors the priorities of it’s clients.

Oneteam.im is ejabberd 2 which comply to XMPP RFC rules and honor priority of clients.

Profile
 
 
Posted: 29 January 2010 09:08 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  12
Joined  2010-01-27

Hi Mickaël!

I’m sorry if I was badly formulating my message.
I am very new to XMPP, so I really was just putting out ideas ;-)
I didn’t know that negative priorities make the message reception stop.

Let’s make it this way:

iChat: Priority 30
OneTeam: Priority 15 (Push: 0)

1. Only iChat is connected
- iChat has priority -> Expected

2. Now iChat AND iPhone are connected
- iChat has priority -> Expected

3. iChat is disconnected and iPhone remains
- iPhone has priority -> Expected

4. iChat is now connected again and iPhone still is connected
- iPhone still has priority -> Unexpected


My point is that it affects Psi, Adium, iChat, OneTeam.
And it doesn’t really matter if a conversation has ever been started on any of these clients. It will display the status (and in consequence route the messages to) the client that has the priority. Sometimes the wrong client.

I assume I might do something wrong or I might have a misconception of priorities.
However, it’s very annoying — hopefully you’ll understand.

When I’m back on my computer, I want it to have the highest priority since that’s where i prefer writing when i can.
Having to go offline and back online with the iPhone to nudge the priority back to iChat is a bit unfortunate. :-(

Profile
 
 
Posted: 29 January 2010 09:14 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12
Chris Leduc - 29 January 2010 09:08 AM

4. iChat is now connected again and iPhone still is connected
- iPhone still has priority -> Unexpected

How do you test that iPhone client has the priority ?
The problem lie in my opinion on the other client (the one send you the message). I think it sends directly the message to the iPhone resource and thus bypass the priority rule.
You need to check in the other client XML console to which JID it is sending the message. I guess it sends it to full JID (including the resource), thus explicitely asking the server to deliver the message to the iPhone.

Chris Leduc - 29 January 2010 09:08 AM

When I’m back on my computer, I want it to have the highest priority since that’s where i prefer writing when i can.

That’s what it does for me.

Profile
 
 
Posted: 29 January 2010 09:21 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  12
Joined  2010-01-27
Mickaël Rémond - 29 January 2010 09:14 AM

How do you test that iPhone client has the priority ?

I assign each client a status message with the name of the device.
Each time a new client has priority, I can see it from there — and it matches the client who then receives the messages correctly.
I didn’t know about the XML Console way.

Mickaël Rémond - 29 January 2010 09:14 AM

You need to check in the other client XML console to which JID it is sending the message. I guess it sends it to full JID (including the resource), thus explicitely asking the server to deliver the message to the iPhone.

I will test this this afternoon.
How about gateways? The gateways do exactly the same — they send the messages to the lower priority iPhone instead to the higher priority iChat.
Am I right to assume that iChat is «broken» in this case? Or is this intended with gateways?

Profile
 
 
Posted: 29 January 2010 09:35 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12
Chris Leduc - 29 January 2010 09:21 AM

How about gateways? The gateways do exactly the same — they send the messages to the lower priority iPhone instead to the higher priority iChat.
Am I right to assume that iChat is «broken» in this case? Or is this intended with gateways?

I do not understand the status point.
Regarding gateway, older version used to obey to the third party message delivery rules.
We changed that in newer version.
We will make sure that the gateway deployed on OneTeam.IM are the latest version and obey this behaviour.

Thank you !

Profile
 
 
Posted: 29 January 2010 09:40 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  12
Joined  2010-01-27

Thanks Mickaël!

As for the status:
Basically, I didn’t know how to check for which client has priority.
So I noticed that the client who is receiving messages is also providing the status.

So if one client is Online and has the message «Client: iPhone» and the other has «Client: MacBook».
I can now see which one will receive the message based on the name i see in the status.

It was just a workaround for diagnostics ;-)

Profile
 
 
Posted: 29 January 2010 09:54 AM   [ Ignore ]   [ # 11 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  600
Joined  2006-11-12

You need to diagnose the other way around: the client that is seing the status and sending the messages. That’s the one which is important.

Profile
 
 
Posted: 29 January 2010 01:45 PM   [ Ignore ]   [ # 12 ]
Newbie
Rank
Total Posts:  12
Joined  2010-01-27

New findings:
- iChat has no «official» way to set priority
- There is a .plist file with a key names «priority» and value 0
- Changing the value works, but does not have an effect

I base this on some packet sniffing from iChat (No proper log found otherwise):

<iq.type="get".id="iChat_71EA1109"><vCard.></iq>.<iq.type="get".id="iChat_100F59DC"><query.></query>.</iq>.<presence><priority>0</priority>.<c.><x.></presence>. 

EDIT: Of course maybe i am misinterpreting this, but i think this comes from my iChat client and says it remains on priority zero.

Profile