Tag: websocket

Java/JVM or Node.js/V8 for a WebSocket streaming client application?

I need to consume a JSON-formatted data stream via WebSocket, and send the data as is to a Redis server. That’s all this application needs to do; no UI, no requests need to be attended and the data doesn’t need to be processed at all. I want to get the smallest footprint and highest performance. […]

Using Node to stream Video to HTML5

I’ve been playing around with node and websockets and built a small test app that streams audio using websockets. The server breaks apart the mp3 using createReadStream, throttles the stream using node-throttle and sens the binary data using the “ws” module. On the client side I pick up the chunks on the websocket and use […]

Using Socket.IO, how can I find out the session ID of a disconnected user?

When a user disconnects from the server, how can I find out the session ID? At the moment I’ve got an ugly method of asking all existing clients to send a message back. e.g. on the server: socket.on(‘disconnect’, function() { // What’s the sessionid? });

Nodejs Websocket Close Event Called…Eventually

I’ve been having some problems with the below code that I’ve pieced together. All the events work as advertised however, when a client drops off-line without first disconnecting the close event doesn’t get call right away. If you give it a minute or so it will eventually get called. Also, I find if I continue […]

Debugging websocket failures behind corporate proxy/firewall

I have read in numerous places that in theory an ssl/443 websocket connection has a high percentage success rate when the client is behind corporate proxy/firewalls. This topic also touches on the issue: Websockets behind enterprises proxies. Our setup is node.js with websocket-node server side, passing binary data to Chrome 15+ client. No issues with […]

nginx and socket.io workaround

Right now, it is hard to work around most reverse proxies (nginx, HAproxy) when dealing with web sockets. I was thinking that it might be possible to do something like this: io.connect(“http://yourdomain:8080/chat”); // with namespace So a sample workflow would be: nginx listens on port 80 nodejs listens on port 8080 socket.io listens on port […]

Loading Jade -> HTML via Websockets + NodeJS instead of AJAX

Wondering if there’s a clean correct way to load html markup through websockets instead of through a $.ajax({…}) request. I’m somewhat new to websockets so I’m trying to figure out where it can completely replace AJAX and so on… Right now I just create another ‘post’ router in my NodeJS app to load the html […]

Reverse proxy websockets (SSL), traffic through Stunnel to many node.js apps

I’m looking for some ideas… I have a series of robust node.js apps that need to be delivered to specific users (post authentication), virtually no file serving, only the initial delivery of the index. The rest of the communication is all done via socket.io. ClientA (login) needs to be connected to an application on lets […]

How to disable Multiplexing with Socket.io

I am using Socket.io to stream live tweets to my users using Twitter’s Streaming API (my implementation is more or less based on this tutorial). The problem is that every time a connection event is fired by Socket.io the newly connected client causes every other client connected to the server to cease updating. While it […]

how to enable WebSocket with nginx on AWS Elastic Beanstalk server?

I deploy a nodejs application on the aws beanstalk servers and want to use socket.io feature based on WebSocket protocol. I know there’s a discussion here to directly connect to nodejs servers instead of using nginx as an proxy server. But if I still want to have the nginx as proxy server because of extra […]

Node.js is the Best Javascript runtime in the world.