[jdev] Message sending performance XEP-0124

andrezda10 at yandex.com andrezda10 at yandex.com
Fri Jul 1 14:00:37 UTC 2016


I have seen (mainly in wireless devices or situations) that sometimes
things are simply lost. Specifically, a message sent from A to B, but B
have not seen it and will not. In situations of "not so good" connection,
this is more frequent. In such situation I have seen that a probably good
solution is to repeat messages, requests or whatever applies.

In chats this sometimes leads to repeated sentences, acceptably. In other
situations this may lead us to smaller waiting periods (since we won't
have to wait the *maximum* timeouts, which are usually much higher than
the periods we need to know that it is *much probably a lost message*.


-=-=-=-=-= Certo dia, Marcel Waldvogel escreveu: =-=-=-=-=-
> "4. The BOSH Technique" says:
> "If the client has data to send while a request is still open, it
> establishes a second socket connection to the connection manager to
> send a new request. The connection manager immediately responds to the
> previously held request (possibly with no data) and holds open this new
> request. This results in the connections switching roles; the "old"
> connection is responded to and left awaiting new requests, while the
> "new" connection is now used for the long polling loop."
> So if you know that there are other messages pending at the client, do
> not use hold/wait until your sending queue is empty. If during a hold,
> the client needs to send a new message, open/reuse the secondary
> connection, if it needs to be sent before the wait interval has
> expired.
> -Marcel
> On Fre, 2016-07-01 at 15:46 +0530, Vaibhav Ranglani wrote:
>> Hello devs,
>>
>> I am implementing a custom solution in XMPP.
>>
>> During the session creation request, the client sends a session
>> creation request as follows.
>>
>> <body content='text/xml; charset=utf-8'
>>       from='user at example.com'
>>       hold='1'
>>       rid='1573741820'
>>       to='example.com'
>>       route='xmpp:example.com:9999'
>>       ver='1.6'
>>       wait='60'
>>       ack='1'
>>       xml:lang='en'
>>       xmlns='http://jabber.org/protocol/httpbind'/>;
>>
>>
>> In this request, the hold attribute is specified as 1. 
>> Due to this the issue I am encountering is that I am able to send
>> only 1 message per minute.
>>
>> Can I specify a value of 30-40 for hold variable. If yes, then what
>> will be the performance ramifications of this?
>>
>> Regards
>> Vaibhav




More information about the JDev mailing list