JSFoo 2015

The future of JavaScript

Charanjit Singh


Async programming with FRP (RxJS)

Submitted Jun 17, 2015

This talk will preach Functional Reactive Programming using RxJS library. We’ll discuss how FRP revolutionaise asynchronous programming, avoiding the callback hell, composibility provided by FRP and how this new model of thinking async-js improves your everyday code with examples.
We’ll also discuss how FRP can be used with ES6 generators and promises, and also how FRP allow you to accomplish ES7 async/await capabilities without those pesky --experimentalflags.


FRP changes the way you think about asynchronous programming. It’s a well balanced combination of functional composibility, reactivity and asynchronous programming, unfortunately now widely adopted. But recently, FRP is seeing mass adoption and it has proven its salt in production systems as intense as Netflix (⅓rd of internet traffic, remember?).

We’ll start with evolution of asynchronous programming in javascript, from callbacks to promises, and how now Observables are obvious next step. Clearing the basic concepts of FRP in RxJS library, we’ll proceed to discuss how FRP changes our everyday code with small to medium examples. Briefly, we’ll discuss about thinking in time-aware programming model, Observables as first class citizens, converting almost any temporal value (anything that changes over time, e.g user’s input, ajax requests, io on server side etc) to an Observable, and composing different temporal values (which are now considered unrelated) as if they’re all same. Discussion till now shall convice most about how FRP is the obvious next evolutionary step for asyncronous programming in Javascript.

If time permits, we’ll proceed to discus using generator based flow control with FRP, and how we can achieve async/await like functionality with Generatos+FRP.

FRP is one of the under-dog ideas which I believe are going to shape the future of asynchronous javascript programming (others being generators, async/await based flow, CSP etc). FRP however is battle tested and offer more than just asyncronous development. Future will tell which one (or more than one) of these new ideas prevail, but I am placing my bets on FRP.


Thurst for knowledge and an open mind shall suffice.

Speaker bio

I’m a freelance software developer since forever (for all 3 years of my software dev career so far), working primarily in Javascript for past couple of years. I hold kinda-sorta exprtise in Meteor development, which is a full-stack reactive framework. I find reactive systems to be quite astonishing and the concept under-used. Astonished by Meteor’s capability built around ridiculously simple implementation of reactivity, I started doing research on different forms of reactive models. Few months back I stumbeled on FRP and RxJS. It was mind-blowing to use it for first time. Sadly 99% of people I talked to had no idea what FRP is. So I decided to talk about it in conferences and meetups.



{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}