Project

General

Profile

Stanza content filtering

Avatar?id=6023&size=32x32

Artur Hefczyc TigaseTeam
Added over 4 years ago

I have spent a lot of time recently looking at server logs. I noticed that simple <presence> stanza which 2 years ago looked like:
<presence
to="user1@server1.org/home"
from="user2@server2.pl/Work">
<priority>6</priority>
<status>away</status>
</presence>
Which looked nice, compact and sensible. There was no significant overhead apart, of course, from the overhead normaly caused by text based protocols.

What, however I have spot recently looks significantly different...
<!--break-->
Now jabber clients send as presence notification something like this:
<presence
to="user1@server1.org/home"
from="user2@server2.org/Work">
<priority>6</priority>
<status>away</status>
<x xmlns="vcard-temp:x:update">
<photo/>
</x>
<c node="http://gajim.org/caps"

xmlns="http://jabber.org/protocol/caps"
ver="0.10.1.6" ext="ftrans"/>
<x xmlns="jabber:x:signed">
iD8DBQBFNdb6NjFnqIXYF+URAoAmAJ0VttKAI696Ryqnu
XeS00boJdgCbBfE4C/7fp7PLdmjLJD7InHAaCtA==
</x>
<x stamp="20061018T07:25:47"
xmlns="jabber:x:delay"
from="user2@server2.org/Work"/>
</presence>
I would say this is significant overhead for just status notification. It doesn't also look much better if you look in <message> stanza content. There are messages sent without any content even which are, actually notifications like: user started writing a message, user closed chat window.... and so on.

Maybe I am a bit old and outdated. I remember times when all you had was dial-up 9600b modem connection. Now, one could argue we have proper broadband connection and we don't have to worry too much about bandwith.

Well this is true. But even now there are people who want to limit number of bytes sent or received. They are mobile devices users who are on GPRS connection. They usually pay for every byte sent.

So even now it does make sense to limit number of bytes sent in XMPP stanzas. But, well, we don't want to give up all these nice features and notifications. The idea is to introduce something like advanced filtering mechanism which could filter out unwanted stanza parts.

It could work in similar way as current privacy lists work but as a rule you could set what you want to discard from from the xmpp packet.