Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kenoir/faye_example

Trying out Faye for Websockets using JRuby
https://github.com/kenoir/faye_example

Last synced: 24 days ago
JSON representation

Trying out Faye for Websockets using JRuby

Awesome Lists containing this project

README

        

#JRuby Websockets using Faye

Uses:
- [Faye](http://faye.jcoglan.com/)
- [Puma](http://puma.io/)
- [EventMachine](http://rubyeventmachine.com/)

##Setup

```sh
chruby jruby
```

###Client (Browser)
Serves the static HTML containing the browser client, subscribes to Faye server
```sh
cd client
node server.js
```
Visit [http://localhost:8080/](http://localhost:8080/)

###Server (Puma)
Provides the Faye server (using Puma)
```sh
cd server
bundle install
bundle exec puma config.ru -p 9292
```

###Server-Client (EventMachine)
Provides a server-client to publish to browser clients via Faye server
```sh
bundle exec ruby client.rb
```