brettwooldridge / NuProcess

Low-overhead, non-blocking I/O, external Process implementation for Java
Apache License 2.0
712 stars 84 forks source link

Reactive Streams Support #71

Open ianclegg opened 7 years ago

ianclegg commented 7 years ago

The streams branch looks like it stalled, there were a couple of issues picked up under #53. Was there a serious issue, or did you just get fed up with it? 😉 I could really do with stream support and can offer my time, would you be open to a PR to get it into master and released if I can get it going?

brettwooldridge commented 7 years ago

@ianclegg Taking a look at it again this weekend.

If I recall, I didn't like how I (had to?) module the stdin stream. All the streams (stdout, stderr, and stdin) are Pushlishers. Obviously, stdout and stderr are publishers of data, but it is kinda strange if stdin is a publisher. That needs to be inverted...

ianclegg commented 7 years ago

Yer, I was looking at this too. It might be quite a big change. I need to integrate with Akka Streams. In end, rather than surface a Reactive Streams interface from NuProcess I decided to wrap it with a little like vietj. Happy for you to close the issue

vietj commented 7 years ago

it would be great to offer back pressure support indeed, not necessarily via Reactive Streams, as adapter can always be done, but whatever :-)

huntc commented 7 years ago

As an update to this case, we (Lightbend) are providing a reactive streams implementation via Akka streams here: https://github.com/typesafehub/akka-contrib-extra/pull/60.

brettwooldridge commented 7 years ago

Nice. We do have a streams branch, but development is on hold due to time constraints. The trickiest part is getting back pressure right.

huntc commented 7 years ago

Implementing the reactive streams API directly is tricky, as you've no doubt discovered. :-) While Akka streams will pull in undesirable dependencies for your library, there are other reactive streams libraries that may be better for you. For example, RxJava.