

Asynchronous JavaScript at Netflix - rcsorensen
http://techblog.netflix.com/2014/03/going-reactive-asynchronous-javascript.html

======
mattpodwysocki
This talk has been given a number of times, but keeps getting better, such as
at MountainWest JavaScript 2014:
[https://www.youtube.com/watch?v=XE692Clb5LU](https://www.youtube.com/watch?v=XE692Clb5LU)

Jafar Husain, and myself (Matthew Podwysocki) will also be giving the talk at
QCon NYC in June: [https://qconnewyork.com/presentation/end-end-reactive-
progra...](https://qconnewyork.com/presentation/end-end-reactive-programming-
netflix) in addition to a great tutorial that we put together:
[https://qconnewyork.com/tutorial/functional-programming-
js-w...](https://qconnewyork.com/tutorial/functional-programming-js-w-focus-
reactive-programming-rx-js-0)

But, if you're interested in playing with it yourself, we have it listed here:
[http://reactive-extensions.github.io/learnrx/](http://reactive-
extensions.github.io/learnrx/)

~~~
joshka
I saw this at Yow! a couple of years ago. Really cool stuff.

------
kitd
Note that Netflix have a Java version here
[https://github.com/Netflix/RxJava](https://github.com/Netflix/RxJava)

They certainly have some interesting technology.

~~~
mason55
_> They certainly have some interesting technology._

I would hope so based on the salaries they pay their engineers

~~~
nilkn
They pay roughly the same as Google or Facebook, except they put everything
into the salary and leave it up to the employee to decide what to do with it.
If you want stock options, you can just trade some cash for them (at a reduced
rate). So their salaries are higher, but the total compensation is roughly the
same.

------
gsoltis
I've been prototyping some bindings to make Firebase work with RxJava / RxJS,
since the model seems like a good fit.

If anyone has the time and inclination, I'd love some feedback.

RxJava:
[https://gist.github.com/gsoltis/86210e3259dcc6998801](https://gist.github.com/gsoltis/86210e3259dcc6998801)
RxJS:
[https://gist.github.com/gsoltis/ee20138502a4764650f2](https://gist.github.com/gsoltis/ee20138502a4764650f2)

Also, is ReactiveCocoa what most people would use to do this in ObjC?
[https://github.com/Reactive-Extensions/Rx.ObjC](https://github.com/Reactive-
Extensions/Rx.ObjC) doesn't seem particularly active.

~~~
mattpodwysocki
First off, great work! I'm the primary authors of RxJS and made a quick
comment on your Firebase interaction. We need to ensure that we minimize the
number of handlers created. Comments should be inline! Keep up the great work!

------
eranation
Very interesting. By the way if someone is interested in more details about
Reactive programming, there is a great coursera course about it
([https://www.coursera.org/course/reactive](https://www.coursera.org/course/reactive))

------
RoboTeddy
Here's another javascript FRP library:
[https://github.com/baconjs/bacon.js](https://github.com/baconjs/bacon.js) (it
was inspired by Rx)

I've been using bacon.js in conjunction with Facebook's React to write more of
my application declaratively. React automatically updates the DOM when bacon
properties change.

~~~
mattpodwysocki
A number of people have been using React with RxJS as noted here:
[https://github.com/Reactive-Extensions/FutureJS](https://github.com/Reactive-
Extensions/FutureJS) . We also have native support in RxJS for jQuery/Zepto,
Angular and Ember events natively (if of course they are referenced).

As the primary author of RxJS, I'm curious why you chose bacon.js over RxJS.

Anyhow, these architectures go well together!

~~~
RoboTeddy
Thanks for making RxJS!

> I'm curious why you chose bacon.js over RxJS

At the time I made the decision, Bacon had documentation and RxJS didn't (at
least, not that I could find). I was new to FRP, so that made my decision for
me -- I never went back and reconsidered.

Are you aware of any advantages RxJS has over Bacon? It looks a bit more
extensive in general, so now I wonder what I'm missing out on :)

------
film42
The conf talk on youtube by Matt Marenghi [linked in the post] is really
awesome. Provides great examples and resources. Really worth 28-min.

Direct Link:
[https://www.youtube.com/watch?v=XRYN2xt11Ek](https://www.youtube.com/watch?v=XRYN2xt11Ek)

------
Strilanc
Really glad to see reactive catching on. It really is a significant
improvement over raw events, even in trivial cases.

------
pscsbs
Link to slide deck is broken. Mirror:
[http://www.slideshare.net/tymekpavel/asynchronous-
javascript...](http://www.slideshare.net/tymekpavel/asynchronous-javascript-
at-netflix)

------
shanemhansen
As opposed to... Synchronous javascript?

------
bicknergseng
Opinions on reactive vs promises?

~~~
alipang
Reactive (event) streams are a generalization of promises in a sense, from a
single value to a stream of multiple ones. Both are monads.

Streams are to promises what lists are to maybes (options).

