FCC Stock Market application.

Introduction

I’ve been doing freecodecamp for a while and I love it. It was my first proper resource for learning frontend and backend development and I would wholly recommend it to anyone interested in learning web development. They’ve recently (basically a year ago now) had a revamp of their curriculum and it seems very good and it seems to cover more things. The legacy certificates are still available and are still doable. But I would recommend starting with whatever curriculum you see on the website.

So this blog post will just be about one of these projects that they offer. This one focuses on real time communication through websockets whilst retrieving data from an API. In this case the quandl API.

My Solution

I was a nerd and over complicated it so I got more out of it. I went with the standard MERN stack using the ws implementation of websockets. But as the data retrieved from the API was the same for multiple days after originally calling it, I decided to learn a bit about caching. I hadn’t done much with redis, and thought this was a good place to implement it and learn about it! The most surprising thing was after caching the results I saw improvements of around 20 fold. The tests I ran went from 980ms down to 48ms. INSANE! I couldn’t quite believe it.

I also found websockets to be a very efficient and useful way of communicating information…

Conclusion

To see my full implementation, checkout this link

Leon.