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 echo endpoint to server for sync check #356

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

paulgb
Copy link
Member

@paulgb paulgb commented Dec 12, 2024

This is extracted from #353 and includes only the server-side change.

It adds a custom message type that simply echoes back the content it received. Since the server processes messages sequentially, this is a way for a client to confirm that a message has been processed:

  • send some message
  • send a sync status message with a nonce
  • when you have received a message with the same nonce back, you can assume the message has been processed

@paulgb paulgb requested a review from michaelsilver December 12, 2024 21:42
Copy link

vercel bot commented Dec 12, 2024

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

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
y-sweet-debugger ⬜️ Ignored (Inspect) Dec 12, 2024 9:42pm
y-sweet-demos ⬜️ Ignored (Inspect) Dec 12, 2024 9:42pm
y-sweet-gendocs ⬜️ Ignored (Inspect) Dec 12, 2024 9:42pm

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 490c304 in 1 minute and 31 seconds

More details
  • Looked at 24 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. crates/y-sweet-core/src/doc_connection.rs:186
  • Draft comment:
    Using OnceLock::set can panic if called more than once. Consider using OnceLock::get_or_init or checking if it's already set to avoid potential panics.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_8TfaEwvtRibAYWTV


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@paulgb paulgb merged commit a881ae7 into main Dec 12, 2024
10 checks passed
@paulgb paulgb deleted the paulgb/add-echo-to-server branch December 12, 2024 21:48
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