Answer the question
In order to leave comments, you need to log in
Am I using microservice architecture correctly?
A question. Previously, I was mainly engaged in the development of monolithic applications. In the new project, it was customary to use a microservice architecture, but this is a completely new and still unfamiliar approach for me.
From what I understand, it is necessary to think over and split the application into small independent services (with their own databases). As a rule, services communicate with each other through the REST API + message brokers can be used
. The GATEWAY API is also used in the microservice approach. As I understand it, this is such an entry point that can proxy a request to an internal service, can itself access services, then aggregate the received data and return it to the client. Also, the GATEWAY API can check that a request from an authorized user can cache some requests, etc.
So. If everything was clear in monolithic applications with page template rendering, then not so much here. Communication with services occurs through the REST API, i.e. the data for the template is returned. Where should the templates come from? How will it be right? Will you have to make a separate service that returns the template depending on the requested url?
Answer the question
In order to leave comments, you need to log in
it was customary to use a microservice architecture
, everything was clear, but not so much here.
in theory, your api gateway or entry point asks another service to do the work, delegates the task, so to speak. And then - as it turns out. Sometimes, yes, templates are rendered by a separate adapter to the microservice (if we have several interfaces), sometimes by the microservice itself, etc. Here's how it's more convenient.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question