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 insert/remove/watch functionality to Object Store #404

Merged
merged 8 commits into from
May 1, 2019

Conversation

mikkokar
Copy link
Contributor

Adds Object Store functionality for

  • inserting new objects
  • removing existing objects
  • watching for changes

Concurrency issues:

  • Objects are stored in a persistent map. Each modification (insert/remove) creates a new, immutable object store snapshot. The snapshot is then serially published to all watchers.

Watching for Changes:

  • Consumers can listen for database changes by calling a watch method. It supports watching for the full database only. Watching for individual objects will be implemented in future when necessary.

  • A watch returns a reactive streams Publisher. When subscribed, the publisher emits the current object store snapshot, followed by a new snapshot every time database changes. The publisher keeps emitting the change events in perpetuity until unsubscribed.

- Add watch() method.
- Use persistent immutable data structures.
Emit current state at watch subscription.
Restrict visibility.
@mikkokar mikkokar requested review from kvosper and dvlato April 29, 2019 10:58
Copy link
Contributor

@kvosper kvosper left a comment

Choose a reason for hiding this comment

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

Just a couple of small suggestions, to keep javadoc consistent with conventions.

@mikkokar mikkokar merged commit 95170e1 into ExpediaGroup:master May 1, 2019
@mikkokar mikkokar deleted the refactor-styx-routing4 branch May 1, 2019 14: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.

3 participants