Microservice or not ? (distributed system or microservice)
What do i even call this ?
(this could be really confusing or dumb so apologies in advance)
so some months ago i built a distributed job scheduler as a learning project,
here is the break down of architecture
- client sends req to api gateway forwards to a scheduler
- there are multiple instance of these scheduler ( each of these are running on different PORT locally )
- scheduler writes to the DB
- watcher reads the DB, the schedules that are supposed to be enqueued (watcher sends it to an exchange)
- an exchance service routes the queue to fixed queue list
- a coordinator organizes the queue to worker assignment
- and worker than pull (lease based) and executes and updates the DB
whats confusing to me is that,
i wanted them to have seperate runtime (basically for each of the component have a seperate tmux session so that i dont create a mess in logging and debugging), so introduced different ports for each of the service and for each of there duplication so (7001, 70002, 7003 are just for queues lets say). The Scheduler, Watcher, and all those have separate main functions to boot each of them
and for that i coordinated these services using REST API's since they are running on differnt PORT's
the issue is, i dont understand do i say it a micro service?
what i see is that there are multiple seperate concerns and i am communication/coordinating using REST among them (could have used grpc, but leave it for now)
but then i also gets confused that for micro service definition even though i created seperate runtimes for each, these still represent the same thing. like a seperate "watcher service" is not independently deployed. Does it make sense ??
would you call it a micro service or is it just a distributed system ?