A demo is live on mainnet and it’s using a WS Gateway hosted by us to create a full-duplex connection between the frontend (integrating the SDK) and the backend (integrating the CDK).
We wrote a tutorial which will show you how to get started using WebSockets in your canister dApp in just 10 minutes.
DISCLAIMER: this is a beta version and should not be used in production. Breaking changes are to be expected. Please refer to our roadmap to know when IC WebSocket will be ready for production use.
ASK: we would love your feedback on this early version so that we can iterate and deliver what the community wants. If you follow our tutorial, please get in touch with us to let us know how we can improve.
We hope many of you will spend this first weekend of August exploring the possibilities of interacting with the Internet Computer via WebSocket
It exposes a WebSocket endpoint to (frontend) clients and polls the canisters on the other side.
This way, when from the canister you call ws_send, your message is saved in the canister’s state and read from the Gateway in the next polling iteration.
When the Gateway reads the message, it sends it through WebSocket over to the client.
If you want to go deeper, have a look at the How it works section of the Gateway’s README and feel free to ask any other questions here
It was great to brainstorm with you guys on the call a few days ago. Congratulations on the beta release. Looking forward to exploring an implementation where we can run the gateway on boundary nodes and enable low-latency communication on Internet Computer infrastructure. This improvement will be crucial to building fully on-chain games on ICP, and it will be deeply integrated into BOOM DAO’s infrastructure. Thanks for the awesome work!
We have early version of IC4J Java Websockets Client communicating with WS gateway. Enables any Java or Kotlin application to receive WS messages from ICP. Finishing some exception handling and we will publish it on Github soon.
Published an early version of IC4J Websocket Client.
This Java library implements the #ICP Websocket Gateway protocol, allowing any Java application to receive Websocket messages from ICP smart contracts.