Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing socket.io servers/connections #114

Open
jskulski opened this issue Dec 25, 2011 · 2 comments
Open

Sharing socket.io servers/connections #114

jskulski opened this issue Dec 25, 2011 · 2 comments

Comments

@jskulski
Copy link
Contributor

Hey,

Been playing around with juggernaut for a bit, I like it and saved me a bunch of work so thanks.

I have webapp that has some pub/sub data that gets pushed to clients. That's where juggernaut comes in.
I also have non-pubsub data, like list of channels or archived deals. I'm new to this, so its quite possible I just have a wrong idea or architecture. That's why I'm checking ;)

Is there anyway to:

  • tell juggernaut a socket.io server to use?
  • piggyback on juggernaut's socket.io server?
  • use juggernaut for non/pub data?

The other method I could think of is that I have a 'all' channel that every connection connects to and I can publish to that, but that seems wasteful, both in having to spin through all the subscribers and also pushing it through redis instead of directly through socket.io.

I'll keep looking, but let me know if you have any ideas.

@jskulski
Copy link
Contributor Author

I am using node.js as the backend if that wasn't clear. Thanks!

@simplyb
Copy link

simplyb commented Mar 22, 2012

I'm using Rails 3 and I configure the redis server to connect to with this code in an initializer:


Then in JavaScript I configure which juggernaut server to connect to:


var options = {
        host: host,
        secure: secure,
        port: port
};
MyApp.juggernaut = new Juggernaut(options);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants