Re:Reactive (Dataflow) Programming in Java and Clojure with ...
by kasey_junk on Thursday February 20, 2014 @03:02PM
(#7273179)
It's been a while since I looked, but the best reactive library I've seen built on Akka is the Play framework one. They were working to separate it out from the framework as library only code, but I'm not sure the state of that effort.
[ Parent
| on HN ]
Re:Reactive (Dataflow) Programming in Java and Clojure with ...
by pron on Thursday February 20, 2014 @03:24PM
(#7273299)
Play has composable futures (like JDK 8's CompletionStage) which are indeed a component of FRP. I don't know if it's got something similar to Rx's Observables, which let you compose streams of values. Also, it's tied to HTTP services and isn't a general-purpose FRP solution, which is why I didn't mention it in the post.
[1] http://download.java.net/jdk8/docs/api/java/util/concurrent/...
Re:Reactive (Dataflow) Programming in Java and Clojure with ...
by seanmcdirmid on Thursday February 20, 2014 @06:56PM
(#7274526)
Why would you claim composable futures are indeed a component of FRP? I find no mention of this in Elliott's and/or Hudak's description of FRP.
Edit:
Conal adds a notion of future values in his push/pull work, but I wonder if it is the same thing as being discussed here, as composable futures were around long before FRP:
Re:Reactive (Dataflow) Programming in Java and Clojure with ...
by kasey_junk on Thursday February 20, 2014 @03:30PM
(#7273332)
I was thinking more of their iteratee stuff:
https://github.com/playframework/playframework/tree/master/f...
Again, don't know the state of pulling it apart but earlier versions were tied to Play in name only.
Re:Reactive (Dataflow) Programming in Java and Clojure with ...
by pron on Thursday February 20, 2014 @03:38PM
(#7273388)
The first example of reactive programming in Wikipedia is the ability to define a = b + c, where b and c are changing (and a is changing with them. In Quasar, you can do it imperatively:
for(;;)
a.send(b.receive() + c.receive();
Or functionally: zip(b, c, (x, y) -> x + y);
RxJava also lets you do the latter.
I see that it could also be achieved with a combination of Iteratees and Enumeratees in the code you linked to, using an approach similar to RxJava's, only more complicated and with fewer features.