So everytime I get back into coding (a year since last time) I fall for the "gotta get into the latest trends"-thing and of course with microservices being thrown in my face at every avenue I am looking into it.But as with most architectural problems/issues I cannot for the life of me grasp how much you compartmentalize or not. Nor can I really find good node microservice examples that fit the way my head works so I can actually grasp it.So I have some questions/ramblings.Say I was making a website. That website crawls 2 diff websites for info and combines that info into a view for the user. It also crawls a third site and creates another different view. Then there is a news section. Pretty simple site.But how do you split those roles into microservices?Entry point is a node webserver. Should the base crawler be its own microservice? Should each of those sites parsers and db interfaces be its own microservices? Should the crawler just be a plugin used in the microservices. Should db storage itself be a microservice which sounds really weird seeing as a DB interface is itself pretty close to a microservice? Is each microservice run as it's own node instance? Do microservices in any way represent/serve/modify the views? Or is that handled on the server and microservices just give the data?Ordinarily I'd just write this as one monolithic app and run the crawlers on a timer in a child process. I think I've come to the realisation that I will never understand app architecture because it just isn't finite or absolute like 1+1 = 2.Honestly I barely start coding projects these days because there are 2 things that make me procrastinate so much and frustrate the hell out of me. Architecture and all the fucking setup to just get into the coding (like setting up remote coding with amazon EC2 which I can't understand why there isn't a 1-2 click solution for).
Submitted December 06, 2019 at 02:36AM by MenschDenschHensch
No comments:
Post a Comment