My main concern with Pushstreams is adoption. It currently is an OSGi spec that probably will not see a lot of usage outside of OSGi. Reactive streams is already supported by a few frameworks and with Spring 5 supporting it I assume there will be lots of projects out there that use it. It also seems the reactive streams API will be part of Java 9 which makes it even more interesting.

I wanted to use the reactor DSL as it is quite rich .. like e.g. sliding window support. The component framework should be independent from it but for my examples I need to decide for a stream DSL of course. Ideally of course there could be examples with different stream DSLs but I wanted to start small.

Christian


On 29.06.2017 13:50, Timothy Ward wrote:
Hi Christian,

PushStreams are a fundamentally different take on the way streams are 
controlled, mostly in an effort to make them simpler. They do not implement the 
reactive streams API, although it is possible to adapt between them. You 
mentions that you want to be independent of a stream DSL, but also that you 
specifically want to use the reactor DSL. These two things seem to be at odds 
with one another…

With Push Streams you have a Push Event Source, which can be implemented 
directly (it’s lambda friendly) or you can use a SimplePushEventSource.

 From the producing side you simply publish events as they arrive. A consumer 
can directly connect to a source, or you can make a PushStream from it using a 
PushStreamProvider. A PushStream is assembled just like a Java 8 Stream, and 
gets you answers at the end.

Push Streams are available in the sonatype OSGi repository, and are in the 
latest R7 draft spec. I do suggest taking a look as I think it will save a lot 
of code.

Regards,

Tim


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to