If you google around a bit, im sure you would find code for doing what you want. The component concept I personally have done, and it was <bcc/>ed on presence. I stored the presences in a DB and did DB access from the webserver to scarf up the presences. It was a hack, and I'm sure you could do better, but I think I still have my code around (perl) if you are interested in looking.
--


Nicholas Perez
Email:  [EMAIL PROTECTED]
Jabber: [EMAIL PROTECTED]
Home:   303.759.0574




On 2003.07.02 17:25, Mike Prince wrote:
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(
"[EMAIL PROTECTED]" ); %>
</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


_______________________________________________ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev

_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev

Reply via email to