News for hackers. Stuff that matters.
Re:Play, Scala, and Iteratees vs. Node.js and Socket.io by saryant on Wednesday December 04, 2013 @01:43PM (#6849088)
Play's documentation on iteratees is definitely dense. One of the contributors has posted a far better explanation (compared to the docs, not this post) on his blog:

http://mandubian.com/2012/08/27/understanding-play2-iteratee...

I have an weekend project that uses Play's iteratees and enumerators quite well (IMO). They act as plumbing between client events (interacting with an embedded map), fetching and writing data to Mongo and interacting with the FlightAware API. I used server-sent events instead of WebSockets.

I haven't touched the code in a while (and the API key in the repo doesn't work ;)) but I have a working prototype that tries to stay entirely async: https://github.com/ryantanner/flightsight/tree/master/app

I think the OP is correct in that Play's iteratees/enumerators are fantastic but too low-level for most applications. Play (or a third-party) need to provide a high-level abstraction so that developers can ramp up as quickly as with socket.io.

Re:Play, Scala, and Iteratees vs. Node.js and Socket.io by curun1r on Wednesday December 04, 2013 @06:01PM (#6851119)
Perhaps you can clear up my confusion with the article. It appears to me that Play is basically implementing Rx, except with a pointless new set of terminology. The Node examples could have all been structured almost identically to the Play examples if they used rx. What advantages or extra functionality is enabled by enumerator/enumeratee/iteratee that you can't get with observable?
Re:Play, Scala, and Iteratees vs. Node.js and Socket.io by tilltheis on Wednesday December 04, 2013 @07:31PM (#6851721)
Play didn't invent the iteratee concept, Oleg Kiselyov did (http://okmij.org/ftp/Streams.html). I asked myself the same question, as I'm doing the reactive programming course on Coursera, where Rx was the topic of the last couple weeks. I came to the conclusion that Rx focuses on side-effects while iteratees concentrate on iterative calculations. Iteratees calculate a result while Rx-observers just perform side-effects. Maybe someone else can further elaborate on this topic.
Re:Play, Scala, and Iteratees vs. Node.js and Socket.io by eeperson on Wednesday December 04, 2013 @07:47PM (#6851809)
A comment in the article, from one of the Play developers, provides a good explanation about what iteratees provide that is not provided by rx: http://brikis98.blogspot.com/2013/11/play-scala-and-iteratee...
Re:Play, Scala, and Iteratees vs. Node.js and Socket.io by rossjudson on Wednesday December 04, 2013 @09:28PM (#6852285)
Quoting Roper: The complexity of iteratees comes because they handle many different things at once - async io, backpressure, producing results, composition on multiple different axes. Most other APIs that they get compared to only handle one or max two of these, so the complexity of those APIs is not in what they do, but what they don't do that you have to implement yourself.
Re:Play, Scala, and Iteratees vs. Node.js and Socket.io by saryant on Wednesday December 04, 2013 @06:01PM (#6851123)
shrug I'm not familiar with Rx nor did I name these things.

If you're really curious, I'd ask on the mailing list. The devs are pretty quick to respond. https://groups.google.com/forum/#!forum/play-framework