Menu
  • HOME
  • TAGS

Bayeux server hangs on connect request

java,websocket,faye,bayeux

The behaviour you are experiencing is exactly what a Bayeux server should do. The server does not "hang"; it holds the request in a long-polling fashion. I don't know much Faye but the CometD project, which defined the Bayeux protocol specification, implements a server in the same way, where the...

Check when Faye has finished the publish function

node.js,faye

There is a way to check if publishing a message has been successful or not: var publication = client.publish('/foo', {text: 'Hi there'}); publication.then(function() { // OK }, function(error) { // NOT OK, redirect }); This one is documented....

Ruby REST client publish-subscribe communication possible or not?

ruby-on-rails,ruby,rest,faye

REST is based on HTTP, so it is Request-Response. you can't make Pub/Sub service with REST. If I were you, I would use Faye to notify client about new resources, or whatever you want to monitor. And after notification you can make Ajax request to REST and get new record...

Messaging with Faye : ReferenceError: Faye is not defined

ruby-on-rails,ruby,faye

I would suggest you to use your actual ip instead of localhost in Faye.Client initialization in production environment(of course use request.host helper for this): var faye = new Faye.Client("http://#{ request.host }:9292/faye"); ...

Does phantomjs support Bayeux or WebSockets?

websocket,phantomjs,faye,bayeux

Just a simple answer: PhantomJS 1.x does not, but PhantomJS 2 does support websockets. Modernizr output for PhantomJS 2.0.0: ...

start faye on cloudControl

ruby-on-rails,faye,cloudcontrol

Only web type processes are accessible from the outside and they have to listen on the port specified in $port. Just like your first line in the Procfile. If you want a second process to listen on a port and be accessible from the outside, you have to put that...

beforeunload event on page refresh in firefox

javascript,jquery,faye

How can I prevent a page unload with jQuery? way down in the comments it says: event.preventDefault() doesn't work in this case, presumably because modern browsers don't want malicious coders to hijack the window and make it un-closable? – yochannah May 9 '13 at 8:45 I dont believe it is...

Using Faye on Heroku in production mode

ruby-on-rails,heroku,messaging,faye

I have found the solution. To use Faye with Heroku without need to add extra dynos (i.e. for free) you should mount Faye to your applications as middleware. The key point is adding particular lines to application.rb: require File.expand_path('../boot', __FILE__) require 'rails/all' require 'net/http' Bundler.require(*Rails.groups) module Helpdesk class Application <...

Private messages with Faye and Rails

ruby,ruby-on-rails-4,messaging,faye,railscasts

I solved it! The problem was that I had the subscribe function in application.js meaning it would run the subscribe javascript on each page. Instead what I did is at the bottom of the chat page view i subscribed to /messages/eve/adam. This is how I did that: <script> $(function(){ var...

Faye Ruby Server Side Publish on Heroku - EventMachine buffer overflow detected

heroku,websocket,out-of-memory,publish-subscribe,faye

Ok, I realised the mistake. I was creating the client outside the EM.run block. Once i moved the initialization inside the EM.run block, everything was working fine....

What is the best framework and difference of nodejs framework

node.js,express,faye

They are not very comparable. If you want to create a real-time application, you will probably need to use both. Express is a web framework. You will need it to serve and handle HTTP requests and responses. It will help you handle things like url routing, request/response handling middleware, interfacing...

faye is not available on client browser for node js

node.js,openshift,faye,bayeux

I found solution to my problem, here is what I followed Step 1) I was using wrong url to connect to faye, remove the endpoint from client var client = new Faye.Client('http://chat-yummyfoods.rhcloud.com:8000/faye',{ timeout: 20 }); Step 2) Get the websocket of your app and disable it for faye client var...

how to send connection refused to websocket client using faye-websocket-ruby

ruby-on-rails,ruby,faye

In the end it was rather easy. The way to return a response in rack is just: return [401, {}, ["CONNECTION REFUSED"]] ...

Rails Sync - Update a counter in layout

ruby-on-rails,websocket,publish-subscribe,faye

I will create a counter cache so when a new comment is posted the cache changes. I will render the model with the cache using: = sync partial: 'discussion', resource: discussion Then, when a comment is created, edited, deleted, partial should update. This will be the partial: li ul -...

Testing Emberjs app using QUnit and Karma fails due to `ReferenceError: Faye is not defined`

ember.js,variable-scope,qunit,faye,karma-qunit

The reason of that weird behavior is related to the following lines in Faye: if (typeof module !== 'undefined') module.exports = Faye; else if (typeof window !== 'undefined') window.Faye = Faye; Source: https://github.com/faye/faye/blob/master/javascript/faye.js#L143 So if module is not undefined(meaning it is defined) then module.exports will be set object, if not,...