Back

Realtime with multiple connections

  • 0
  • Self Hosted
  • Flutter
  • Realtime
Kuromory
10 Dec, 2024, 12:34

I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need multiple connections for it? I tryed a singleton Realtime approach but then when I subscribe() sometimes the Realtime class can't keep up with createing a connection? and then I don't get any events... Also because of the navigator is dispose not allways called so I can get up to 11 Realtime connections if all pages are visited once with only the push menu...

TL;DR
Developers want to use Realtime with multiple Collections for different application logic. They are wondering if they can use only 1 Websocket connection or if they need multiple connections. They tried a singleton Realtime approach, but sometimes the Realtime class fails to create a connection when subscribing, leading to missed events. The navigator dispose not always being called results in up to 11 Realtime connections when all pages are visited once with only the push menu.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more