Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyro2927/heroku-faye-node-redistogo
Easily get a pub-sub working with Faye on Heroku.
https://github.com/pyro2927/heroku-faye-node-redistogo
Last synced: about 17 hours ago
JSON representation
Easily get a pub-sub working with Faye on Heroku.
- Host: GitHub
- URL: https://github.com/pyro2927/heroku-faye-node-redistogo
- Owner: pyro2927
- License: mit
- Created: 2013-10-08T19:18:52.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-08T19:59:15.000Z (about 11 years ago)
- Last Synced: 2023-04-12T16:22:19.020Z (over 1 year ago)
- Language: JavaScript
- Size: 313 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Heroku-Faye-Node-RedisToGo
Easily get a pub-sub working with [Faye](http://faye.jcoglan.com/) on [Heroku](http://www.heroku.com/).
![Faye logo](http://faye.jcoglan.com/images/faye-logo.gif)
## Quick-Setup, 3 easy steps
1) Clone this repo:
git clone https://github.com/pyro2927/Heroku-Faye-Node-RedisToGo.git
2) Create Heroku instance and enable websockets & redistogo
heroku create
heroku labs:enable websockets
heroku addons:add redistogo3) Push up code!
git push heroku master
## Tech stuffs
[Faye](http://faye.jcoglan.com/) is a simple [pub/sub](http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern) server that allows you to pass messages back and forth between clients. This simple setup uses [node.js](http://nodejs.org/) to setup and manage Faye, as well as adding the ability to [cluster](http://blog.jcoglan.com/2011/05/25/faye-0-6-its-all-about-clustering/) by connecting to a [Redis-backend](https://github.com/faye/faye-redis-node).
## Clustering
This instance of Faye is setup to cluster around [RedisToGo](https://addons.heroku.com/redistogo), which allows you to have up to 10 connections/dynos on the free version. If you want more connections you'll have to upgrade to a larger plan. **Note: This is NOT the number of clients you can have connected to Faye, just the number of dynos you can have connected to the Redis-backend.**
![Faye cluster diagram](http://faye.jcoglan.com/images/faye-cluster.png)
## TODO:
* ~~Add in sample client page~~
* Add in pub/sub secret to only allow authorized users
* Auto-scale dynos as necessary