Anycable demo application
Ruby HTML CoffeeScript CSS JavaScript Shell Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Upgrade to AnyCable 0.5.0.rc1 Oct 7, 2017
bin Fix anycable script Jan 5, 2018
cable
config Enable access logging Jan 5, 2018
db Upgrade to AnyCable 0.5.0.rc1 Oct 7, 2017
lib
public Initial; add baskets Jun 20, 2016
spec
vendor/assets
.gitignore Replace pg with sqlite3; update Rails version Sep 4, 2016
.rubocop.yml Finish connect method Jun 28, 2016
Dockerfile Add parameterized channels; add erly Procfiles Nov 8, 2016
Gemfile Upd anycable Oct 21, 2017
Gemfile.lock Upgrade deps Feb 16, 2018
Makefile Run on localhost by default Nov 9, 2016
Procfile Disable SSL Jul 5, 2017
Procfile.bench_rails Add connection pool to golang server Jul 14, 2016
Procfile.bench_rpc
Procfile.dev Upgrade to AnyCable 0.5.0.rc1 Oct 7, 2017
Procfile.erly
Procfile.spec Run on localhost by default Nov 9, 2016
Procfile.spec_erl Add parameterized channels; add erly Procfiles Nov 8, 2016
README.md Upgrade to AnyCable 0.5.0.rc1 Oct 7, 2017
Rakefile Initial; add baskets Jun 20, 2016
config.ru Initial; add baskets Jun 20, 2016
docker-compose.yml Upd anycable-go docker version Oct 27, 2017
rebar.lock Configure for usage with erlycable Oct 9, 2016

README.md

AnyCable Demo

Sample application demonstrating AnyCable concept.

AnyCable allows you to use any WebSocket server (written in any language) as a replacement for built-in Ruby ActionCable server.

With AnyCable you can use channels, client-side JS, broadcasting - (almost) all that you can do with ActionCable. You can even use ActionCable in development and not be afraid of compatibility issues.

Requirements

NOTE: MacOS Sierra has a problem with gRPC.

Usage with Docker

You can use Docker to run the application with AnyCable server (Go version).

Simply run docker-compose up and you'll be able to access the application on http://localhost:3000.

Usage without Docker

To launch AnyCable version:

# Run dev server
hivemind Procfile.dev

# Run specs
make test

This runs 3 processes:

  • Rails Web app
  • Rails RPC server (GRPC)
  • Go Websockets server

To launch AnyCable version with ErlyCable you should set ERLYCABLE_DIR env variable first (or provide when running commands) pointing to ErlyCable repo path (i.e. /my/path/to/erlycable).

ErlyCable also requires Erlang >=18.0 and rebar3.

# Run dev server
hivemind Procfile.erly

# Run specs
make test-erl

This runs 3 processes:

  • Rails Web app
  • Rails RPC server (GRPC)
  • ErlyCable server (as rebar3 shell)

To launch plain Rails version:

# Run dev server
rails server

# Run specs
rspec