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

Replace Socket.IO with a lighter-weight alternative #188

Open
jniles opened this issue Jun 6, 2015 · 9 comments
Open

Replace Socket.IO with a lighter-weight alternative #188

jniles opened this issue Jun 6, 2015 · 9 comments

Comments

@jniles
Copy link
Contributor

jniles commented Jun 6, 2015

This has been mentioned before, but I'd like to get a public poll. Socket.IO is a bit overkill for the current project scope. My vote is for the ws. In particular, look at the comparisons between frameworks here and here.

Has anyone had experience with other frameworks more suitable to agar.io-clone? Can we decide on a new alternative to put together some migration code?

@JoeMattie
Copy link
Contributor

It needs to be done, no question about it. This is probably the most pressing issue preventing a game like this from scaling (with implementation of quadtrees or similar partitioning of players and entities being a close second).

I found some good info on the subject here:

http://buildnewgames.com/optimizing-websockets-bandwidth/

@c-hew
Copy link

c-hew commented Jun 9, 2015

I agree that WS is a better option. It solves many of the laggy issues!

@keon
Copy link

keon commented Jun 14, 2015

how about sock.js? I am planning on change to sock.js on my fork

@jniles
Copy link
Contributor Author

jniles commented Jul 2, 2015

@KeonKim , did you give sock.js a try? My concern is that sockjs doesn't use raw websockets and if we are going to the trouble of re-writing, we should be the lightest and best possible.

@keithagroves
Copy link
Contributor

The Agar.io server implementation Ogar is using ws. Would that work well enough?

@igorantun
Copy link
Collaborator

I think so. ws is great.

@keon
Copy link

keon commented Jul 2, 2015

@jniles I haven't touched on it yet, I also think going for ws is better choice though.

@jniles
Copy link
Contributor Author

jniles commented Jul 2, 2015

Sweet. I propose that refactoring efforts focus on making sure we have testable components and test cases for those components, then we can swap out bits and see how it goes. It seems the consensus is for ws, so when the time comes we'll use that library.

@abalabahaha
Copy link
Collaborator

I seem to have gotten a socket.io -> einaros/ws transition on one of my branches, still needs a lot of testing though.

On a side note, every website that uses the current tagline would be wrong if we were to switch off socket.io.

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

No branches or pull requests

7 participants