Skip to content

Releases: anycable/anycable

1.5.0

02 Apr 00:02
Compare
Choose a tag to compare

Features

  • Added signed streams utilities.

    AnyCable::Streams module provides methods for signing and verifying stream names.

    See docs.

  • Core JWT functionality has been added merged.

    Previously available only via the anycable-rails-jwt plugin, the API for generating and verifying AnyCable JWT is now a part of the core Ruby SDK.

  • Added application secret support.

    AnyCable now allows you to define a single secret for all features (instead of specifying many of them). Read more in the AnyCable server release notes.

Changes

  • http_broadcast_secret is deprecated in favor of broadcast_key

1.4.3

03 Nov 21:57
c3a63f9
Compare
Choose a tag to compare

Features

  • Add broadcast options support.

You can specify the ID of the socket to exclude from the list of recipients:

AnyCable.broadcast "stream", data, exclude_socket: current_socket_id

Obtaining a socket form the client is up to the developer. (See @anycable/turbo-stream).

  • Add batch-broadcasting support.

It's now possible to aggregate broadcasts in batches, so they delivered via a single publish request/operation. One benefit of batching is that it guarantees the delivery order even in multi-node environments:

AnyCable.broadcast_adapter.batching do
  AnyCable.broadcast("my_stream", {text: "hoi"})
  AnyCable.broadcast("my_stream", {text: "wereld"})
end

1.3.0

01 Mar 01:43
cafe7fb
Compare
Choose a tag to compare

Features

  • Introduced configuration presets.

    Configuration presets are sensible configuration defaults for deployment platforms. Right now, Fly.io support is the most comprehensive and allows you to automatically connect Ruby and AnyCable-Go apps to each other (by setting correct RPC and broadcasting URLs).

    📖 Documentation

Changes

  • Ruby 2.7+ is required.

  • Add rpc_max_connection_age option (in favor of rpc_server_args.max_connection_age_ms) and configured its default value to be 300 (5 minutes).

  • Add mutual TLS support for connections to Redis.

    ANYCABLE_REDIS_TLS_CLIENT_CERT_PATH and ANYCABLE_REDIS_TLS_CLIENT_KEY_PATH settings to specify client certificate and key when connecting to Redis server that requires clients to authenticate themselves.

Experimental

  • Added experimental support for grpc_kit as a gRPC server implementation.

    Add grpc_kit to your Gemfile and specify ANYCABLE_GRPC_IMPL=grpc_kit env var to use it.

1.2.0 🎄

21 Dec 18:05
Compare
Choose a tag to compare

This release ends Ruby 2.6 support.

No significant changes. It's just Christmas time ⛄️

1.1.0 🚸

01 Jun 11:47
Compare
Choose a tag to compare

This is a maintenance release. Most changes are internal and doesn't affect public APIs.

Requirements

  • Ruby >= 2.6 is required.
  • Anyway Config >= 2.1 is required.

Features

  • Added AnyCable::CLI.embed! to make it easier to run an RPC server within a custom Ruby process.

Changes

  • BREAKING Middlewares are no longer inherited from gRPC interceptors.

That allowed us to have real middlewares with ability to modify responses, intercept exceptions, etc.
The API changed a bit:

 class SomeMiddleware < AnyCable::Middleware
-  def call(request, rpc_call, rpc_handler)
+  def call(rpc_method_name, request, metadata)
     yield
   end
 end

See built-in middlewares, for example.

  • The anycable gem has been split into anycable-core and anycable.

The first one contains an abstract RPC implementation and all the supporting tools (CLI, protobufs), the second one adds the gRPC implementation.


Full release notes

1.1.0.rc1

12 May 17:15
Compare
Choose a tag to compare
1.1.0.rc1 Pre-release
Pre-release

See notes for v1.1.0.

1.0.0

30 Jun 20:40
Compare
Choose a tag to compare

See the project's release notes for more information on all AnyCable libraries.

Please, checkout the upgrade notes to learn how to migrate from 0.6 to 1.0.

Features

  • Added HTTP broadcast adapter.

See documentation.

  • Added embedded option to CLI runner.

Now it's possible to run gRPC server from the Ruby processes:

require "anycable/cli"
rpc_server = AnyCable::CLI.new(embedded: true)
rpc_server.run

Changes

  • RPC schema has changed.

Using anycable-go v1.x is required.

  • Changed default gRCP server bind address from [::]:50051 to 127.0.0.1:50051.

Now you can specify only the part of the version, e.g. anycable-go:1.0 instead of the full anycable-go:v1.0.0.

Fixes

  • Fixed Redis Sentinel support.

See documentation.

0.6.3

02 May 20:39
cb4996a
Compare
Choose a tag to compare

Changes

  • Relaxed redis gem version requirement.

Use the same restriction as Action Cable does (>= 3).

0.6.0 "Lost in Hollywood" 🌆

15 Nov 07:33
b37b131
Compare
Choose a tag to compare

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.rb
bundle exec anycable -r app.rb
# or
bundle 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

  • Default server host is changed from localhost:50051 to 0.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
  # etc
end
  • REDIS_URL env is used by default if present (and no ANYCABLE_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

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 of Anycable

  • 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.5.2

06 Sep 14:32
1323103
Compare
Choose a tag to compare

Added HTTP health check server which could be used for readiness and liveness checks.

Health check server responds on /health with 200 when gRPC server is running and with 503 when it isn't.

Health check server is enabled if http_health_port configuration value is provided, e.g. through env variable ANYCABLE_HTTP_HEALTH_PORT=54321.

See #48 for details.