You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Thomas Kratz <ei...@googlemail.com> on 2011/01/09 16:50:29 UTC

[Vysper] Offline chat messages lost, volunteering

HI Bernd, Hi Niklas,

I found that I'm still subscribed to this list, haven't followed over
the last months indeed.
As I wrote on the users list, I found that offline messages get lost.
I am willing to try to implement this, but I guess I need some
starting points.

I had a look at the code where the OfflineStanzaReceiver comes to
play. I guess I would have a new Memory StorageProvider there that
could act as a receiver. Would you be fine if I have a StorageProvider
Interface that extends OfflineStanzaReceiver or is this too crude an
approach?
If not how would you do that ?

The OfflineStanzaStorageProvider would have a simple method like
Collection<Stanza> getPendingStanzas(bareJID)

I guess I would ask the StorageProvider for Stanzas to deliver when
the Users Presence becomes "available" again, but I have absolutely no
clue where to hook in for that. Should this go in the PresenceHandler
? Here I need some pointers to get me started with the code. As far as
I can see it should be easy then to try to deliver the stanzas once
more, is it ?

Regards Thomas


-- 
http://www.eiswind.de

Re: [Vysper] Offline chat messages lost, volunteering

Posted by Bernd Fondermann <bf...@brainlounge.de>.
On 09.01.11 16:50, Thomas Kratz wrote:
> HI Bernd, Hi Niklas,

Welcome Thomas! Thanks for volunteering.

> I found that I'm still subscribed to this list, haven't followed over
> the last months indeed.
> As I wrote on the users list, I found that offline messages get lost.

Please note that contact requests (presence subscription requests) do 
get lost, too (VYSPER-9). Don't know if this can easily be covered at 
the same time.

> I am willing to try to implement this, but I guess I need some
> starting points.

Here are some more general hints about offline message handling. There 
are (at least) two XMPP extensions covering this topic (beyond the 
general terms of RFC 3920 + 3921):

http://xmpp.org/internet-drafts/draft-saintandre-rfc3921bis-02.html - 
8.1 Inbound Stanzas
http://xmpp.org/extensions/xep-0013.html - Flexible Offline Message 
Retrieval
http://xmpp.org/extensions/xep-0160.html - Best Practices for Handling 
Offline Messages


> I had a look at the code where the OfflineStanzaReceiver comes to
> play. I guess I would have a new Memory StorageProvider there that
> could act as a receiver. Would you be fine if I have a StorageProvider
> Interface that extends OfflineStanzaReceiver or is this too crude an
> approach?

Sounds good as a first approach. This would be covered under 
https://issues.apache.org/jira/browse/VYSPER-180 already.

> The OfflineStanzaStorageProvider would have a simple method like
> Collection<Stanza>  getPendingStanzas(bareJID)
>
> I guess I would ask the StorageProvider for Stanzas to deliver when
> the Users Presence becomes "available" again, but I have absolutely no
> clue where to hook in for that.

I don't think this hook exists already.

> Should this go in the PresenceHandler
> ? Here I need some pointers to get me started with the code. As far as
> I can see it should be easy then to try to deliver the stanzas once
> more, is it ?

Yes, sounds about right. I'd go for 
PresenceAvailabilityHandler.handleInboundAvailable()

Have fun,

   Bernd

Re: [Vysper] Offline chat messages lost, volunteering

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Sun, Jan 9, 2011 at 4:50 PM, Thomas Kratz <ei...@googlemail.com> wrote:
> As I wrote on the users list, I found that offline messages get lost.
> I am willing to try to implement this, but I guess I need some
> starting points.

Bernd seems to have you covered on the details, so I'll just say
thanks for volunteering!

/niklas