Open
Conversation
Signed-off-by: Jeremy Fleitz <jeremy@cosmonic.com>
lxfontes
reviewed
Feb 25, 2026
lxfontes
reviewed
Feb 25, 2026
lxfontes
reviewed
Feb 25, 2026
lxfontes
reviewed
Feb 25, 2026
| let redis_key = bucket_handle.prefixed_key(key); | ||
| let key = key.clone(); | ||
| async move { | ||
| match conn.get::<_, Option<Vec<u8>>>(redis_key).await { |
Member
There was a problem hiding this comment.
Logic wise this is fine, however can we use MGET?
One big redis roundtrip vs many small ones.
The code we have for v1 is for wrpc-bindgen so slightly different signatures https://github.com/wasmCloud/wasmCloud/blob/main/crates/provider-keyvalue-redis/src/lib.rs#L465
lxfontes
reviewed
Feb 25, 2026
lxfontes
reviewed
Feb 25, 2026
Member
|
This is 99% ✅ 🎉 |
Signed-off-by: Jeremy Fleitz <jeremy@cosmonic.com>
Author
|
Made updates to use MGET and MSET. I also added a check for u64 numbers that would be truncated/wrapped so that it still meets the WIT spec, but would throw an error if too large. Retested with the example/redis-keyvalue project. |
lxfontes
approved these changes
Feb 26, 2026
Signed-off-by: Jeremy Fleitz <jeremy@cosmonic.com>
Signed-off-by: Jeremy Fleitz <jeremy@cosmonic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Redis backend for
wasi:keyvalueand redis-keyvalue exampleSummary
wasi:keyvalueplugin (RedisKeyValue) inwash-runtimeusing therediscrate with a multiplexed async connection. Keys are namespaced per bucket as{identifier}:{key}.wasi_keyvalue_redis_urltoDevConfigso projects can opt into the Redis backend via.wash/config.yaml.wash devwith priority order: Redis → filesystem → in-memory.examples/redis-keyvalueproject — an HTTP component that stores and retrieves key-value pairs through thewasi:keyvalue/storeinterface, backed by Redis at runtime.Changes
crates/wash-runtimeredis.rsplugin;RedisKeyValue::from_urlconstructor;redisworkspace depcrates/wash/src/config.rsDevConfig.wasi_keyvalue_redis_url: Option<String>crates/wash/src/cli/dev.rsexamples/redis-keyvalue/Testing
Testing was completed by running a Redis server locally via Docker:
The example was built and run with
wash devfrom theexamples/redis-keyvalue/directory. The followingcurlcommands were used to validate correct behaviour:Signed-off-by: Jeremy Fleitz jeremy@cosmonic.com