How does tigase handle PEP messages to an offline user? Do we have something like an PEP history?
How does one implement something like this in tigase?
Tigase does not do PEP archivization for offline users. I do not know if anybody (any other server does this), however, I do not think this is feasible.
If the server is under a high load, mostly from presence packets it would be nearly impossible to write all PEP messages to database or I should say it would be insanely expensive.
There are Tigase installation which process 500k XMPP packets per second (half million). Of course most of them are presence packets. I do not know what is percentage of PEP packets within all presence packets but even 10% gives us 50k PEP packets per second. A very optimistic assumption is that half of your buddies from the roster is online, the rest is offline.
This gives us 25k PEP packets per second to write to the database. Quite heavy task I would say, even for hyper optimized implementation and database configuration.
And, the last point is the question how much sense has the PEP notification which is 1 day old and after which there were 10 or maybe 100 more recent PEP messages. Do I really care what songs have you listened for the whole day or just what you are listening to right now? Do I really care in what location you have been for the last day (unless I spy on you) or just the current location when I am online?
That said, I have to admit implementation for this can be quite simple, almost trivial. At least unoptimized. If you need such functionality for a small service where you do not expect any performance issues I suggest to look at the plugin storing messages for offline users. Storing PEP can be done in exactly the same way. In fact the existing pug in for messages does store some presence packets already - subscription packets. So adding more (PEP) packets is really simple modification to the plugin.
I might be wrong because I have not tested this per se, but the Ejabberd configuration has this option ignore_pep_from_offline which when set to false will archive all PEP packets and deliver to offline listeners when the come online.
Unfortunately I do not know anything about EJabberd, and specifically I have no idea what this particular option mean.
Copyright © 2012 Tigase, Inc. All rights reserved. If you have any problems or need more information or any help please contact us