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

Byoung/object store async lookup #253

Merged
merged 6 commits into from
May 3, 2023

Conversation

computermouth
Copy link
Contributor

@computermouth computermouth commented Apr 27, 2023

Not sure if some of this is overkill or not. Particularly adding AsyncItem::PendingLookup(PeekableTask<Result<Vec<u8>, ObjectStoreError>>) rather than converting the object store response to a Response and cramming it in AsyncItem::PendingReq(PeekableTask<Response<Body>>).

But I thought it'd certainly be possible that some of the attached functionality on the internal side might warrant a different type.

Also @JakeChampion, I made a minor change to the .witx, for pending_lookup_wait()

@JakeChampion
Copy link
Contributor

I've not reviewed the code, but I thought I leave a comment to let people know that it does in fact work!
I wrote a version of the JS SDK which uses the new hostcalls that this PR has implemented and it is working like a charm.

To run the test JS SDK application, you can use the steps below:
❯ git clone https://github.com/fastly/async-store-lookups-test-app
❯ cd async-store-lookups-test-app/
❯ npm install
❯ VICEROY_PATH="/path/to/my/local/viceroy/which/implements/async/lookup/target/release/viceroy" npm start

The application should now be running on http://127.0.0.1:7676/

Visiting http://127.0.0.1:7676/ should return the word world
Visiting http://127.0.0.1:7676/readme should return the contents of the README.md file

If the above two routes work - then async lookups are working 🥳

lib/src/error.rs Outdated Show resolved Hide resolved
lib/src/session.rs Outdated Show resolved Hide resolved
lib/src/session/async_item.rs Outdated Show resolved Hide resolved
@dennismartensson
Copy link

Great to see this making progress! On have not reviews but want to request that we change all references to object store to kv store, since this will ship after the name change has happened.

Copy link
Contributor

@aturon aturon left a comment

Choose a reason for hiding this comment

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

Looks good overall, just had a few comments about names to take into account together with the kv renaming.

@dennismartensson
Copy link

Here are the tickets that I think outline all the stuff we should add https://fastly.atlassian.net/browse/EDATA-55

lib/src/session.rs Outdated Show resolved Hide resolved
lib/src/session.rs Outdated Show resolved Hide resolved
lib/src/session.rs Outdated Show resolved Hide resolved
@acfoltzer acfoltzer removed their request for review May 2, 2023 22:40
@computermouth computermouth requested a review from aturon May 3, 2023 15:07
Copy link
Contributor

@aturon aturon left a comment

Choose a reason for hiding this comment

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

Looks great! ✨

@computermouth computermouth merged commit e93c13d into main May 3, 2023
@computermouth computermouth deleted the byoung/object-store-async-lookup branch May 3, 2023 19:01
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.

4 participants