Over the years I have been developing alku, it has gone through several entirely different technology stacks and been redeveloped several times. What started out as an assignment for an ANU project morphed into an app that I hope to launch in the coming months. Over that time, I learnt a lot about app and server development, as well as some cautionary tales.
So what technology does alku run on? Well it’s actually pretty simple. On the backend, alku is essentially a monolithic Spring Boot application and a MySQL server, running on top of Amazon EC2 with ECS managing scaling. We also run a OSRM instance to handle routing from point A to B, and a Redis instance to cache responses. On the front end, the app is built with the cross platform framework Flutter. That’s it. That’s the whole stack.
So why did we go with that stack? Well the short answer is, it was the simplest setup. The long answer is more complicated. When I initially developed alku, then called Caampus (damn trademarks), it was actually a very similar technology stack, with exception of the app which was developed natively for Android. When I realised I wanted to further develop the app into an actually product however, it became clear that the existing codebase was pretty much unusable. I had developed it in about a week and hadn’t really thought about the architecture, and consequently it was a bloated mess of spaghetti code.
So I decided to redevelop it. At the end of 2019, following the break of my studies, I started from scratch. I wanted to make this one a microservice architecture, something I had heard good things about but had never attempted. It did not go well. The server was slow, resource intensive, and buggy. It was not effectively using caches or queues. I got pretty far into development, but it eventually got to the point that attempting to run the services on my (poor) computer would immediately crash it. The final nail in the coffin was COVID-19. I gave up for the time being.
Then it was August of 2020. I found myself with more free time and picked up the project again. This time I studied textbooks on technologies such as Cassandra, determined to fix my mistakes. In the end I realised that I was overcomplicating the architecture for my expected traffic, so I set about migrating the app back into a simple architecture. I merged some of the microservices together to create an MVP, and began testing it, translating it, and building up a better map of the university.
The lesson to be learned is, always code cleanly and don’t overcomplicate your stack. If your product requires it later, you can always add complexity after the fact.