PDA

View Full Version : Jabber presence traffic characterization


fabinader
06-08-2008, 06:20 PM
Hi folks,

I'm currently working on a research project for my Ph.D in which I need to simulate network traffic during long periods of inactivity on mobile Internet tablets. One focus application would be Jabber, and I was wondering what would be the traffic pattern for a scenario in which a Jabber client is running on a mobile Internet tablet for long periods of inactivity (e.g. no data traffic, just presence traffic). Given that I could not find any relevant literature in such subject, I'm posting in this forum asking for help. In fact, what I need is the traffic characterization for Jabber presence traffic, and I'm not really concerned about Jabber messaging traffic, because the idea is to simulate a network scenario with a connection between a Jabber client and a Jabber server. I know Jabber uses XMPP, but I couldn't find whether presence information was exchanged over TCP or UDP, for start. If it is TCP, I would like to know whether this TCP connection is "persistent" (kept open for as long as the user is logged on the server") or "temporary" (opened each time the users updates its status on the server and/or the user requests an update on the status of the contacts list). Also, if anybody has knowledge of related works on Jabber traffic characterization and would like to share, it would be really valuable.

Thanks in advance,

Fuad Abinader

Alexey Nezhdanov
06-08-2008, 08:06 PM
В сообщении от Sunday 08 June 2008 20:20:29 JabberForum написал(а):
> Hi folks,
>
> I'm currently working on a research project for my Ph.D in which I
> need to simulate network traffic during long periods of inactivity on
> mobile Internet tablets. One focus application would be Jabber, and I
> was wondering what would be the traffic pattern for a scenario in which
> a Jabber client is running on a mobile Internet tablet for long periods
> of inactivity (e.g. no data traffic, just presence traffic). Given that
> I could not find any relevant literature in such subject, I'm posting in
> this forum asking for help. In fact, what I need is the traffic
> characterization for Jabber presence traffic, and I'm not really
> concerned about Jabber messaging traffic, because the idea is to
> simulate a network scenario with a connection between a Jabber client
> and a Jabber server. I know Jabber uses XMPP, but I couldn't find
> whether presence information was exchanged over TCP or UDP, for start.
It depends, actually. The most common scenario is the single persistent tcp
connection which is established when client connects and terminated on
logout. But there are also solutions for XMPP over HTTP (both polling and
binding) and it is certainly possible to develop a UDP-based transport,
though that will require adding guaranteed delivery there anyways because
order of stanzas matter and all and eachone must be delivered.

In your scenario client would receive one presence stanza per status change.
You can see them yourself in any xml-console capable jabber client (f.e. psi,
tkabber).

> If it is TCP, I would like to know whether this TCP connection is
> "persistent" (kept open for as long as the user is logged on the
> server") or "temporary" (opened each time the users updates its status
> on the server and/or the user requests an update on the status of the
> contacts list). Also, if anybody has knowledge of related works on
> Jabber traffic characterization and would like to share, it would be
> really valuable.
>
> Thanks in advance,
>
> Fuad Abinader



--
Respectfully
Alexey Nezhdanov
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________

Jonathan Dickinson
06-09-2008, 08:33 AM
> -----Original Message-----
> From: jdev-bounces (AT) jabber (DOT) org [mailto:jdev-bounces (AT) jabber (DOT) org] On Behalf Of
> JabberForum
> Sent: 08 June 2008 06:20 PM
> To: jdev (AT) jabber (DOT) org
> Subject: [jdev] Jabber presence traffic characterization
>
>
> Hi folks,
>
> I'm currently working on a research project for my Ph.D in which I
> need to simulate network traffic during long periods of inactivity on
> mobile Internet tablets.
[Jonathan Dickinson]
Good luck!

> One focus application would be Jabber, and I
> was wondering what would be the traffic pattern for a scenario in which
> a Jabber client is running on a mobile Internet tablet for long periods
> of inactivity (e.g. no data traffic, just presence traffic).
[Jonathan Dickinson]
There are a few instances, as always, it depends on the environment. Does the user have 200+ contacts, or only one contact? Is the user using stream compression? These things make a huge difference to the results you will get.

> Given that
> I could not find any relevant literature in such subject, I'm posting in
> this forum asking for help. In fact, what I need is the traffic
> characterization for Jabber presence traffic, and I'm not really
> concerned about Jabber messaging traffic, because the idea is to
> simulate a network scenario with a connection between a Jabber client
> and a Jabber server. I know Jabber uses XMPP, but I couldn't find
> whether presence information was exchanged over TCP or UDP, for start.
[Jonathan Dickinson]
XMPP is transport agnostic - that is, you can pump it over any transport mechanism that you want: TCP, UDP even HTTP (using BOSH): although I don't think there is an official UDP XEP for it.

> If it is TCP, I would like to know whether this TCP connection is
> "persistent" (kept open for as long as the user is logged on the
> server") or "temporary" (opened each time the users updates its status
> on the server and/or the user requests an update on the status of the
> contacts list).
[Jonathan Dickinson]
XMPP uses a realtime persistent connection, or a simulated one (in the case of BOSH). The user connects and gets presence updates etc. You *could* have the user connect, update their presence and then disconnect, but that isn't really the point of XMPP. So yeah, 90% of the time it's TCP.

If you read the RFC you will see that the flow for presence works as follows:

Connect
-------

Client1 -> <presence/> -> Server1
Server1 -> <presence type='probe'/> -> Client1's contacts' Servers (Server2)
Server1 -> <presence/> -> Server2
Server2 -> Checks presence of clients -> <presence type='x'/> -> Server1
Server1 -> <presence type='x'/> -> Client1

Client1 changes presence
------------------------

Client1 -> <presence>...</presence> -> Server1
Server1 -> <presence>...</presence> -> Server2
Server2 -> <presence>...</presence> -> Client2

Client2 changes presence
------------------------

Client2 -> <presence>...</presence> -> Server2
Server2 -> <presence>...</presence> -> Server1
Server1 -> <presence>...</presence> -> Client1

That's the rough idea.

> Also, if anybody has knowledge of related works on
> Jabber traffic characterization and would like to share, it would be
> really valuable.
[Jonathan Dickinson]
Sorry, I have no statistics for you. One thing to keep in mind is that most transports use a the 'whitespace pings': the server sends a whitespace character to the client every few seconds/minutes to see if they are online (i.e. if they have disconnected due to a software/internet crash).

I think your best bet would be to:
A. Read RFC 3290 and RFC 3291 and see what they say and how it relates to your questions. You should be able to make a good amount of assumptions based on those documents.
B. Download Wireshark and extend it to profile what you want: run the client for a few days to see what happens.
C. Find a server with performance profiling (performance monitors under Windows NT), or extend one with those.

I will see if I can get those into my server and I could send you a 'demo' version of it (commercial software now). If you told me what stats you need maybe I could help with a custom server.

>
> Thanks in advance,
>
> Fuad Abinader
>
>
> --
> fabinader
> ------------------------------------------------------------------------
> fabinader's Profile: http://www.jabberforum.org/member.php?userid=16997
> View this thread: http://www.jabberforum.org/showthread.php?t=244
>
> _______________________________________________
> JDev mailing list
> FAQ: http://www.jabber.org/discussion-lists/jdev-faq
> Forum: http://www.jabberforum.org/forumdisplay.php?f=20
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
> _______________________________________________
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________

fabinader
06-09-2008, 01:06 PM
@Alexey Nezhdanov: Thanks so much for your input regarding connection types, and the tip for XML output will be really useful!

@Jonathan Dickinson: Man, your feedback will be an "afterburner"! I really haven't heard of compressed XMPP traffic, and after your post I went to look at it and I found some literature on this. Also, I was thinking more on testing multiple scenarios, varying form a small number of contacts to large number of contacts, and also varying from a small number of online contacts to a large number of online contacts. The message flow is also really nice, and the tip of the "whitespace pings" shall be really useful. I'll try to implement your suggestions, but given that in order to obtain a good approximation for the results I would need a huge amount of traffic. If you manage to obtain that from your side, it would be really nice!

@All: after the tips from the posts above, I managed to find the IETF draft "Interdomain Presence Scaling Analysis for the Extensible Messaging and Presence Protocol (XMPP)" , at http://www.xmpp.org/internet-drafts/draft-saintandre-xmpp-presence-analysis-03.html , which contains some insightful analysis on the stanzas numbers and sizes. What I think is missing for a traffic characterization is the probability distribution to use for the time to send those stanzas. With the information I and Jonathan manage to find from traffic analysis I believe we'll manage to characterize well XMPP traffic between clients and servers.

Dave Cridland
06-09-2008, 02:03 PM
On Mon Jun 9 12:06:27 2008, JabberForum wrote:
> @All: after the tips from the posts above, I managed to find the
> IETF
> draft "Interdomain Presence Scaling Analysis for the Extensible
> Messaging and Presence Protocol (XMPP)" , at
> http://tinyurl.com/5kbumc ,
> which contains some insightful analysis on the stanzas numbers and
> sizes. What I think is missing for a traffic characterization is the
> probability distribution to use for the time to send those stanzas.
> With
> the information I and Jonathan manage to find from traffic analysis
> I
> believe we'll manage to characterize well XMPP traffic between
> clients
> and servers.

That's not a good draft to use, for a number of reasons.

Firstly, it's been written purely and simply as a contrast with
SIP/SIMPLE, and shouldn't be read on its own.

Secondly, the status change (and therefore presence traffic) which
the results are drawn from are thin-air figures - to my knowledge,
they're not based on any real-world measurements, they were merely
convenient figures which "felt" realistic for some unspecified
scenarios.

Thirdly, this concentrates on S2S, rather than C2S, traffic - this
may or may not be relevant, but I don't think it lends academic
rigour to your thesis.

So for your purposes, these are almost exactly the wrong figures to
use.

In my case, I can pull these figures out directly - overnight, when
I'm not at my desk, I get 0 <presence/> stanzas up, and an average of
0.003 <iq/> stanzas per second. (That's one every five minutes, and
is actually a XEP-0199 ping being sent by the server to see if the
client is still responsive).

Over approximately the same period, I get an average of 0.001
<presence/> stanzas per second down - and the same number of <iq/>
stanzas, of course.

I would hate to claim these figures were representative of anything -
in particular, on that particular XMPP account, the majority of users
in my roster are EU timezones.

Dave.
--
Dave Cridland - mailto:dave (AT) cridland (DOT) net - xmpp:dwd (AT) dave (DOT) cridland.net
- acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
- http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________

Peter Saint-Andre
06-09-2008, 05:06 PM
On 06/09/2008 12:31 AM, Jonathan Dickinson wrote:
>> I know
>> Jabber uses XMPP, but I couldn't find whether presence information
>> was exchanged over TCP or UDP, for start.
> [Jonathan Dickinson] XMPP is transport agnostic - that is, you can
> pump it over any transport mechanism that you want: TCP, UDP even
> HTTP (using BOSH): although I don't think there is an official UDP
> XEP for it.

There is no UDP transport (or reliable UDP transport) yet defined for XMPP.

Peter

--
Peter Saint-Andre
https://stpeter.im/


_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: JDev-unsubscribe (AT) jabber (DOT) org
_______________________________________________