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

Add MLS Queue service #2031

Merged
merged 20 commits into from
Jan 14, 2025
Merged

Add MLS Queue service #2031

merged 20 commits into from
Jan 14, 2025

Conversation

jakzale
Copy link
Contributor

@jakzale jakzale commented Jan 13, 2025

Adds MLS Coordinator and Queue

In order to send messages client calls encryptGroupEventEpochSecret which matches that API of encryptGroupEvent.

In order to receive messages, the Coordinator has to be hooked via an adapter. The adapter will come in a separate PR.

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
river-sample-app ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 6:11pm

@erikolsson
Copy link
Contributor

I would consider changing this pattern here:

if (this.groupCache.has(streamId)) {
this.log.error(`externalJoinMessage: Group already exists for ${streamId}`)
throw new Error(`Group already exists for ${streamId}`)
}

where the caller gets an external join message, but it also writes the group state to cache making it impossible to create a new external join message. we should be able to track the pending state in a better way

@jakzale jakzale marked this pull request as ready for review January 13, 2025 16:44
@jakzale jakzale marked this pull request as draft January 13, 2025 17:33
Copy link
Contributor

@erikolsson erikolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall i think it maps pretty well with the direction we've talked about. but i'm sure we'll find some things we want to change down the road anyway.
some things we'll need to take into account:

  • sync resets (clean queue, decide what to do next)
  • (?) make sure we don't advance groups too far (3 epochs?) until we're dead certain that the epoch list is closed in the node

packages/sdk/src/mls/utils/mlsutils.ts Show resolved Hide resolved
@jakzale jakzale marked this pull request as ready for review January 13, 2025 18:11
@jakzale jakzale merged commit 5608143 into main Jan 14, 2025
9 checks passed
@jakzale jakzale deleted the jakub/mls-queue-service branch January 14, 2025 13:06
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.

2 participants