[JDEV] Lots of Presence: Distributed access to presence data from a server farm
    Mike Prince 
    mike at mikeprince.com
       
    Wed Jul  2 18:25:42 CDT 2003
    
    
  
I'd like a simple mechanism I can drop into my web page logic to
determine the presence of anyone that's a member of the Jabber server I
control.
For example, my JSP page would include:
<html>
<body>
The user romeo is <%=presenceTrackerBean.getPresence(
"romeo at myjabber.com" ); %>
</body>
</html>
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.
Some ideas:
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...
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
3) Same as #2, except drop the presence data into a database.  This
gives us a more scalable approach.
4) Maybe patch the Jabber server to drop presence information directly
into a database
Thanks in advance,
Mike
    
    
More information about the JDev
mailing list