Read with threshold and maximum blocking duration
darkyne opened this issue · 1 comments
Hello.
I am having a little fun with Lasp trying to test little scenarios and measure few things.
I have a question regarding crdt read with threshold.
I find it very useful, especially for measurements, but I wonder if there was an easy way to adapt them to block until thresold is met or until a certain time elapsed. I ask this since, in some rare scenarios, I end up with dead nodes that wait for a threshold that it will never met (other node supposed to modify the crdt died for example).
Something like:
lasp:read(Crdt_id, Threshold, MaxDuration) would sound great in my opinion, allowing to generally block until threshold is met but not indefinitely blocking if the threshold is never met.
I could not find this kind of variant but maybe it's not that hard to implement.
Any advice on the easiest way to do that would be very welcome, I'm an Erlang beginner...
Thank you for your tips or if any one would implement such a function without too much effort, it would help me a lot !
Found out an easy way to implement this, surprised Erlang concurrency is so simple !
Since it's that easy, not sure this kind of feature is really relevant to merge in lasp, closing :)