Skip to content

[DRAFT] NoSQL database agnostic persistence #1189

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

snazy
Copy link
Member

@snazy snazy commented Mar 17, 2025

Mostly complete proposal for the database agnostic persistence layer to support NoSQL databases in Apache Polaris.

This PR is intended to illustrate the “whole spiel” and contains all necessities. Smaller, easier reviewable PRs will be opened soon for some of the areas covered in this PR to initially enable MongoDB persistence.

The overall approach borrows the architectural approach from Nessie to isolate database specifics from higher level concerns.

The most important objective for the implementation is correctness, especially in scenarios with high concurrent load. Explicit tests to verify the correctness are included, for the CI “use case” and for manual/special runs against a clustered database setup (which are just “too much” for the Github hosted runners).

The current integration point is MetaStoreManagerFactory/PolarisMetaStoreManager implemented in the “bridge” Gradle project.

See components/persistence/README.md in this PR for more technical information.

To run Polaris w/ the “dummy” in-memory “database”:

./gradlew quarkusBuild
java -jar -Djava.security.manager=allow \
  -Dpolaris.persistence.type=persistence \
  -jar quarkus/server/build/quarkus-app/quarkus-run.jar

To run Polaris against MongoDB:

docker run --publish 27017:27017 --rm -ti mongo:8.0.5
./gradlew quarkusBuild
java -jar -Djava.security.manager=allow \
  -Dpolaris.persistence.type=persistence \
  -Dpolaris.backend.name=MongoDb \
  -Dquarkus.mongodb.connection-string=mongodb://localhost:27017 \
  -jar quarkus/server/build/quarkus-app/quarkus-run.jar

@github-project-automation github-project-automation bot moved this to PRs In Progress in Basic Kanban Board Mar 17, 2025
@snazy snazy force-pushed the persistence-nosql branch 5 times, most recently from 71814d8 to c12b122 Compare March 19, 2025 08:43
@snazy snazy force-pushed the persistence-nosql branch 5 times, most recently from 499528e to be15e39 Compare March 20, 2025 19:26
@snazy snazy force-pushed the persistence-nosql branch 14 times, most recently from fba1990 to b332065 Compare March 27, 2025 18:02
@snazy snazy force-pushed the persistence-nosql branch from b332065 to 51f58c5 Compare March 28, 2025 09:18
@snazy snazy force-pushed the persistence-nosql branch 2 times, most recently from acdb182 to feac6b6 Compare March 28, 2025 09:57
@snazy snazy force-pushed the persistence-nosql branch 6 times, most recently from b05911d to 641bbb4 Compare April 4, 2025 15:29
@snazy snazy force-pushed the persistence-nosql branch 6 times, most recently from 7eadb1a to 5936c9d Compare April 9, 2025 08:14
snazy added 7 commits April 11, 2025 10:26
Log explicit messages around auto-bootstrapping and unnecessary/left-over secrets that are (still) available.
Provides an abstraction to submit asynchronous tasks, optionally with a delay or delay + repetition and implementations based on Java's `ThreadPoolExecutor` and Vert.X.
Provides a framework and implementations for unique ID generation, including a monotonically increasing timestamp/clock source. Includes a [Snowflake-IDs](https://medium.com/@jitenderkmr/demystifying-snowflake-ids-a-unique-identifier-in-distributed-computing-72796a827c9d) implementation.
@snazy snazy force-pushed the persistence-nosql branch from 5936c9d to 7b29903 Compare April 11, 2025 11:03
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.

1 participant