Live data from Hacker News

Introducing Socket.io 1.0

socket.io

61–70 of 76 posts

Re: Introducing Socket.io 1.0

#61
post #52

Earlier quoted context omitted.

I tried using faye and it died very quickly under load with the redis backend. For every message that you send it queues it up into a redis list for each faye server in the cluster to read which doesn't scale very well in their very chatty redis queue system. I would do significant load testing for each use case before using it (or socket.io for that matter). I needed to push 30-50 messages per second to each connect…

That's an incredibly high rate of messages. What could you possibly need that many messages for? I'm in no way surprised that generic solutions don't work for your case.

This: https://map.couple.me

We kept the design simple, otherwise a "batching" mechanism could be introduced that would replay a single batch of 50 messages but that would make everything a second delayed. However, part of the map allows you to login and see your messages live on the screen as you're sending them to your partner and for that the real time streaming is pretty critical.

Re: Introducing Socket.io 1.0

#62
>The Socket.IO Server is now only 1234 lines of code

I prefer to think in standardized terms like KBs, not lines of code.

EDIT: For the downvoters, I am just saying that it would have been more beneficial to myself had they of addressed their improvement in terms of a percentage of code reduction or actual measurable size of their code. I was not trying to be snarky.

Re: Introducing Socket.io 1.0

#64
post #63

demo on http://socket.computer - err, I knew new TLDs might be fairly annoying but didnt think they would totally break my brain's URL parser. At first I thought that the article's author forgot to replace an intranet link.. nope its a new tld here to mess with our heads!

Sadly TLDs are really getting out of hand. I was notified today that .ninja is now available. This coupled with Dr. Dre potentially joining the Apple board and the TrueCrypt announcement has made for a pretty surreal day in tech news.

Re: Introducing Socket.io 1.0

#66

Might I suggest you not hijack the "DEBUG" environment variable? It will almost certainly cause issues down the line when you could be using SOCKETIO_DEBUG.

DEBUG is not solely used by socket.io, but rather by all modules that make use of the `debug` node package:

https://github.com/visionmedia/debug

The DEBUG variable holds a comma separated list of names (or wildcard patterns) used to narrow the scope of the debug output.

For example, to get debug information about the internal components of socket.io and express, you could do:

DEBUG=socket.io:,express: node index.js

There really isn't a big chance of hitting problems with the DEBUG variable, since it's defined locally to the command and not exported, and there's already a reasonably well established convention of using it like that for node modules.

Re: Introducing Socket.io 1.0

#67
post #55
post #50

Earlier quoted context omitted.

You can't use both. In Primus you can select only one transformer, listed above by V1, but if something doesn't work, you can just switch it with a single line of code. No rewrites, no need to learn a new API.

I know you can't use both, but doesn't engine.io already support websockets?

Yes it does, but if you are building something that works perfectly only using websockets (e.g. a command-line utility), why would you use engine.io?

You can tell engine.io to only use websockets, but what's the point if you can use websockets directly and have the same API?

Re: Introducing Socket.io 1.0

#68
post #61

Earlier quoted context omitted.

That's an incredibly high rate of messages. What could you possibly need that many messages for? I'm in no way surprised that generic solutions don't work for your case.

This: https://map.couple.me We kept the design simple, otherwise a "batching" mechanism could be introduced that would replay a single batch of 50 messages but that would make everything a second delayed. However, part of the map allows you to login and see your messages live on the screen as you're sending them to your partner and for that the real time streaming is pretty critical.

I love Couple, I was looking at this map earlier this week actually. Very interesting to read how you made it work, thanks for sharing.

Re: Introducing Socket.io 1.0

#69
Seems pretty good, and faster than the previous version, but:

- Changed some things (method names, and so on) with no reason - It's not possible to use a custom logger anymore - I can't access the list of rooms anymore (or it changed and they didn't documented it yet)

Somebody else ?

Post reply on HN