Quizz.sor.ro V2

Photo

Hey! I just wanted to let you know that quizz.sor.ro v2.0 is now up and running. It is a completely new website, just go check it out!

Development took several years because it was difficult to synchronize “free time” with the team from sor.ro. We all had a lot going on at the same time, and the contest for which the site was primarily used needed to be held.

The new site has a completely different stack: it uses C# for the backend .NET 5, VueJs for the frontend, Postgres for storage, and Redis for caching. I needed to save money, and I couldn’t get much better performance from my previous backend stack ( Python 3.2 with Django and MariaDB). The old site was adequate for the time I spent developing it and the load we had the first few years, but the contests were a success in Romania and grew in size.

For the backend, I also tried C++ (drogon) and Rust (actix-web); both worked fine, but I ended up using C# with.NET 5 because it was more mature and still performed well. I can also argue that I had to write less code for the same backend service in C# than in Rust or C++ because it came with more packages that handled things like logging, database migrations, and so on

After switching the backend, I stated that I should improve the frontend’s time-to-ship features, and I chose vuejs to do so (after dabbling in Angular and React). Even though the other frontend frameworks I tried were fine, vuejs seemed more natural to the way I write code.

I reanalized the VPS market as the high-cost VPS I was using from OvH was no longer a good fit. After looking at different host proivders, I switched my hosting from OVH to Contabo for all of my hosted sites (even this one). Over the course of my time with Ovh, I encountered numerous issues with their control interface and customer support; this, combined with the lower prices for more memory at Contabo, prompted me to switch.

I also tried out some new logging technology (the old site used to just do file logging). I first tried Kibana with the ELK stack, but after seeing how many resources it used, I switched to Graphana and Loki. Even if it does not do full text search, labels are enough for my use cases: I mostly need logging so I could track user responses because I need a way to tell if my code is acting up or they answered incorrectly. Of course, I also keep file logs because they are one of the most reliable types of logs in the lower cost range.

I also use Graphana to track hardware resources (so I know if i should scale down or up my vps) and for telegram notifications about the website state (is it available, do I have a lot of errors on a particular endpoint etc).

I am eager to see the new system behave during this year contest held in Romania, I will probably use the quizzsor category further as a dev-diary. All the development and maintenance for this platform is done free-of-charge to improve green education in my country which makes me chose the most cost effective tehnologies. This process should be of interest to all developers because it will probably lead to more experimental tehnology usage.

Note that when I refer to cost effective tehnologies I talk about a balance between dev-time and resource usage.

I also switched this site to hugo (Go) instead of pelican (Python) because it is faster to build and easier to setup. First I thought I should probably do an article about this but a quick mention is probably enough as the main points are the same: less resource consumption, ease of use for the same if not more features