[JDEV] Promiscuous presence for user communities (with patch)
Ryan Hart
ryanhart at rcn.com
Wed Oct 1 10:22:43 CDT 2003
As I was the one that originally posted the question that sort of started
this thread on promiscuous presence, I feel like I should step in and take a
few punches for Steven. If this is not the "correct" or preferred way to
accomplish this, can somebody please elaborate on other approaches? I have a
client that wants to implement exactly this sort of feature. They are going
to be integrating Jabber into their website so that users can chat. We will
be populating their rosters with other users, but we would like to have a
group of "connected" users so that there will always be somebody to chat
with if nobody from their roster is available.
For example, please explain in more detail how the presence bcc markup could
be used to solve this problem. I understand that I could create a component
to receive these messages, and I have played around with this some. Sure,
this component could capture all the presence information and save it in a
database. But, then what? I already have an xdb component, I would really
like to just return these connected users as part of the roster query
response. But that doesn't work... sure they'll show up in the clients
roster, but the presence will never be known because the server won't
receive a matching 'from' roster subscription for these jids. I would like
presence to be handled automatically by jabber as if there was a 2-way
'both' subscription between these users. I should also mention that presence
alone is not sufficient for our client. Our jids use numeric user_id values
from our database to be unique... we always display the roster "name"
attribute which is not part of the presence message.
As to making changes to the Jabber protocol, I don't understand all the
concern. I agree that it is always best to try to work within a protocol,
but I thought that part of the point of open source software is that you
could modify it "willy nilly" to meet your own needs. Generally not advised,
but sometimes the only option. I don't think that Steven posted this as a
protocol change, but simply as a solution to this problem for other people
like myself trying to do the same thing.
-- Ryan
-----Original Message-----
From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On Behalf Of
Peter Saint-Andre
Sent: Tuesday, September 30, 2003 9:30 PM
To: jdev at jabber.org
Subject: Re: [JDEV] Promiscuous presence for user communities (with patch)
Hi Steven,
First, it is already possible to do "promiscuous presence" in jabberd
1.4.2 using the "presence bcc" markup in the jabber.xml configuration
file -- see the release notes. This feature pipes all the presence off
to another JID (usually a component), which can provide an API for
sending presence out to whomever you please.
Second, you can't just add new presence types to the protocol. :-) This
protocol is now in IETF Last Call. Just as you can't add a new HTTP
method because you think PUT and GET are not enough, you can't add new
presence types willy-nilly.
I agree with you that community building might require something like
this, and putting that under the control of the user is good. But I
don't think that a new presence type is the best way to make that happen.
Peter
Steven Brown wrote:
>Jabber often is deployed to support user communities where it would be
>valuable
>to allow users of the same server to see each other's presence before
>they have
>established a buddy relationship. It can help users meet other users in
>their
>community, and make buddying with their friends simpler.
>
>This patch adds a 'promiscuous' presence type to Jabber to implement
>this
>concept. When a user sends a <presence type="promiscuous"/>, all other
>connected users on the same server will be notified of their presence as
>long
>as the promiscuous user stays promiscuous and connected ('unavailable'
>will be
>appropriately sent). The presence packets from promiscuous users seen
>by
>clients will be 'available' with a <promiscuous/> tag (example:
><presence
>type="available"><promiscuous/>...</presence>), so promiscuous-aware
>clients
>can take whatever action is appropriate; e.g., displaying these users in
>the
>roster.
>
>http://www-cse.ucsd.edu/~sbrown/jabber-promiscuous-swb.patch
>
>
>Btw, this has only had a few days of use here so far, so it might have a
>few bugs to shake out still. I'm sure there are a lot of folks in the
>same situation that'd find this useful, though, so give it a spin. :)
>It's basically an enhanced version of 'available' presence.
>
>_______________________________________________
>jdev mailing list
>jdev at jabber.org
>http://mailman.jabber.org/listinfo/jdev
>
>
_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list