Questions tagged [websocket-rails]

Plug and play websocket support for ruby on rails.

Websocket-Rails

websocket-rails - Plug and play websocket support for ruby on rails.

Now with streaming HTTP support for improved browser compatibility

The Present

Start treating client side events as first class citizens inside your Rails application with a built in WebSocket server. Sure, WebSockets aren't quite universal yet. That's why we also support streaming HTTP. Oh, and if you don't mind running a separate process, you can support just about any browser through Flash sockets without changing a line of code.

The Future

The long term goal for this project is simple. Reduce the need to move application logic on to the client while still providing the same level of interaction and responsiveness users have grown to expect from a modern web application. We hope to isolate the responsibility of JavaScript to the presentation layer and keep business logic nicely organized on the server.

24 questions
5
votes
1 answer

Error during WebSocket handshake: Unexpected response code: 503

I am trying to use websocket rails with angular and heroku. It is working in development but now in production. Here's the server code that publishes the event and the client that listens to it.…
ajbraus
  • 2,909
  • 3
  • 31
  • 45
3
votes
0 answers

Rails initializer file not loading in production environment

I have patched websocket-rails gem to work in my development setup. I created a file websocket_patch.rb under config/initializers and copied the code from websocket-rails-0.7.0\lib\rails\app\controllers\websocket_rails\delegation_controller.rb…
Bijendra
  • 9,467
  • 8
  • 39
  • 66
3
votes
0 answers

websocket-rails: Cannot connect websocket

I must be missing some important information about using websocket-rails, because I can't figure out how to connect to the websocket server. After running websocket_rails:install and following the guide, I get the following: Firefox can't establish…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
2
votes
0 answers

websocket channel for the "current user"

Using websocket-rails, I can use the following code in my controller to tricker a websocket publish event: WebsocketRails[:channel_name].trigger('event_name', { foo: "bar" }.to_json) My goal is to create a pub-sub channel for the current user only.…
max pleaner
  • 26,189
  • 9
  • 66
  • 118
2
votes
1 answer

Rails Heroku Cloudflare SSL and websockets

I have set up my Rails app on Heroku and used the information in the post: Heroku + Cloudflare completely free SSL to get SSL working for free, but my websockets connection does not work. I get the error WebSocket connection to…
mahi-man
  • 4,326
  • 2
  • 25
  • 36
2
votes
0 answers

Websocket-rails not triggering message to channel (standalone, synchronized)

I'm trying to use websocket-rails (standalone, synchronized w/ redis on local.host:3245) with my Rails Grape API (running on local.host:3001) Now I try to send messages to channel A from one of my Grape API endpoints using for example:…
PSR
  • 513
  • 6
  • 16
1
vote
1 answer

Websocket controller not being auto loaded in Rails dev environment

So I've been having this problem for sometime since I started working with the websocket-rails gem. Apparently it can't autoload my 'broadcast controller' and is preventing me from running rails commands on the command line. I used to get around…
matt lao
  • 331
  • 1
  • 2
  • 11
1
vote
0 answers

Websocket Rails | 504 response | Connection ends abruptly

I am using websocket-rails gem for handling messaging service for my application. Tech Stack: Rails 4.2.5, Ruby 2.3.0p0, Passenger as app-server(Also tried with Puma), Thin as websocket server on port 3001, ngnix as web server and Websocket patch…
Sachin
  • 963
  • 11
  • 31
1
vote
1 answer

WebSockets: Can multiple Events fired in a private channel arrive out of order in client

I have already read through multiple posts on Websockets which highlights the fact that Websockets run on top on TCP Connection and the order is guaranteed. Since, I am new to `Websockets', I have a small query. I have a simple application in which…
1
vote
0 answers

Websocket-rails and redis-rb do not restore Pub/Sub Channel on failover

I'm using websocket-rails in a synchronized cluster configuration: 2 Rails Instances (FrontEnd) 2 Redis Instances, One Master one Slave (Backend) 4 Sentinel Instances on all Nodes Websocket-rails successfully creates a connection via redis-rb by…
1
vote
1 answer

Websocket Rails getting 404 during handshake

I installed the 'websocket-rails' gem and after doing the default configuration I just created a JS dispatcher and I get a 404 error on chrome console. This is my JS: var dispatcher = new WebSocketRails('localhost:3000/websocket'); This is the…
Victor Ferreira
  • 6,151
  • 13
  • 64
  • 120
1
vote
2 answers

The stratigy of build a talk-to-talk system using em-websocket in rails?

Maybe it is a good example for server push system. There are many users in the system, and users can talk with each other. It can be accomplished like this: one user sends message(through websocket) to the server, then the server forward the message…
Run
  • 876
  • 6
  • 21
1
vote
0 answers

Redis error on websocket-rails when sending an event to a specific client

I am using 'threadsocket-rails'branch of websocket-rails gem and RedisCloud service of heroku with memory size 30MB.(link: https://elements.heroku.com/addons/rediscloud) In my config, I have enable channel synchronization and set redis_options…
Sachin Prasad
  • 5,365
  • 12
  • 54
  • 101
0
votes
1 answer

Rails websocket connection ID storage

I search the Web socket rails gem but could not figure out weather the connection ID of a channel is stored on redis server or is stored on the rails memory. Any one has any idea where it is stored. Basically we want to scale our server by adding…
Sachin Prasad
  • 5,365
  • 12
  • 54
  • 101
0
votes
1 answer

Rails 4 + Websocket-rails + Passenger + Nginx + Load balancer

I've added some features to a couple of our web apps that needs websocket-rails. Everything works fine in development, but I am not sure how to deploy all this in our production environment since it's a bit more complex. The production setup: 1…
1
2