4 ms·
Hey substack, The implicit callback is definitely my least favorite part in building NowJS. You can still pass in an additional callback to do any asynchronous
by ericz 16y ago
Hey substack,
The implicit callback is definitely my least favorite part in building NowJS. You can still pass in an additional callback to do any asynchronous I/O. We're trying to find ways to make this experience better for the next version
- substack 16y agoThe solution I settled on for dnode is that a deep traversal finds all the functions in your argument list, pulls them out, and wraps them. This part of the protocol is a reusable module if you want to go with it: https://github.com/substack/dnode-protocol https://github.com/substack/dnode-protocol It's written for continuation-passing style but it shouldn't be too hard to retrofit it for other call styles if you want to preserve explicit returns for instance.
- chrisdew 16y agoI've just written JSON-RPC over SocketIO (for another project). I was going to open-source it. Is NowJS a superset of this? If so, I don't want to create noise by releasing a less-functional alternative.
- sthatipamala 16y agoIt's not quite JSON-RPC but it does the same thing.