A 100% ActionCable-compatible WebSocket server for real-time features in Crystal applications.
Cable is a WebSocket server library for the Crystal programming language that enables real-time, bidirectional communication between server and clients. It solves the problem of adding live features like chat, notifications, or updates to Crystal web applications by providing a server-side implementation fully compatible with the ActionCable JavaScript client.
Crystal developers building web applications that require real-time features, especially those transitioning from Ruby on Rails or seeking an ActionCable-like experience in Crystal.
Developers choose Cable because it offers 100% compatibility with the widely-used ActionCable JS client, eliminating the need for custom client-side code, and provides a flexible, multi-backend architecture that integrates smoothly with existing Crystal web frameworks.
It's like ActionCable (100% compatible with JS Client), but you know, for Crystal
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works 100% with the standard ActionCable JavaScript client, eliminating the need for custom frontend code, as highlighted in the README's seamless integration examples.
Supports multiple pub/sub backends including Redis, NATS, PostgreSQL, and AMQP, allowing developers to choose based on existing infrastructure, though some are experimental.
Can be integrated with any Crystal web framework like Lucky or Kemal, providing versatility without locking users into a specific ecosystem.
Offers identified connections and owned user instances, simplifying authentication and state handling, as demonstrated in the connection class with user token decoding.
Includes hooks for error reporting to third-party services like Bugsnag, enabling easy monitoring integration, as shown in the configuration examples.
Alternate backends such as NATS, Postgres, and AMQP are flagged as potentially needing work before production use, limiting reliability for non-Redis setups.
Lacks support for ActionCable's `stream_for` helper, requiring manual stream naming, which the README admits in the ChatChannel example.
Default logging produces high volume, potentially increasing costs, and the README warns users to tune levels to 'warn' for critical logs only.
Requires detailed configuration including middleware placement, backend selection, and error handler setup, which can be daunting for new adopters.