IC WebSocket: Beta Release

Hello everyone,

@ilbert and I are continuing the work originally started by Dfinity to provide WebSocket functionality to the canisters deployed on the Internet Computer.

Today, we are releasing a beta version comprising:

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 :slight_smile:

Let’s fucking build!


Wow that’s awesome. How was this possible?

1 Like

The Gateway does the magic.

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 :wink:


You and @ilbert are definitely on my #icp-awesome list for doing this :grinning:


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!


Thanks for releasing! One of my first responses is thinking about this could help enable multiplayer pooling. Definitely exciting!


nice job.can not wait


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.


The stable release of IC WebSocket is out!