Closed AdrianRossouw closed 9 years ago
should also be possible to mount seneca proper using @mcollina's https://www.npmjs.com/package/seneca-act-stream
:+1:
The problem is getting results back. seneca-act-stream implies there is no reply.
I'm kind of against this. jsonic is like 2000+ lines of code, and this is going to weight something in the browser.
@mcollina while doing it I also started feeling it was wrong for this project. I made a PR mostly to be able to share/discuss.
It is the kind of thing that should be easy to add via an external module though, and easy to integrate with an external system that does this.
it did lead me to realize that the branching function should be asynchronous (for situations where you don't know if you are branching until you ask an external server).
I was looking at @rjrodger's new zeno library and it got me inspired to see what it would look like in graft.
This changes the where matching to use the same combination of patrun and jsonic, so it makes the following possible.
the result of that message will have similar semantics (although reversed) of seneca's this.prior. When you send the message, the result will be firstStream.pipe(secondStream);
There's probably still a mismatch between the functionality of seneca and this, but that may also be due to the fact that graft/streams define explicitly the order of execution.