Is this sort of thing feasible...

32 views
Skip to first unread message

Kieran Donohoe

unread,
Dec 8, 2011, 1:40:32 PM12/8/11
to Faye users
Scenario, two users in a private chat room using faye on a system
supporting say 100 of these rooms at the same time.

interaction would be using HTTP Request_methods to interact with faye.

If this is possible, how would I need to go about it.

RoR is the way I'd do it, but trying to set up multiple instances of
Faye is what I find hard.

Many Thanks,

Kieran Donohoe

James Coglan

unread,
Dec 13, 2011, 2:43:54 AM12/13/11
to faye-...@googlegroups.com
On 8 December 2011 18:40, Kieran Donohoe <kiera...@gmail.com> wrote:
Scenario, two users in a private chat room using faye on a system
supporting say 100 of these rooms at the same time.

This is totally feasible. ~100 channels (or 200, if you go with per-user channels), and 200 connections is fine. If you want to go up to 1000s of connections you may want to check out the Redis engine.
 
interaction would be using HTTP Request_methods to interact with faye.

Obviously, WebSocket is preferable. I've seen problems on the latest Node with rapid-fire HTTP requests, which is what you get if a lot of clients are sending large amounts of data over long-polling.

HTTP will work, within limits, but try to use WebSockets where possible.
 
If this is possible, how would I need to go about it.

RoR is the way I'd do it, but trying to set up multiple instances of
Faye is what I find hard.

You should only need one Faye server, at least to get started. By 'room' here, it seems like your model involves conversations between two parties, i.e. each message is addressed to a specific individual. In this case, I'd give each user their own channel, so you'd publish to, e.g. /messages/jcoglan to send a message to me. The message would contain the ID of the sender and the message text.

You may also need some authentication to make sure messages only reach their intended recipients. I won't make a decision on how you'd do this without knowing the specifics of your app, but there is plenty of discussion on this topic in the mailing list archives. 
Reply all
Reply to author
Forward
0 new messages