Hey fellow developers! 🚀
We're a community of extraordinary minds, each contributing to the tech world in our own unique ways. From crafting eleg...
For further actions, you may consider blocking this person and/or reporting abuse
I'll go first ✋🏻
I was working on an Rails application that was ingesting huge amount of event every hour and analytics feature was just not able to keep up as the queries took longer and longer to complete to the point it crashed the analytics for some big customers.
I was tasked to optimise it and had to work alone on this with some help from the original developer to understand the flow.
I did some much needed refactoring to organize the data better in different tables so we could retrieve very specific information, cron jobs also played a very crucial role here to pick fetch and aggregate a lot of records and save it.
The best part was, for the first I really saw the power of SQL in action, writing optimized query to fetch records from different tables took some time after diving deep. I also had to tame ruby memory management as it was initializing a lot of objects and making server out of memory.
At the end, I decreased the time to fetch analytics data to a few seconds all the way from halting and crashing the system.