platform/packages/sync/README.md
2021-09-12 10:52:19 +08:00

1 KiB

Angel3 Sync

version Null Safety Gitter

License

Easily synchronize and scale WebSockets using package:belatuk_pub_sub.

Usage

This package exposes PubSubSynchronizationChannel, which can simply be dropped into any AngelWebSocket 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 Angel3!

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