Nov. 23, 2018, 6:23 a.m.
Yeah, that was a very bad pun. Sometimes it's kinda hard to come up with a funny title that is actually related to the stuff I write about. Sometimes means about 99% of time here. Oh the pressure. But I digress.
So I did split my authentication to it's own service and I am planning to do that for food -related stuff, too. Well, technically the whole site is related to food but I mean managing actual food items here. By doing that I have made the two of my most used 'services' to be actually their own services. Most likely it is completely unnecessary optimization but who knows. Makro has been growing slowly but surely and by the time I am writing this it has 226 registered users and of those 226 about 20 are active users. I know it's not that much and a single Node.js server can handle that kind of load more than well. But for me it's about learning stuff and for that Makro is a perfect platform. It keeps getting bigger (and better) and I can try out new things with actual users.
I have been working quite a lot lately and that is mainly because I am learning to do backend development with Java. So far it's been great and I have enjoyed it a lot. Even though it's really frustrating to try to understand what is happening and especially why it is happening. But it gets better day by day and so do I.
I've actually gotten to a point that I'd like to use Java for Makro (or something else) as well but realistically it is not an option for me. Unless I decide to upgrade my droplet to have more RAM (which I am going to do eventually but not just yet) because Spring Boot does use quite a lot RAM compared to Node.js for example. Sure you can tweak it but I still feel it would be a kind of an overkill to use it in this context. There is no heavy computing involved or need for multithreaded operations since my backend as a whole is basically just a REST API.
But this is might not always be the case and to be honest I do have a feature planned where I might want to use something else than Node.
As I'm trying to learn more about this microservices architecture I have found out that I probably should use separate databases for each of my services so they'd be as independent as they can be and could be deployed individually. This wouldn't be too big of a changes to implement but I'm not sure if I want to just keep adding more and more docker containers to my puny droplet. It is already a bit too close to use all of it's RAM and upgrading it would double the cost of the droplet which I am not ready to do. At least not just yet.