Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Added Support for Redis Engine #38

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Added Support for Redis Engine #38

wants to merge 14 commits into from

Conversation

zlu
Copy link

@zlu zlu commented Feb 28, 2012

When developer creates a private_pub_redis.yml under config's directory, private_pub will create Faye server with redis engine configuration. I have tested and it works.

There are a few things left to do:
Check that developers do not specify both host/port and unix socket for redis in the config.
Using a more recent release of Faye gem. The most up to date Faye gem has removed dependency to thin (now only in dev env). I have not tested against that version of Faye thus fixed the faye version to what I have been using in gemspec.

zlu and others added 14 commits February 22, 2012 13:42
Currently PrivatePub does not allow Redis engine to be specified when initializing the Faye server.
Developers can now create a private_pub_redis.yml where desired values can be specified as per:
http://faye.jcoglan.com/ruby/engines.html

This commit does not include checks for required fields or conflicts between using socket or non-socket approach.
@default_options is what we have today for specifying mount point etc.  But this can be changed to configurable as well.
…atePub is undefined and client will get an error on not able to accessing faye.js.
…up. Log a console error if it is not. PrivatePub client now no longer throw uncaught exception and upon seeing console log error, client can choose to handle the situation by performing a null check on PrivatePub.fayeClient.
…n it is up. Log a console error if it is not. PrivatePub client now no longer throw uncaught exception and upon seeing console log error, client can choose to handle the situation by performing a null check on PrivatePub.fayeClient."

We are violating cross-domain security check by making ajax call to Faye server.

This reverts commit ff647fa.
Faye 0.8.0 contains two incompatible changes according to:
http://blog.jcoglan.com/2012/02/27/faye-0-8-the-refactoring/

Notably, his check-in allows users to specify one of the 3 support adapters through private_pub.yml.
The supported adapters are: thin (default), rainbows, and goliath
@simonoff
Copy link

simonoff commented Apr 4, 2012

+1

@Stefano1990
Copy link

I know I am slightly late to the party but I would still appreciate some help. I am using private_pub in my application but I have noticed that after about 60-100 users concurrently using it, it slows noticably down. (delayes go up to 1-2 secs). So I wanted to see if switching to redis and multiple thin servers would cure this.

I managed to install zlu's branch but I am not sure how I can use multiple thin servers to serve faye? In the config there is only port 9292?

Thanks for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants