Yes, please. I've never understood why someone wants to do pub/sub and only base the reliability on TCP/WebSockets. The concept of "fire and hope everyone who wants the message still has a connection open" always seemed fragile to me.<p>This has been the reason I've recommended implementing long-polling instead of WebSockets for real-time applications. And every time I see a real-time solution which <i>only</i> uses WebSockets I try to steer away from it. Once you have a reliable data model (which includes log position, retrieving old messages etc.) it's just as simple to implement long-polling as WebSockets. With WebSockets-only solution I can't help but think they base all the message delivery reliability on TCP.<p>This proposal looks like a clean (very Redis-like) solution, and I immediately see use cases for it.
That's cool. In case you haven't seen this blog post [1], it provides an extended discussion of the uses of this abstraction.<p>One comment about the groups API is that while it is very convenient, it seems a bit fragile - if a consumer is nuked immediately after it gets a fresh batch from redis then this batch is lost forever.<p>[1] <a href="https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying" rel="nofollow">https://engineering.linkedin.com/distributed-systems/log-wha...</a>.
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?<p>[1] <a href="https://github.com/louthy/language-ext/tree/master/LanguageExt.Process" rel="nofollow">https://github.com/louthy/language-ext/tree/master/LanguageE...</a><p>[2] <a href="https://github.com/louthy/language-ext" rel="nofollow">https://github.com/louthy/language-ext</a>