AnyCable v0.6.0 Release Notes
Release Date: 2018-11-15 // over 5 years ago-
π RubyConf 2018 special.
tl;dr
anycable
CLI;redis
gem is no longer a runtime dependency (but still required for Redis broadcast adapter); health checkers; middlewares support and more flexible configuration.π π Check out a new documentation website.
π Features
CLI
AnyCable now ships with a CLIβ
anycable
.π Use it to run a gRPC server:
# run anycable and load app from app.rbbundle exec anycable -r app.rb# orbundle exec anycable --require app.rb
π All configuration options are also supported as CLI options (see
anycable -h
for more information).The only required options is the application file to load (
-r/--require
).π You can omit it if you want to load an app form
./config/environment.rb
(e.g. with Rails) or./config/anycable.rb
.AnyCable CLI also allows you to run a separate command (process) from within a RPC server:
$ bundle exec anycable --server-command "anycable-go -p 3334"
π§ Configuration
- 0οΈβ£ Default server host is changed from
localhost:50051
to0.0.0.0:50051
π¦ Expose gRPC server parameters via
rpc_*
config params:AnyCable.configure do |config| config.rpc_pool_size = 120 config.rpc_max_waiting_requests = 10# etcend
0οΈβ£
REDIS_URL
env is used by default if present (and noANYCABLE_REDIS_URL
specified)π§ Make HTTP health check url configurable
β Add ability to pass Redis Sentinel config as array of string.
π§ Now it's possible to pass Sentinel configuration via env vars:
ANYCABLE\_REDIS\_SENTINELS=127.0.0.1:26380,127.0.0.1:26381 bundle exec anycable
Broadcast adapters
0οΈβ£ AnyCable allows you to use custom broadcasting adapters (Redis is used by default):
# Specify by name (tries to load `AnyCable::BroadcastAdapters::MyAdapter` from# "anycable/broadcast\_adapters/my\_adapter")AnyCable.broadcast\_adapter = :my\_adapter, { option: "value" }# or provide an instance (should respond\_to #broadcast)AnyCable.broadcast\_adapter = MyAdapter.new
π₯ Breaking: to use Redis adapter you must ensure that it is present in your Gemfile; AnyCable gem doesn't have
redis
as a dependency anymore.Other
- β Added middlewares support
π See docs.
- β Added gRPC health checker.
π See docs.
π Changes
NOTE : the old API is still working but deprecated (you'll see a notice).
π Use
AnyCable
instead ofAnycable
π New API for registering error handlers:
AnyCable.capture\_exception do |ex| Honeybadger.notify(ex)end
- π
AnyCable::Server.start
is deprecated and will be removed in the next version
- 0οΈβ£ Default server host is changed from