-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
75 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
<!-- markdownlint-disable no-inline-html --> | ||
# Getting Started | ||
# Getting started | ||
|
||
AnyCable acts like a bridge between _logic-less_ real-time server and _Action Cable-like_ Ruby framework (i.e. framework which support [Action Cable protocol](misc/action_cable_protocol.md)). AnyCable is a multi-transport server supporting WebSockets, [Server-Sent Events](/anycable-go/sse.md) and [long-polling](/anycable-go/long_polling.md). | ||
AnyCable is a language-agnostic server for web applications that brings performance and reliability to your real-time features. It follows Rails Action Cable conventions and uses [Action Cable protocol](misc/action_cable_protocol.md) as a primary communication protocol (while supporting others as well). AnyCable is a multi-transport server supporting WebSockets, [Server-Sent Events](/anycable-go/sse.md) and [long-polling](/anycable-go/long_polling.md). | ||
|
||
<div class="chart-container" data-view-transition="chart"> | ||
<img class="is-light" src="/assets/images/anycable.svg" alt="AnyCable diagram" width="40%"> | ||
<img class="is-dark" src="/assets/images/anycable_dark.svg" alt="AnyCable diagram" width="40%"> | ||
</div> | ||
|
||
The primary goal of AnyCable is to make it possible to write a high-performant real-time application using Ruby as a language for implementing a business-logic. | ||
|
||
This goal is achieved by _moving_ low-level responsibility (handling connections, parsing frames, broadcasting data) to real-time servers written in other languages (such as Golang or Erlang). | ||
The primary goal of AnyCable is to make it possible to write a high-performant real-time application keeping business-logic in your backend application (whether it's Ruby on Rails or serverless JavaScript or whatever). | ||
|
||
AnyCable could be used with the existing Action Cable clients (such as [Rails JavaScript client](https://www.npmjs.com/package/actioncable) or [Action Cable CLI](https://github.com/palkan/acli)) without any change. However, for web development we recommend using [AnyCable JS/TS client](https://github.com/anycable/anycable-client), which provides better compatibility with AnyCable-specific features. | ||
|
||
You can use AnyCable with: | ||
|
||
- Action Cable (Rails) applications (see [Using with Rails](rails/getting_started.md)) | ||
- Hotwire applications (see [Using with Hotwire](guides/hotwire.md)) | ||
- JavaScript applications (see [Using with JavaScript](/guides/serverless.md)) | ||
- [Lite Cable](https://github.com/palkan/litecable) for _plain_ Ruby projects (see [Using with Ruby](ruby/non_rails.md)) | ||
- your own [AnyCable-compatible framework](ruby/non_rails.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Upgrading from 1.4.x to 1.5.0 | ||
|
||
This document contains only the changes compared to v1.4.x releases. For the new features see the [release notes](../release_notes.md). | ||
|
||
## Upgrade process | ||
|
||
You can upgrade AnyCable server and your backend SDK (Ruby, JS) in any order. As soon you upgrade both, you can migrate your secrets (see below). | ||
|
||
## Secrets management | ||
|
||
TBD | ||
|
||
## AnyCable Rails | ||
|
||
### JWT | ||
|
||
The `anycable-rails-jwt` has been merged into `anycable` and `anycable-rails` gems. Remove `anycable-rails-jwt` from your Gemfile. | ||
|
||
If you used `AnyCable::Rails::JWT` module explicitly in your code, update it to `AnyCable::JWT` and pass identifiers as a Hash: | ||
|
||
```diff | ||
- AnyCable::Rails::JWT.encode(current_user:, expires_at: 10.minutes.from_now) | ||
+ AnyCable::JWT.encode({current_user:}, expires_at: 10.minutes.from_now) | ||
``` | ||
|
||
### Configuration changes | ||
|
||
Some configuration parameters has been renamed as follows: | ||
|
||
- `http_broadcast_secret` -> `broadcast_key` | ||
- `jwt_id_key` -> `jwt_secret` | ||
- `jwt_id_ttl` -> `jwt_ttl` | ||
- `jwt_id_param` -> `jwt_param` | ||
|
||
## AnyCable-Go | ||
|
||
### Configuration changes | ||
|
||
Some configuration parameters has been renamed as follows: | ||
|
||
- `http_broadcast_secret` -> `broadcast_key` | ||
- `jwt_id_key` -> `jwt_secret` | ||
- `jwt_id_ttl` -> `jwt_ttl` | ||
- `jwt_id_param` -> `jwt_param` | ||
- `jwt_id_enforce` -> `enforce_jwt` | ||
- `turbo_rails_key` -> `turbo_secret` + `turbo_streams` | ||
- `cable_ready_key` -> `cable_ready_secret` + `cable_ready` | ||
|
||
Older parameter names are still supported but deprecated and will be removed in v2. |