News for hackers. Stuff that matters.
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.

Re:Show HN: Proof of concept – Realtime single page apps by virgil_disgr4ce on Monday July 06, 2015 @11:19AM (#9839693)
Curious what OP's general thoughts on Meteor are—obviously this is more modular and less tied to a specific (arguably monolithic) design model. It'd be really nice if [ungendered personal pronoun] made an ultra-simple walkthrough tutorial a la Meteor's ;)
Re:Show HN: Proof of concept – Realtime single page apps by Aeolun on Monday July 06, 2015 @09:42AM (#9838987)
Oh, this is great! I'd been trying to get started with SocketCluster, but I didn't have much to go on. I could figure out lots of things, but examples are great!
Re:Show HN: Proof of concept – Realtime single page apps by mariopt on Monday July 06, 2015 @10:52AM (#9839498)
The Proof of concept isn't new, having in consideration MeteorJs and other recent frameworks.
Re:Show HN: Proof of concept – Realtime single page apps by zamalek on Monday July 06, 2015 @11:09AM (#9839615)
If you take the time to read the wall-of-text you'll find out that it's based on pub/sub and not RPC-esque like Meteor (which he also acknowledges in his wall-of-text). New? Probably not. Valuable? Not sure, pubsub is expensive but when you need it you really need it.
Re:Show HN: Proof of concept – Realtime single page apps by jondubois on Monday July 06, 2015 @11:32AM (#9839808)
Well observed. The problem with client to server RPC is that it's difficult to scale horizontally. When using pub/sub, on the other hand, you are giving control to your data consumers (frontend clients) so you don't run into issues of having to get references to specific users from your server (what if that user is connected to a different process/machine and not the current process?). I did a presentation a few weeks ago at my local JS meetup group which explained the issue better: http://slides.com/grosjona/realtime#/
Re:Show HN: Proof of concept – Realtime single page apps by jondubois on Monday July 06, 2015 @11:43AM (#9839899)
I'm not sure about the details of Meteor's RPC implementation so I can't comment on it specifically.
Re:Show HN: Proof of concept – Realtime single page apps by tinco on Monday July 06, 2015 @11:46AM (#9839925)
Meteor's DDP protocol is both pub/sub and RPC.
Re:Show HN: Proof of concept – Realtime single page apps by philippnagel on Monday July 06, 2015 @11:36AM (#9839842)
Doesn't Meteor implement pub/sub using DDP?
Re:Show HN: Proof of concept – Realtime single page apps by jondubois on Monday July 06, 2015 @11:52AM (#9839982)
DDP does sound similar to pub/sub. Maybe it's derived from it? Another approach for sharing realtime data between multiple client/frontends is via operational transform or differential synchronization but that is very expensive and it appears difficult to scale beyond a certain point due to latency (good for collaborative editing of rich text documents, but I'm haven't heard of it being used in other contexts).
Re:Show HN: Proof of concept – Realtime single page apps by jkarneges on Monday July 06, 2015 @12:45PM (#9840373)
I wouldn't say operational transform is an alternative to pub/sub. The two could be used together.