Currently, the architecture of Microservices became a hype within the software development segment. This architecture model is an approach that determines the deployment of applications in a range of services. The development team can adopt the most appropriate technologies to solve specific problems. The architecture of Microservices also increases the scalability by allowing the use of approaches such as auto-scaling and micro-container.APIs and microservices are closely related, since the standard is to use an API interface totally directed to RESTful. Nevertheless, we are still currently facing some issues when we need to integrate with legacy systems to outsource functionalities such as services, as most systems do not have protocols such as WebServices or RESTful interfaces; therefore, we are going to explore that topic.
Most companies wish to expose APIs internally (within the corporation) and/or externally (to partners or clients), however, their systems or applications were not designed for that purpose. Most applications are based on the following architecture:
When we face that kind of scenario, the common solution is to build an adapter for exposing a standard protocol. That component should look like the diagram presented below:
The adapter is the main component for the solution, since it will allow the outsourcing of the service. To promote that standardization, some standards must be used:
To have an application with a simple and scalable integration model it is necessary to have an architecture style that meets all those requirements and the style of architecture that most closely resembles those features is the Microservices.Remember that this recommendation applies when your backend is not exposed with the HTTP protocol, because most API Gateways solutions will manage to easily route and transform messages for backend communication.Other scenarios in which the architecture of Microservices is highly recommended are:
Lastly, note that microservices need to be organized within the domains of your business. In this way, we can see that this style of architecture is an opportunity to break the monolithic of your business and provide better architecture, such as the design presented below:
This is a very interesting Microservices article.
After deciding that the adapter implementation will be based on a Microservices architecture, some features are necessary:
Some of the frameworks we suggest include:Java:
Another crucial feature when implementing APIs using Microservices is the ability to integrate with legacy systems. This type of feature requires a specific framework that implements the standards of business integration (EAI patterns); the recommendation in this case is to use the Java Apache Camel framework.
After implementing the Microservices package and making sure it is ready, one should implement it so that it is available for use. The most recommended strategy is to use PaaS services (Platform as a service) to implement the Microservices packages. That is because this type of service offers some very interesting features like:
Two other important features are:
The main PaaS offers in the market for an implementation strategy should be evaluated, including:
Other options that can be considered are Amazon Elastic Beanstalk and Google App Engine. Both are very interesting, as they have a native integration with Cloud and Infrastructure services and also offer infrastructure services as a service (IaaS).However, in our view, the best alternative for the implementation of microservices is that resulting from a complete integration with an APIs management platform and, in this case, the Sensedia API Suite offers a feature named BaaS (Backend as a Service) that uses the same PaaS service features and performs this integration.This feature allows you to perform the implementation and execute your microservices, directly exposing the APIs of your legacy systems.Technologies supported by BaaS are:
It is important to remember that if you can use this platform to run your microservices that are not only those that enable the integration with legacies, it could be your official microservice execution platform.
After the Microservices are running correctly, the APIs that expose the Microservices must be well managed and some of the essential features for that, that most platforms of this type offer are:
All the above capabilities are common in an API Gateway solution, but some other crucial features for the complete management of its APIs are:
As mentioned above, some API Management Platforms offer full integration with the microservices execution platform. This type of functionality offers a total management of all the parts of the solution, not requiring a separate infrastructure. In that way, its architecture will be as shown in the figure below:
Using Microservices architecture allows the development of RESTful interfaces that will expose their legacy that natively does not have an HTTP interface, but the first challenge is to choose the correct tools for that implementation. There are many frameworks and languages that can help in the implementation of microservices. The decision depends a lot on the scenario that is being faced, but some of the most used are mentioned in this article.After choosing your development kit, the next decision that must be made is to determine the implementation and execution platform. Once again, the decision depends a lot on the scenario that you are facing, but, in this case, the main objective is the exposure of RESTful APIs consistently meeting functional and non-functional requirements.Sensedia API Suite is an API management tool that manages to offer the functionality of Backend as Services (BaaS), which can replace the responsibilities of a PaaS in the implementation and execution of Microservices. Moreover, the tool offers all the key features for the ideal management of an API, such as API Gateway with Caching and Analytics.In short, the recommendation is to use one or more integrated platforms that manage to allow the total management of your Microservices and the APIs that will be exposed.
 Microservices – http://www.martinfowler.com/articles/microservices.html
 Apache Camel – http://camel.apache.org/
 PaaS Comparator – https://paasfinder.org/compare
 Twelve Factor App – https://12factor.net/
 Sensedia API Management Platform- http://sensedia.com/api-management-platform/
 API Gateway Pattern – https://www.nginx.com/blog/building-microservices-using-an-api-gateway/