We built the open source real-time server, AnyCable, that deploys to Fly.io in one command (and configures itself), and the SDK for serverless JS/TS that allows you to build real-time features without any 3d-party PaaS. We call it a real-time server, because it has WebSockets and more, and it’s easy to run and scale.
Here’s all you need to add real-time to your Next.js/Vercel app:
– Deploy AnyCable to Fly.io with one command (see the docs)
– In your Vercel app add one serverless function (copy from docs)
– That’s it! Now you can write our business logic using AnyCable Serverless SDK :https://github.com/anycable/anycable-serverless-js
Benefits:
– Pay for the gas, not the taxi (unlike the PaaS)
– Own and control data
– Get as much flexibility to build out features as possible
– No vendor lock because it's open source
– Proven and tested abstractions–channels and subscriptions
– Guaranteed delivery and restoration of any messages lost due to connectivity issues
– Stability: we ensure auto scaling, smooth reconnection on deployment, fallbacks from WebSockets to other transport, and many more
– Integration with GraphQL ecosystem
Demo Next.js+Vercel+AnyCable chat app:
- live app: https://vercel-anycable-demo.vercel.app
- source code: https://github.com/anycable/vercel-anycable-demo
AnyCable: https://github.com/anycable/anycable
We hope you will give it a try and tell us what you think!