Instant Messenger on Juggernaut ? 1-1 private messaging ideas

47 views
Skip to first unread message

rubybox

unread,
Oct 11, 2011, 8:06:38 PM10/11/11
to juggernaut...@googlegroups.com

After looking into multiple options Juggernaut seems the way to go and promising,

I searched for examples of an Instant Messenger based on Juggernaut but could not found one.
Would it be possible to build a Private Instant Messenger with Juggernaut and Rails for example based on 2 channels that you would link together and protect from "praying eyes" ?

Anyone has done such a thing or could give some insights if this is possible and 
what the basic needs would be to get an IM up and running on Juggernaut? 

Nic

unread,
Oct 11, 2011, 8:26:26 PM10/11/11
to juggernaut...@googlegroups.com
You don't really need much to get a working instant messenger up and running. A very simple app could use a unique identifier, like a user_id, as a channel and use the out of the box functionality provided via juggernaut to send messages to those channels. 

A more complex example might be to use some intermediary interface, like a rails app with authentication enabled with some sort of gem, like omni-auth or authlogic, and use that to verify messages sent from clients before actually publishing to juggernaut. Alex provides a nice example of this on github: https://github.com/maccman/juggernaut

Gonçalo Silva

unread,
Oct 11, 2011, 8:31:41 PM10/11/11
to juggernaut...@googlegroups.com
Be careful with subscriptions and unsubscriptions — my company developed an instant messaging solution using Juggernaut, but some "hanging" connections kept accumulating over socket.io after users disconnected. After some time, the "online users" list was completely wrong. I'm not sure if this was fixed in the meantime.

Anyway, for implementation check Nic's reply. It's all there.

On Wed, Oct 12, 2011 at 01:26, Nic <nca...@gmail.com> wrote:
You don't really need much to get a working instant messenger up and running. A very simple app could use a unique identifier, like a user_id, as a channel and use the out of the box functionality provided via juggernaut to send messages to those channels. 

A more complex example might be to use some intermediary interface, like a rails app with authentication enabled with some sort of gem, like omni-auth or authlogic, and use that to verify messages sent from clients before actually publishing to juggernaut. Alex provides a nice example of this on github: https://github.com/maccman/juggernaut

--
You received this message because you are subscribed to the Google Groups "Juggernaut 2" group.
To view this discussion on the web visit https://groups.google.com/d/msg/juggernaut-for-rails/-/bW076rdhDBwJ.

To post to this group, send email to juggernaut...@googlegroups.com.
To unsubscribe from this group, send email to juggernaut-for-r...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/juggernaut-for-rails?hl=en.

Nic

unread,
Oct 11, 2011, 8:41:51 PM10/11/11
to juggernaut...@googlegroups.com
@goncalvo, try upgrading to the latest socket.io and juggernaut implementations. It now includes a keep alive and should give you much more confidence that certain connections are still viable. I haven't run in to this issue, but the project I've been working on hasn't really had a huge user base using it. 

rubybox

unread,
Oct 12, 2011, 3:21:30 AM10/12/11
to juggernaut...@googlegroups.com
Great great guys thanks for the reply's !
Missed that example Going to experiment with it and post back when I have it up and running :)

rubybox

unread,
Oct 12, 2011, 4:17:39 AM10/12/11
to juggernaut...@googlegroups.com
Got Juggernaut working in 5 minutes following the docs and after compiling node and install redis, great!

I think you refer to these examples? https://github.com/maccman/juggernaut/tree/master/client/examples

Its a bit unclear how exactly I should use that, could you please post some short info on how to implement? 
Im fairly new to ruby and juggernaut is another new level of technology.

Thanks!

Reply all
Reply to author
Forward
0 new messages