2 ms·
This looks very interesting. I use Redis as a backend for an actor-system [1] as part of a larger functional framework for C# [2]. I use RPUSH to add messages
by louthy 10y ago
This looks very interesting. I use Redis as a backend for an actor-system [1] as part of a larger functional framework for C# [2]. I use RPUSH to add messages to an actor's queue along with PUBLISH for saying 'new message' to the actor that should check its inbox, this is then followed by LINDEX 0 to peek at the item at the head of the queue, before calling LPOP when the message has been successfully processed. If I'm understanding this correctly, that process could be wrapped up in a single stream?
[1] https://github.com/louthy/language-ext/tree/master/LanguageExt.Process https://github.com/louthy/language-ext/tree/master/LanguageE...
[2] https://github.com/louthy/language-ext https://github.com/louthy/language-ext
- lobster_johnson 10y agoYes. Instead of multiple operations, you would get this from a single operation. But instead of modifying the log on every "pop", the operation would merely update a "read position" on behalf of the client. The position semantics would allow you to jump backwards in the log if needed.
- louthy 10y agoExcellent. This is very exciting! (well, for me at least)