S
S
sm252016-04-04 16:37:34
Software design
sm25, 2016-04-04 16:37:34

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

2 answer(s)
L
lega, 2016-04-04
@lega

it was customary to use a microservice architecture
, everything was clear, but not so much here.

It's like "Go there - I don't know where."
And what is the purpose? After all, this should also be considered as a "tool for the task." Time consumption will definitely increase. If you try / play around - then ok.
There is also the 3rd type, when a monolith is made but with isolated components (microservices) inside - there is not as much deployment fuss as with microservices, and there are no costs (network) for calling a microservice. And when the real need comes to allocate a component to a microservice, it can be easily spun off.

S
Sergey, 2016-04-04
Protko @Fesor

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 question

Ask a Question

731 491 924 answers to any question