> Soooo... What's the best way to do this? I like it to work with JabberD > 1.4.2 but move over to JabberD 2.0 easily.
The concept will be the same, but its likely that some code will need to be changed. > 1) Write a Jabber component that queries the Jabber server for presence > info in real time. My guess is that this would be a bottleneck in web > page generation. Or am I wrong... And that component would need a subscription to each user that you wanted to get presence for. > 2) Write a Jabber component that listens in on <presence> packets and > keeps a cache in memory. My JSP bean simply queries the in-memory > cache. On cache misses we report "not available" and then request an > update in the background so our next report is a wee bit more accurate. > It's OK to be a little bit wrong in my app jabberd 1.4 has a presence BCC option that you can use with this. jabberd 2.0 has a <log/> component bind option that does roughly the same job (though you'd get copies of all packets, not just presence). Take a look at "msglog" and "bandersnatch" for some code examples. They're both on jabberstudio.org, IIRC. > 3) Same as #2, except drop the presence data into a database. This > gives us a more scalable approach. Same again, of course. > 4) Maybe patch the Jabber server to drop presence information directly > into a database Doable via session manager modules. You could just as easily write a session manager module that makes the session manager query-able for presence information (which gets around the subscription requirement of #1). I'm happy to provide more help once you've decided what you want to do. Rob. -- Robert Norris GPG: 1024D/FC18E6C2 Email+Jabber: [EMAIL PROTECTED] Web: http://cataclysm.cx/
pgp00000.pgp
Description: PGP signature
