Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does my concept follow a Microservice architecture?

I read the article on Microservices on Martin Fowler's page and find it quite interesting. Now I plan structuring an E-Commerce Web Application as proof-of-concept and am wondering if my concept is considered being a Microservice architecture.

The architecture consists of 3 components:

  • a javascript based single page application, which sends AJAX requests to
  • a server with a REST API which feeds JSON data received by calling other services (I think you call this behaviour API Gateway)
  • 3 services: CatalogProvider, CustomersProvider, CheckoutProvider

For now the services all are API endpoints of a Magento (PHP) Shopsystem. In future I plan to then swap the providers with other systems.

So my questions are:

  • MS are considered to be 'independently deployable'. I understand that in the world of JAVA we are talking about one JAR- or WAR-file, but how is a PHP service 'independently deployable'?

  • Does my concept NOT follow the principles of a MS architecture, because the providers are all part of one big (Magento) system?

Thank you for reading. I'm happy for any suggestions.

like image 946
Rouzbeh Avatar asked Jan 09 '15 17:01

Rouzbeh


2 Answers

There is nothing that says you architecture is not a MS architecture just because you're using magento and PHP. But, you have to consider a few things:

  • Think in terms of always being able to rewrite any of the services in any language and deploy somewhere the total system should just continue to work.

If your services are just transformation/interface very tightly linked to magento and you cannot simply rewrite them in java/C#/ruby easily, then I guess you do not have a MS architecture.

For PHP deployable artifacts, you typically have some packaging or versioning strategy around your service. Even though "deploy" in PHP is typically just swapping a folder of .php files. And you should not really share code/config between different services. You can even look at deployment tools for PHP if you want to take an extra step.

like image 111
Petter Nordlander Avatar answered Nov 17 '22 21:11

Petter Nordlander


As to the microservice architecture there is SRP principle.Single Responsiplity principle.Each service has own unique responsiplity.DB schemea shouldbe decomposed also.Exporting services as rest inside a monolithic app not convert a monolithic app to micro service application.

like image 1
Burak savurur Avatar answered Nov 17 '22 22:11

Burak savurur