Patch: Selector Additions
Matt Mankins
matt at loremipsumbooks.com
Sun Dec 17 18:15:45 UTC 2006
On Dec 17, 2006, at 2:49 PM, Brad Fitzpatrick wrote:
> Rather than having the selector_creator stuff, can you just register a
> classname,
> Could just be something like:
>
> my $sub_class = sub_class_of($self->{role});
> if ($sub_class) {
> $sub_class->new_from_base($cb);
> return;
> } else {
> $cb->_simple_response(500, "Can't map to service type $self-
> >{'role'}");
> }
>
> And then sub_class_of looks at the registered role->class?
>
> Would simplify it a bit.
That is nice. Great.
> But I'm more interested in this XMPP stuff you're doing ... care to
> share? :)
I'm implementing XEP-124, HTTP Binding, with Perlbal.
http://www.xmpp.org/extensions/xep-0124.html
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.
Matt
More information about the perlbal
mailing list