Concluding Node.js
Read up on ideas to further improve the web application.
We'll cover the following
Ideas for improvement
This dashboard is already functional, but there are many improvements that can be made to it. Some ideas that can help improve it and make it a better application are:
- Add more earthquake databases. USGS is a fantastic resource, but it mainly only provides data on earthquakes happening in the United States of America (USA). It would be interesting to merge earthquake reports from around the world—not just USA—and present them all together on the map. To do this, we can use the help of
merge
andmergeAll
, and usedistinct
with a selector function to avoid duplicates. - Whenever the user clicks on a tweet, center the map on the related earthquake. This will involve grouping the tweets by the earthquake on the server, and we’d probably want to use the
groupBy
operator to group tweets to a particular geographical area.
Wrapping up
In this chapter, we used RxJS to create a Reactive user interface that allows us to see different kinds of data about earthquakes happening on the planet in real-time. We used RxJS both in the browser client and in the Node.js server, thereby showing how easy it is to use Observables to manage different areas of an application.
More importantly, we’ve seen that we can use RxJS in the same way with the client and on the server, bringing the Observable sequence abstraction everywhere in our application. Not only this, but we also saw how we can use RxJS concepts and operators across other programming languages, since RxJS is supported by many of them.
Next, we’ll look at Schedulers, which is a more advanced object type in RxJS. This data type allows us to control time and concurrency with more precision and is helpful for testing out code.
Get hands-on with 1400+ tech skills courses.