Ah, thank you, I had forgotten this part.
To pull from some wisdom previously left on our forums:
So to be conservative, you’d need to be async on reads, writes and commit.
Ideally, you’d be able to write code like
(define do-something (tr)
(let ((a (okvs-get tr "a"))
(b (okvs-get tr "b"))
(c (okvs-get tr "c")))
(+ (bytes->int a) (bytes->int b) (bytes->int c)))
and the get of a
, b
, and c
could be done in parallel.
This might eventually come down to how would a non-blocking version of this fit with whatever the event loop/framework constructions in scheme look like, and I have no idea what those are.
I had played around with using proxy objects in python once, which are potentially an option in dynamic languages, but I suspect that scheme wouldn’t be amenable to trying to teach (+)
that if it gets something that is-okvs-future?
that it needs to wait on it to turn itself into an int
.