Is my concept Microservice architecture?

I read an article about Microservices on Martin Fowler's page and found it quite interesting. Now I plan to structure the e-commerce web application as a proof of concept, and I wonder if my concept is considered Microservice architecture.

The architecture consists of three components:

  • single page javascript based application that sends AJAX requests to
  • a server with a REST API that passes JSON data obtained by calling other services (I think you are calling this Gateway API behavior)
  • 3 services: CatalogProvider, CustomersProvider, CheckoutProvider

Currently, all services are Magento API (PHP) endpoints. In the future, I plan to then replace suppliers with other systems.

So my questions are:

  • MSs are considered "independently deployable." I understand that in the JAVA world we are talking about a single JAR or WAR file, but how does the PHP service "independently deploy"?

  • Is my concept NOT to follow the principles of MS architecture because providers are part of one large (Magento) system?

Thank you for reading. I am happy for any suggestions.

+5
source share
2 answers

Nothing suggests that architecture is not MS architecture because you use magento and PHP. But you should consider a few things:

  • Think about the fact that you can always rewrite any services in any language and place somewhere the whole system, which should just continue to work.

If your services are simply transformed / interface, very closely related to magento, and you can’t just just rewrite them in java / C # / ruby, then I think you do not have MS architecture.

For deployable PHP artifacts, you usually have a packaging or versioning strategy around your service. Despite the fact that "deploy" to PHP usually just replaces the folder .php files. And you should not share code / configuration between different services. You can even see the deployment tools for PHP if you want to take the extra step.

+9
source

As for microservice architecture, there is the principle of SRP. The principle of shared responsibility. Each service has its own unique responsibility. The DB schema must also be decomposed. Export services like relaxation inside a monolithic application do not convert a monolithic application into a microservice application.

+1
source

Source: https://habr.com/ru/post/1210751/


All Articles