Private chat/Buddylist/User events

8 views
Skip to first unread message

Bjarman

unread,
Sep 13, 2009, 2:50:49 AM9/13/09
to meteorserver
Hello!

I am a complete noob to comet and meteor. I have a few questions. I
would like to know if there is any possibility for meteor server to
push data to a single user?

In a chat context this would be represented as a private chat. But in
a more general context this could for instance be represented by a
user with a buddylist getting notifications about what other users in
his/hers buddylist are doing at the moment.

For instance, user A has user B,C, and D in his buddylist. User B and
C are in a private chat and user D is reading a forum post. User A
would then be notified about user B, C and D's current activities.

Is there anyway that each user could be autosubscribed to a channel
consisting of events from users in his buddylist?

Hmm, perhaps this comes out a bit confusing....I hope someone
understands what I am getting at.

If anyone has made a successful example that might resemble what I am
looking for please post a link and an explanation.

Br / Bjarman

Kevin Peno

unread,
Sep 13, 2009, 1:00:51 PM9/13/09
to meteor...@googlegroups.com
You could do it a couple of ways.
 
The easiest way would be to have each user subscribe to a public notification channel. Then, when they are notified of a private chat, they subscribe to the new chat channel for that chat.
 
If you will have a have a high traffic site, this probably will not work do to meteor's scaling (it scales well for number of users, but not number of channels). You should just have a global chat channel. Then, to keep from snooping, you could encrypt the chat messages and decrypt them on the client side. To get the chat convo's cypher key you make an ajax request for it on the client side so that it is never sent through the global channel.
 
Hope that helps some :)

Kevin Peno
W: 425.582.8139
C: 425.408.1094


Chris James

unread,
Sep 13, 2009, 11:06:25 PM9/13/09
to meteorserver
Have you looked at Jabber/eJabberd/XMPP protocol?

Bjarman

unread,
Sep 14, 2009, 2:45:59 AM9/14/09
to meteorserver
Interesting thoughts. How would you suggest that user A will be
notified of a private chat request from user B?

My concern is that I would like to enable the push of events
concerning only a few users, 1to1 or 1to many.

Hmmm, ...mind boggeling...

On Sep 13, 7:00 pm, Kevin Peno <kevinp...@gmail.com> wrote:
> You could do it a couple of ways.
>
> The easiest way would be to have each user subscribe to a public
> notification channel. Then, when they are notified of a private chat, they
> subscribe to the new chat channel for that chat.
>
> If you will have a have a high traffic site, this probably will not work do
> to meteor's scaling (it scales well for number of users, but not number of
> channels). You should just have a global chat channel. Then, to keep from
> snooping, you could encrypt the chat messages and decrypt them on the client
> side. To get the chat convo's cypher key you make an ajax request for it on
> the client side so that it is never sent through the global channel.
>
> Hope that helps some :)
>
> Kevin Peno
> W: 425.582.8139
> C: 425.408.1094
>

Bjarman

unread,
Sep 14, 2009, 2:47:35 AM9/14/09
to meteorserver
Yes, for a chat only application jabber would suffice I guess. But i
would like not only to push chat events but in fact any event
concerning user activities. I have no experience in the jabber
protocol, perhaps it can do more than chat related stuff?

Are there any live examples where jabber is used "out of context" like
this?

Br / Fredrik

Kevin Peno

unread,
Sep 14, 2009, 2:49:26 AM9/14/09
to meteor...@googlegroups.com
In either case you'd send a global ping with some response that tells a given client "hey, you have a message" and then either, in case #1, tell it to join channel X or, in case #2, tell it to send an ajax request for the chat decode key so that they can receive the messages.

Kevin Peno
W: 425.582.8139
C: 425.408.1094


Reply all
Reply to author
Forward
0 new messages