Patch: Selector Additions

Brad Fitzpatrick brad at
Sun Dec 17 18:34:39 UTC 2006

On Sun, 17 Dec 2006, Matt Mankins wrote:

> > But I'm more interested in this XMPP stuff you're doing ... care to
> > share?  :)
> I'm implementing XEP-124, HTTP Binding, with Perlbal.
> It's quite rough, but seems to mostly work.  I didn't quite get how
> everything fit together when first designing--especially the
> fields--, so it could probably use a revamp.
> Web Client -> Perlbal -> XMPP Binder Maintains a Flock of DJabberd
> Connections -> DJabberd
> For /xmpp urls we use a long-poll style connection that waits for
> DJabberd chatter.
> Also routing between multiple Perlbals isn't figured out.  I haven't
> decided if I should reproxy to the Perlbal where the DJabberd
> connection is open, or throw memcache in the middle somewhere or
> something else.
> In our system we've modified it so that /files goes to a Mogile
> handler, /xmpp to the XMPP Binder, and everything else gets reproxied
> to the app server.
> Let me know if you want to know more.

Wonderful!  That's what I hoped you were implementing (sounded like it).

Somebody else has been mailing me, asking about HTTP Binding, so it'd be
great if you could open source this.  I'm sure we could collectively work
out any kinks.

As for multiple Perlbals, if the client hit a Perlbal that didn't own that
session ID, you could just send out a discovery query to the local
network, asking which Perlbal owns that session (several ideas on how to
do this easily), then just use Perlbal's normal HTTP proxying stuff (in
particular the stuff used for X-Reproxy-URL, where no service is needed),
to proxy that HTTP request to the Perlbal which doesown that backend
DJabberd connection.

- Brad

More information about the perlbal mailing list