Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
johnm60 #1
Member since Jun 2010 · 32 posts
Group memberships: Members
Show profile · Link to this post
Subject: Stream Management XEP-0198
Hi Alex

Sorry to keep spamming your forums :-)

I am looking into issues around reliable messaging. The proof of concept that I have built, issues and responds to job requests on behalf of third-party systems. To the user, this is therefore a background service. I am using an Iq to send the job requests and the response to the Iq to delete the request off the "items to send" list. This works well for most cases, but when there is a network interruption it is difficult for the client to decide whether the message failed to send or the response from the Iq was not received.

I have looked at several strategies:
1. Re-send if no response received (possible to have duplicates)
2. Wait for a longer period and then do 1
3. Look into the client responding to the response (or acknowledging to the other party that the response was received)

It does seem as if XEP-0198 is trying to solve this with its acks and responses. Is this something that Matrix can do or is this a mechanism that is straightforwardly implemented without help from Matrix?

Regards
john
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
XMPP is reliable because its build on top of TCP which is a reliable protocol compared to UDP. But there are still race conditions which can cause problems. I have no experience with XEP-0198 yet, because I have not used it in any project yet. But I don't think it solves your problem. When using Iqs then you already have acks, the only difference is that the clients acks them and not the server.

To solve your problem you need a unique id for jobs. This could be the id of the iq. The client which processes the jobs must keep records of the processed ids. When you get no response of type result you can send the job again, when it already was processed then just send a result without processing it.

Alex
Avatar
atxalex #3
Member since Apr 2011 · 1 post
Group memberships: Members
Show profile · Link to this post
We are working on a XMPP deployment that requires reliable/guaranteed messaging (e.g. no lost messages), esp working with non-reliable connections. In our testing, we are losing messages when the tcp connection is not aware of the disconnect.

So we definitely need some form of XEP-0198. Are there any plans to incorporate this into the matrix SDK?

Thanks,
-Alex
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by atxalex:
So we definitely need some form of XEP-0198. Are there any plans to incorporate this into the matrix SDK?

yes, we are working on 198 which is coming with one of the next updates.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS