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

Simplify batch queries #218

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Simplify batch queries #218

merged 2 commits into from
Oct 11, 2024

Conversation

richardhuaaa
Copy link
Contributor

@richardhuaaa richardhuaaa commented Oct 9, 2024

  1. Allow only one vector clock to be specified for each batch query (allows the server to be more simple/performant)
  2. All endpoints are now batch endpoints, removed batch from all endpoint names
  3. Remove a bunch of nesting from the protobufs. Note that a repeated field cannot be placed inside a oneof field, so I decided to remove the oneof filter as the alternative is multiple layers of nesting.

This and the next PR are fairly disruptive changes, heads up @mkysel. I'll take care of the server-side code changes, let me know if you'd like me to fix up client changes.

xmtp/xmtpd#126

Copy link
Contributor Author

richardhuaaa commented Oct 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @richardhuaaa and the rest of your teammates on Graphite Graphite

@richardhuaaa richardhuaaa changed the title feat: simplify batch queries Simplify batch queries Oct 9, 2024
@richardhuaaa richardhuaaa marked this pull request as ready for review October 9, 2024 00:47
@richardhuaaa richardhuaaa requested a review from a team as a code owner October 9, 2024 00:47
@richardhuaaa richardhuaaa merged commit 06e6a50 into main Oct 11, 2024
5 checks passed
@richardhuaaa richardhuaaa deleted the rich/simplify-batch-queries branch October 11, 2024 05:02
richardhuaaa added a commit to xmtp/xmtpd that referenced this pull request Oct 11, 2024
These are the minimal accompanying code changes for
xmtp/proto#218, which are a prerequisite for
#126.

- Flattens query requests into a simpler structure
- Publishes and queries are now *batch* publishes and queries. For now,
we operate against the *first* item in the batch
- I added tasks to properly implement the batching and unit tests later,
but don't treat it as high priority for now
- Adds a common method to validate batch query requests (refactored out
from the subscribe worker)
Copy link

🎉 This PR is included in version 3.72.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants