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

Clarifications to datacake-sqlite readme #39

Open
canadaduane opened this issue Jan 20, 2023 · 5 comments
Open

Clarifications to datacake-sqlite readme #39

canadaduane opened this issue Jan 20, 2023 · 5 comments

Comments

@canadaduane
Copy link

I'm approaching this project as a newcomer and have a couple of questions about the datacake-sqlite integration.

  1. How does datacake-sqlite relate to sqlite? Specifically, can I query whatever it produces using SQL?
  2. Is it possible to modify the sqlite storage using SQL, and if so, is there any expectation that these updates will eventually be consistent with other datacake nodes?
  3. Is the double negative in these assertion sentences a mistake? "No document should not exist!"

Thank you!

@ChillFish8
Copy link
Member

Hello! I'm sorry for not getting back to you sooner.

Yes, the readme probably could do with being improved and a bit more explicit:

How does datacake-sqlite relate to sqlite? Specifically, can I query whatever it produces using SQL?
You can but only the API provided via datacake in the form of the KV interface will be managed by datacake.
SQLite is effectively a glorified KV store here, primarily for convenience when testing or a small bit of data, it isn't able to replicate SQL commands across and apply them (unless you implement a more custom solution which is possible.)

Is the double negative in these assertion sentences a mistake? "No document should not exist!"
Yes :)

@AdamJSoftware
Copy link

Are there any plans of having full SQL capability? What is the current limitation of having full SQLite capabilities being compatible with Datacake's eventual consistency?

@ChillFish8
Copy link
Member

Are there any plans of having full SQL capability? What is the current limitation of having full SQLite capabilities being compatible with Datacake's eventual consistency?

One would need to replace SQLIte's underlying KV store with a wrapper in order to correctly reflect changes.

The reason for this is executing a SQL statement can create changes on multiple rows, and do not work well when you have multiple statements being executed and need to apply those changes in the correct order.

The eventual consistency nature of datacake makes applying the statements in the right order is nearly impossible.

@AdamJSoftware
Copy link

Once RAFT consensus is implemented, do you think it'll be easier?

@ChillFish8
Copy link
Member

Something like RAFT would indeed make it easier to do, it wouldn't be the same as the eventually consistent store, but that would be a good thing.

Currently the biggest blocker for any sort of raft support is the eco system still feels a bit unstable / unimplemented currently.

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

No branches or pull requests

3 participants