GithubHelp home page GithubHelp logo

rmacklin / anycable_demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anycable/anycable_demo

0.0 2.0 0.0 16.82 MB

Anycable demo application

Dockerfile 0.67% Ruby 78.44% Makefile 0.34% JavaScript 1.32% CoffeeScript 7.05% CSS 1.62% HTML 10.26% Shell 0.29% Erlang 0.01%

anycable_demo's Introduction

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 Action Cable server.

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

Requirements

  • Ruby ~> 2.4
  • PostgreSQL >= 9.4
  • Redis
  • anycable-go
  • hivemind (optional)
  • Headless Chrome + Chrome Driver (for tests only)

Usage with Docker

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

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

Usage without Docker

To launch AnyCable version:

# Run dev servers
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
bundle exec rails server

# Run specs
bundle exec rspec

anycable_demo's People

Contributors

palkan avatar rmacklin avatar sadovnik avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.