brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

DJabberd Status: Rosters [Mar. 19th, 2006|12:23 am]
Brad Fitzpatrick
[Tags|, , ]

Artur and I worked on rosters tonight. Nice, clean hooks and abstractions now....

Data structures:



DJabberd::RosterStorage -- abstract base class
DJabberd::RosterStorage::SQLite -- functional
DJabberd::RosterStorage::Dummy -- example
DJabberd::RosterStorage::LiveJournal -- LJ integration

All in cvs. Check it out.

Lot more to do yet:
-- finish Roster API (adding/removing items)
-- do roster pushes to all connected clients (easily locally, more fun with a cluster)
-- presence (big one, but roster pushes will get it a lot of the way there)
-- easy way for plugin authors to note certain functions as blocking and run them in child thread that won't stall the event loop (Jonathan Steinert's working on some Gearman modifications to make this transparent and easy, whether it's in a local process or anywhere else on the network...)
-- finish LJ integration

[User Picture]From: lithiana
2006-03-19 08:39 am (UTC)
is this going to be a general service for LJ users eventually?
(Reply) (Thread)
[User Picture]From: crucially
2006-03-19 09:16 am (UTC)
We sure hope so.

The LJ integration currently adds all your friends to a LJ Friends Group and pushes that to the client.
(Reply) (Parent) (Thread)
[User Picture]From: adamthebastard
2006-03-19 10:06 am (UTC)
The idea being that everytime a friend updates their journal LJ pushes the post over XMMP to you rather than having to poll LJ over HTTP?
(Reply) (Parent) (Thread)
[User Picture]From: dormando
2006-03-19 10:27 am (UTC)
Amazing how fast you're always able to crank out shit like this. Here's hoping it works well.
(Reply) (Thread)
[User Picture]From: visions
2006-03-19 05:17 pm (UTC)
i didn't dig around in the code much, but looks good so far in what i did see. why did you end up creating your own event loop? was libevent not good enough.. or does gearman leverage it somewhere?
(Reply) (Thread)
[User Picture]From: brad
2006-03-19 05:43 pm (UTC)
From C I use libevent.

From Perl I'd use POE, but it's so slow, and didn't support epoll. I added epoll support to POE years ago, it got ignored, I got cranky, it was still slow, and wrote my own that was fast and supported epoll.

Nowadays I feel like separating out Danga::Socket-the-eventloop and Danga::Socket-the-socket-base-class and letting them be independent entities that can both play with POE. That is, let my event loop run POE Components, or let my components run in the POE kernel proper. We hired a POE guy recently who is going to look at doing that.
(Reply) (Parent) (Thread)
[User Picture]From: visions
2006-03-19 07:49 pm (UTC)
(Reply) (Parent) (Thread)
[User Picture]From: brad
2006-03-19 08:10 pm (UTC)
I do. It also didn't exist when I wrote Perlbal. And libevent back then had the advertising clause in their BSD license, making it a little weird to release with Perl code which likes to be GPL or Artistic. I believe it's since been removed.
(Reply) (Parent) (Thread)