[ejabberd] BOSH connection warming

Stefan Strigler steve at zeank.in-berlin.de
Mon Oct 10 20:43:30 MSD 2011


JSJaC works with pre binding too. See method inherit at JSJaCHttpBindingConnection. To my shame it's not very well documented though. As already pointed out you need to supply some runtime information to make it go. Namely that's

* jid
* rid
* sid
* inactivity
* polling
* requests

The meaning of these parameters are documented at the BOSH spec. and have been used at the pre binding already so should be well known.

As an example you'd do sth like:

var con = JSJaCHttpBindindConnection({httpbase: '/http-bind/'});
// setup handlers
[...]
con.inherit({
            jid:        some_jid,
            sid:       some_sid,
            rid:        some_rid,
            inactivity: 30,
            polling:    2,
            requests:  1
        });


Greets, Steve


Am 07.10.2011 um 23:33 schrieb Daniel Dormont:

> I wasn't aware of pre-binding until now, but it's something I'm interested in. I'm still on the 2.1.x series (actually my production server runs 2.1.5 because that's what shipped with Ubuntu and I haven't figured out how to cleanly upgrade it).
> 
> The technique I'm using instead is one that works, but it's not the world's most elegant thing. I generate tokens and store them in a database, then use an extauth program that validates these as if they were  real passwords. It mitigates risk of setting a persistent password and sending it to the user every time they log in, but the overhead is even a bit higher than it would be using internal auth.
> 
> The system I have works well enough for now, but I might be able to help work on something here. One slight catch is that I use JsJAC instead of Strophe because my existing client is based on it, so I'd have to sort that out.
> 
> dan
> 
> On Thu, Oct 6, 2011 at 5:53 AM, Theo Cushion <theo at jivatechnology.com> wrote:
> What modules are people using to achieve HTTP BOSH pre binding (as per http://metajack.im/2009/12/14/fastest-xmpp-sessions-with-http-prebinding/)
> 
> I'm aware of:
> 
> - https://github.com/thepug/Mod-Http-Pre-Bind
> - https://github.com/skeltoac/http_prebind
> - https://github.com/theozaurus/mod_warm_bindings  (my own module)
> 
> However AFAIK none of these work past ejabberd 2.1.2. I've attempted several times to update mine, but so far no success.
> 
> I've also seen these tickets on the bug tracker:
> 
> - https://support.process-one.net/browse/EJAB-1128
> - https://support.process-one.net/browse/EJAB-1369
> 
> One of the tickets refers to this project:
> 
> - https://github.com/loe/Mod-Http-Pre-Bind
> 
> However this appears to only work for 3.0.0
> 
> Are people simply not using this technique anymore - if so, what technique are they using?
> Have people switched to 3.0.0 already?
> Am I completely missing something, and I can in fact get the goodness of 2.1.9 with one of these modules?
> 
> Thanks
> 
> Theo
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
> 
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20111010/b36985dc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20111010/b36985dc/attachment.pgp>


More information about the ejabberd mailing list