Yeah, the whole backend is powered by message_bus. The android/ios client long-polls. Not sure if this is the best use of message_bus, but It works w/o the added complexity of web sockets. The major win is that it fits in our existing rails stack. The only disadvantage i’ve come across so far is that I can’t find an elegant way to support the typing indicator.
@sam I see this works with Thin. What about Unicorn, I’ve read that Thin is excellent (best supported) with Long-Polling, is this why you only support Thin when using Long-Polling with your message_bus gem?
Please correct me if I’m wrong but looking at the code Long-Polling seems to be enabled if Thin is running?
It works fine with unicorn, in fact we host all our sites on unicorn.
unicorn, passenger and puma all support rack hijack. This means message_bus can pull sockets out of the normal lifecycle and release the connections back to unicorn while keeping the socket open.
@sam Da quello che ho capito leggendo il README e questa discussione, message_bus sembra essere un sistema di notifica puro (qualcosa come un’alternativa a Pusher)
Ho ragione nel dire che non è progettato per implementare l’event sourcing nei sistemi distribuiti?
Tutti gli esempi qui sono piuttosto correlati al recupero di messaggi a breve termine, ma non è possibile ripristinare lo stato precedente dell’app dal flusso di eventi, a causa del meccanismo di troncamento. C’è qualcosa che mi sono perso?
Tecnicamente potresti aumentare la retention e usare PG come backend. Detto questo, mantenere un transaction log per sempre ha sicuramente dei costi. Ricostruire un database da 10 anni di transazioni, sebbene fattibile, probabilmente non è qualcosa che faresti.