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

Implement an in-memory DB of db interface #275

Closed
hackerwins opened this issue Nov 25, 2021 · 0 comments · Fixed by #276
Closed

Implement an in-memory DB of db interface #275

hackerwins opened this issue Nov 25, 2021 · 0 comments · Fixed by #276
Assignees
Labels
enhancement 🌟 New feature or request

Comments

@hackerwins
Copy link
Member

hackerwins commented Nov 25, 2021

What would you like to be added:

Implement an in-memory DB of db interface.

Currently, MongoDB is required to run Yorkie to store its data. Persistent storage is required for normal use cases, but running MongoDB for simple testing is cumbersome. Since many users are new to Yorkie, we need to provide an in-memory DB so that users can test Yorkie simply.

https://yorkie.dev/docs/main/agent#running-agent

Packages related to DB are as follows:

  • yorkie/yorkie/backend/db package defines interfaces of methods and types that Yorkie access when using DB.
  • yorkie/yorkie/backend/db/mongo package is a implementation MongoDB version of the db package.
  • yorkie/yorkie/backend/db/memory package is a implementation in-memory version of the db package.

If the user passes MongoDB configuration by passing flags related to MongoDB, Yorkie uses MongoDB to store its data. Otherwise, Yorkie stores its data to in-memory DB like flags related to ETCD.

Why is this needed:

  • Users can simply run Yorkie without MongoDB to test it.
  • We can speed up tests in CI.
@hackerwins hackerwins added the enhancement 🌟 New feature or request label Nov 25, 2021
@hackerwins hackerwins self-assigned this Nov 28, 2021
@hackerwins hackerwins added this to v0.2 Nov 28, 2021
@hackerwins hackerwins moved this to In Progress in v0.2 Nov 28, 2021
Repository owner moved this from In Progress to Done in v0.2 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant