What is a microservices architecture?

I read that "microservices-based architecture" basically makes system requirements into specific, independent services.

In this article , right after the Settings says that you can separate services into specific instances (machines) according to the hardware requirement of that service.

My question is: for each service is generated a WAR?

Work with a separate application in modules and in 3 layers: API's, Services and DAO: is this or not considered a micro services architecture (not isolated in different instances)?

Author: LINQ, 2015-06-12

3 answers

First answers to these questions that can be answered more "simply":

For each service is a WAR generated?

Obviously depends on the technologies / platform used. In a real environment you will notice that some micro services can be packaged in WAR to be deployed in Java web containers, but others will not be, they can be a simple JavaScript deployed on an HTTP server.

Working with an application separated into modules and 3 layers: API's, Services and DAO: is this or not considered a micro services architecture (not isolated in different instances)?

Is probably not a micro services architecture. It is likely that it is more for a monolithic architecture and we will see soon what this is.

In summary form (but not so much :P) we can say that:

  • micro service is the consequence of when we apply the principle of responsibility unique at the architectural level, be IT software, systems, etc.
  • considering the above, a micro-service oriented architecture can be defined as a set of small services, each running independently and communicating with each other through a lightweight mechanism, and each micro-service may or may not provide a form of user interface. If we look at the" bowels " of each micro service we will see that it is independent, then making a comparison with yours architecture, each micro service will publish its own API (which can even be the form of integration between micro services), its own DAO(s), etc. The granularity will depend on your need, always taking into account independence, ease of scaling, deployment, etc.
  • a monolithic architecture is one in which an application is built on a single unit, considering the Java web platform, all services on the same WAR would be an acceptable comparison of how an application designed in a monolithic way is packaged.

Using the graft of the article you Cited:

...you can separate services into specific instances (machines) according to the hardware requirement of that service.

Yes, this is possible with this architecture, but it is also possible with other less granular architectures.

What we gain with micro services is the high granularity that the architecture allows, i.e., we can have several micro services on the same server and scale on another server only other micro services.

In addition to this, we have the standard diversions that are directly related to micro services, such as single services by virtual machine or by container , registration and discovery of services, etc.

In the links below you will be able to find in detail what is a micro services architecture. As you will notice it is quite large, so it does not pay to include here, the detailing would be very extensive:

In addition to the blog of Martin Fowler , See also those of Spring, nginx and technical blogs from companies that have very granular architectures and Rich APIs, such as Netflix , the aforementioned SoundCloud , among others, they always publish something about how they are using micro services to improve the way their services are deployed, rapid response to business changes, scalability, etc.

As you can see, there is already a lot of content on the subject. So, good studies =)

 12
Author: Bruno César, 2015-06-29 11:48:11

Microservices

Microservices is the development of applications as a set of small services, where each performs its own process and can be built in a modular way, based on the business capacity of the organization in question. This means that deployment and scalability can be handled on demand. In addition, the independence between services allows them to be written in different programming languages and different technologies, aiming to meet specific needs in the best way. Another important point is that each service can be managed by different development teams, making it possible to form specialized teams.

Advantages:

  • easy understanding and development of the project;
  • easy and fast deployment (build and deploy);
  • reduced startup time as microservices are smaller than monolithic applications in code terms;
  • possibility to apply the best tool for a given job.

Disadvantages:

  • difficulty in deploying and operating distributed systems;
  • since each microservice usually has its own database, transaction management becomes more difficult (multiple databases);
  • deploy a change to a service used by many systems demand coordination and caution.

Comparison with monolithic pattern

An enterprise application is usually built in three main parts:

  • Interface
  • database
  • application server-side

In the interface part are the HTML and JavaScript pages, in the database are related tables and the application server-side will handle HTTP requests, execute domain logic, receive and update database data and finally, select and populate the HTML blocks to send to the browser. This application is monolithic, it is made as a single unit, any changes made to the system will have to be made a new publication.

Although these applications are successful, a small change made to a part of the software, even if small, causes the entire application to have to be republished. Over time it becomes increasingly complicated to maintain a modular structure. Due to these problems, the microservices standard was created.

This image shows the comparison between a monolithic application and microservices:

insert the description of the image here

Microservices and SOA

SOA stands for Service-Oriented Architecture and is a style of software architecture that preaches that functionality implemented by applications should be made available in the form of services. It picture , shows the main features of SOA:

insert the description of the image here

Microservices and SOA are very similar in principle, but the products that target SOA or microservices have differences that make them suitable for different use cases.

If you are developing an application, then a microservices framework will be more agile and give you more control as a developer. If what you are trying to do is orchestrate a series of business processes throughout your company, so a SOA product probably provides a better set of tools.

References:

 5
Author: Taisbevalle, 2017-01-10 12:43:40

Hello,

Thinking of distributed processing the ideal is to have several system features decoupled in service mode.

For example, we have an application that only "displays"," updates"," inserts "and" deletes " a client. Instead of having all this coupled in one place, it would be more beneficial to have multiple served (WCF, WEB SERVICE, JSF) distributed. So to gain performance as we are talking about services we can have the Web application in a server and services on another(os).

Http://www.itexto.net/devkico/?p=1755

 -2
Author: Luã Govinda Mendes Souza, 2015-06-12 13:24:15