I'm building a messaging app like WhatsApp. My goal is to expose only REST API through Rails and "push notifications" to connected clients via websockets. So clients communicate with server only with the REST API. Only the server sends data through…
I am writing an application that keeps track of content pushed around between users of a certain task. I am thinking of using WebSockets to send down new content as they are available to all users who are currently using the app for that given task.…
I have a rails app I am running on thin server to utilize the EventMachine run loop. The problem is that I would like to be able to include em-websocket to process information coming in from a ws and stop and start the websocket without stopping the…
I'm building an application for a web-based slide show, where one 'master' user can move between slides and everyone's browsers follow along. To do this, I'm using websockets and Redis for a global channel to send messages through. Each client who…
I'm using eventmachine to read from a HornetQ topic, push to a Channel which is subscribed to by EM websocket connections. I need to prevent the @topic.receive loop from blocking, so have created a proc and am calling EventMachine.defer with no…
I've been using Socket.io with node.js for some time, but I'd really love to do this in Ruby. There seem to be some projects available, but most of them are dead, namely:
danthes - fork of Ryan Bates' private_pub
cramp - no activity for the past 9…
By following example from em-websocket gem, I've just create simple echo-server that running with Sinatra framework. The problem is I don't understand how to use some format to send message instead of plain text. For now, the code looks…
I write a HTTP server (A) using Sinatra::Streaming (I use Ruby). It needs to read data from a WebSocket server (B) and forward it to a client (C). The data flow is "B-->A-->C". The read and write operations should be in real time.
As a possible…
I have been looking into this gist which provides a minimal functional implementation of channelled pub/sub style communication over websockets.
For multiple channels we can have a local hash of EM::Channel instances which can be created on the fly…
I started developing a web-socket based game using the em-websocket gem.
To test the application I start the server by running
$> ruby server.rb
and then I just open two browsers going directly to the html file (no web server) and start playing.…
When an "onmessage" event fires in the web socket protocol are you guaranteed the full message or is it more like a straight TCP connection where you buffer the data first and then try to extract packets.
I created a live chat on a rails application and I am using EventMachine to run a Websocket to have live chat. The live chat works on localhost on several machines.
It also worked on an Amazon EC2 instance in development on ubuntu, but when I tried…
I am using the em-websocket to make communication for clients (may 2 or more users).
In their introduction . https://github.com/igrigorik/em-websocket
I want to modify their simple echo server example to achieve my purpose.
but in their example ,…
There are three parts in my Rails application:
A part which listens for HTML5 web sockets (em-websocket)
a piece of JavaScript which connects to them
and a part which task is to connect to these sockets from inside of the same web application…
I have websocket opened under a certain port, and when the client web browser closes, I want the websocket to be closed cleanly so that the server program keeps running and accepts a new connection.
Right now, I have client side code as…