In this chapter, we created our first application using RxJS. The web chat application is a perfect fit to use functional reactive programming given its interactive nature. In this chapter we learned to model a WebSocket server as an observable for connections using RxJS. We also learned to model our DataSource as an observable of messages, in two different flavors: firstly, keeping messages only on one local server and, secondly, sending messages to other servers using Redis as a publish/subscriber broker. We also looked at the use of operators to implement some of our services.
With this application, we saw how we can create observables from different event sources, and how we can use operators to implement some of our business rules.
Another important lesson from this chapter was the implementation of tests for our system. In our tests, we learned how to create a fake data source from a simple observable...