Questions tagged [faye]

Faye is an easy-to-use publish-subscribe messaging system based on the Bayeux protocol. It provides message servers for Node.js and Rack, and clients for use in Node and Ruby programs and in the browser.

Faye is an easy-to-use publish-subscribe messaging system based on the Bayeux protocol. It provides message servers for Node.js and Rack, and clients for use in Node and Ruby programs and in the browser

359 questions
0
votes
1 answer

How to call a faye disconnect event from a button press

My problem is related to disconnect event of Faye. I can easily subscribe to a channel from java script and i can also handle the /meta/subscribe and /meta/connect. But I want some thing like a button in my html.erb file and using that i want to…
Braham Shakti
  • 1,408
  • 4
  • 22
  • 39
0
votes
2 answers

Faye channel subcription and publishing

While experimenting with faye(private-pub in rails) i got a pretty basic doubt.Do we need to subscribe to a channel before publishing to that channel? Please provide some resources for learning faye. Thanks in advance :)
Sai Suman
  • 47
  • 7
0
votes
2 answers

private_pub gem gives "undefined method `publish_to'" error

I am creating small chat app with rails, I am using private_pub (built on top of faye) gem by Ryan. I followed all steps as per his screencast , but i can't get it working. I am getting below error undefined method `publish_to' for…
Senthil
  • 946
  • 1
  • 14
  • 34
0
votes
0 answers

ruby on rails 3 error running faye server with private_pub

I am trying to run the code from this tutorial : http://railscasts.com/episodes/316-private-pub I downloaded the source from github and followed the instructions but then I run rackup private_pub.ru -s thin -E production the thin server doesn't…
Jatin
  • 14,112
  • 16
  • 49
  • 78
0
votes
1 answer

Faye: Can't send GET messages in browser even though socket is open, working and responding with data via CURL

So my websocket is opening properly to faye, I'm using the nginx_tcp_proxy module. When I run a curl it looks good: $ curl…
Nathan Wienert
  • 1,623
  • 3
  • 19
  • 25
0
votes
1 answer

node.js, faye (bayeux) - after subscribe event

I have a chat server. And after the clients subscribes I want to look in a DB to see if there is any history for the chat room they subscribed to. The problem is, that I can only catch "subscribe" events in extension which must do "return…
Matjaz Muhic
  • 5,328
  • 2
  • 16
  • 34
0
votes
1 answer

Android socket read method return -1

I used faye client in my project and had a strange problem with sockets. In this project we used SocketChannel.html#read(java.nio.ByteBuffer) method for reading from WebSocket and have -1 fo some reason. I checked socket object and saw that…
Alex Klimashevsky
  • 2,457
  • 3
  • 26
  • 58
0
votes
1 answer

Express.js application maxing CPU

I have built an Express.js application, running on Ubuntu with a Intel Xeon CPU E5540 2.53Ghz. The application uses MongoDB for session storage (express-session-mongo), EJS for view rendering, MySQL for data storage and Faye for internal messaging.…
Christoffer
  • 25,035
  • 18
  • 53
  • 77
0
votes
1 answer

How to implement business logic in Faye? Rails

I have Rack Faye application on Thin server and i have some logic on every faye client handshake/subscribe/disconnect. This logic requires data storage in DB, some calculations and publishing messages back to some channels. Where and how should one…
aristofun
  • 375
  • 3
  • 18
0
votes
2 answers

Rails acceptance tests - run Foreman

My application runs properly using Faye, Redis, Resque and other services, that I am starting every time with Foreman. Now I am writing acceptance tests with Capybara+RSpec, and I wonder how I could start Foreman (or even Faye alone) with Capybara…
0
votes
2 answers

Active filter for backbone.js collections

I have a little problem with my backbone collection. I just want to display 6 models, and always the latest 6. I use CollectionBinder (Backbone.ModelBinder) to render and display my collections and I use RailsFayeSubscriber to sync them with the…
jonepatr
  • 7,769
  • 7
  • 30
  • 53
0
votes
1 answer

Update activerecords in faye event listeners

I am writing a rails app which requires to track users' status to see if they are available, busy or offline. I'm using the private_pub gem, which uses Faye underneath. When a user signs in he subscribes to a channel /user/[:user_id]. I want to…
Chaoran
  • 321
  • 1
  • 4
  • 15
0
votes
2 answers

Nginx server configuration for Thin, Faye & Redis

/etc/nginx/nginx.conf looks like: user deploy; worker_processes 5; error_log logs/error.log; events { worker_connections 1024; use epoll; } http { include mime.types; default_type application/octet-stream; …
Ostap Tan
  • 111
  • 3
  • 13
0
votes
1 answer

Cannot use Faye locally anylonger

I'm used to start the Faye server on my local environment using sudo bundle exec rackup faye.ru -s thin -E production and it was working fine. But now I don't know what happened, and whenewer I try it i get this…
Abramodj
  • 5,709
  • 9
  • 49
  • 75
0
votes
1 answer

Exactly when does a rails controller actually render?

I have a controller that renders fetch.js.erb if the user exists. What I want to do is render this file, and then call update_tweets and save on the user object. Currently, update_tweets and save are called before the javascript is rendered. …
1 2 3
23
24