-
Notifications
You must be signed in to change notification settings - Fork 247
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
[SIP] sqlite host component #1408
Conversation
2fa06b7
to
f59a9ed
Compare
@itowlson I think this is ready for another look. The implementation pretty much matches the SIP now. That means the open questions still remain, but we have a working prototype. I guess the question now is: should we answer the open questions or merge and then figure out the open questions? (FYI: the CI failure is because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented only on the SIP (haven't read through the implementation but can if you want)
0f3e508
to
6e87d96
Compare
6e87d96
to
e7a978d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick proofreading review for the SIP
616fc5c
to
7d97005
Compare
I am marking this PR as ready to review. While this feature is not complete, I do believe it is useful enough for folks to start experimenting with. Below I've tried to capture the current state and the open questions we need to answer before we can officially make this a stable feature: This PR provides the following features:
There are still some open questions and things to discuss/think about:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments / questions / nits but nothing that can't be iterated on as we build it out. Nice one - thank you!
By the way, what is the order of landing things for the first iteration? I saw the PR took a dependency on a branch of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall.
The async { $BODY }.await
stuff is aggravating my OCD, mainly just because $BODY
does synchronous I/O and no async, so I'm definitely in favor of using block_in_place
instead. No need to split each method, either -- just make it task::block_in_place(|| { $BODY })
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and the todo example works great for me!
This is really exciting, thanks for working on it, @rylev!
I think this is ready to merge. We'll wait until the next version of spin is released so that we have a full release cycle to let this bake. |
3efdfb3
to
a8842b8
Compare
a8842b8
to
f9e54bb
Compare
#### Interface open questions | ||
|
||
**TODO**: answer these questions | ||
* `row-result` can be very large. Should we provide some paging mechanism or a different API that allows for reading subsets of the returned data? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could hedge on this by changing the function name to e.g. query-all
, reserving query
for a future cursor API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've addressed this in the latest commit.
b68040f
to
dfc657b
Compare
90f8625
to
e069a06
Compare
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
e069a06
to
85b93f8
Compare
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
This introduces a SIP for adding a sqlite interface to Spin as well as an initial MVP implementation.
Much like the key-value interface, this would be a "batteries included" implementation where users gain access to a SQL database with no configuration required.
I have also created an example TODO application that uses this MVP implementation.