Re:Show HN: Proof of concept – Realtime single page apps
by trestletech on Monday July 06, 2015 @11:57AM
(#9840028)
That's really nice. I had faced a similar problem a while back and didn't solve the network layer as neatly as you have. But one feature I would miss from this implementation is event "bubbling."
My approach is here: https://www.npmjs.com/package/giza . It would just parallel your storage engine (whatever that is) and not the rest of the project. But I'd encourage you to consider how to subscribe to a channel hierarchy. I find that many of the event-driven projects I touch have at least some components that can be more neatly modeled under a bubbling pub/sub system like this.
My approach is here: https://www.npmjs.com/package/giza . It would just parallel your storage engine (whatever that is) and not the rest of the project. But I'd encourage you to consider how to subscribe to a channel hierarchy. I find that many of the event-driven projects I touch have at least some components that can be more neatly modeled under a bubbling pub/sub system like this.