platform/packages/sync
Tobe O 0aca1c51de Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f'
git-subtree-dir: packages/sync
git-subtree-mainline: bda70d18e3
git-subtree-split: f5129b6882
2020-02-15 18:28:57 -05:00
..
example Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
lib Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
test Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
.gitignore Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
.travis.yml Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
analysis_options.yaml Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
CHANGELOG.md Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
LICENSE Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
pubspec.yaml Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00
README.md Add 'packages/sync/' from commit 'f5129b68825dbf7d3cefa29f9fd33b9e6458ef6f' 2020-02-15 18:28:57 -05:00

sync

Pub build status

Easily synchronize and scale WebSockets using package: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 Angel!

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