3 ms·
What would be nice as an addendum to this, especially with the likes of browserify and webpack for node and the browser would be a syntax to start an async chan
by tracker1 12y ago
What would be nice as an addendum to this, especially with the likes of browserify and webpack for node and the browser would be a syntax to start an async channel in a new process/webworker...
var ch = new echan('moduleName');
Where the moduleName would be a module that exports a single function that receives two channels.. in, and out for a request/response pattern. An "easy" level of abstraction here where the request/response is only going to pass what works with JSON.stringify/parse, removing circular references.
It could work really well for worker handlers... It only needs to be an abstraction around the csp interfaces, as well as the current implementations for web workers and forked processes in node.js
More advanced scenarios could use 0mq for passing a worker to multiple processes... all of that said, it's just an idea.
I think where this lines up very cleanly is as a means of communication with React and flux.