platform/packages/sync/README.md
2024-10-12 19:17:24 -07:00

1.1 KiB

Protevus Sync

version Null Safety Discord License

Easily synchronize and scale WebSockets using belatuk_pub_sub.

Usage

This package exposes PubSubSynchronizationChannel, which can simply be dropped into any ProtevusWebSocket constructor. Once you've set that up, instances of your application will automatically fire events in-sync. That's all you have to do to scale a real-time application with Protevus!

await app.configure(ProtevusWebSocket(
    synchronizationChannel: PubSubSynchronizationChannel(
        pub_sub.IsolateClient('<client-id>', adapter.receivePort.sendPort),
    ),
));