Asynchronous programming is very popular nowadays, mostly popularized by Javascript in Node.JS. Having single thread in Javascript leaves no way to do parallel things. Same picture is in PHP, where request is handled by single process or thread.

Good news is that PHP is not years behind. There are already async extensions and libraries, for example ReactPHP.

Our goal can easily be reached using ReactPHP based on callbacks or promises, but I want to add more magic with RxPHP. It is outstanding approach to solve daily tasks in a way you might never thought before.

So let’s describe ultimate goals and move on:  Efficially query remote Rest API via HTTP GET.

Continue reading