Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dsc 93 event stream #1

Merged
merged 2 commits into from
Jun 6, 2023
Merged

Conversation

mschristensen
Copy link
Collaborator

Adds a very simple Stream implementation which will later be extended to support message de-duplication, re-ordering, discontinuity detection and more.

Uses vitest to mock the Ably Realtime client in unit tests.

This initial Stream implementation adds a very simple wrapper around
an Ably channel. Messages received on the channel are surfaced to the
caller via a subscription callback.

The Stream is an EventEmitter and exposes its state via events.
Additionally the stream can be pauses, resumed and disposed. This
will allow the Models SDK to manipulate the stream/channel according to
the model's lifecycle.

While not yet particularly useful, the idea is that the Stream will
handle:
- message de-duplication
- message re-ordering
- detect discontinuities (due to connection state recovery as well as
  due to failed connector publishes)
@mschristensen mschristensen merged commit 4f130b8 into main Jun 6, 2023
@mschristensen mschristensen mentioned this pull request Jun 6, 2023
@mschristensen mschristensen deleted the feature/DSC-93-event-stream branch June 6, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants