SensediaSensediaSensediaSensedia
  • API Products
    • API Management Platform
    • API Governance
    • Event-Driven Architecture
    • Service Mesh & Microservices Architecture
    • PCI
    • Flexible Actions
  • API Services
    • Consulting & Professional Services
    • Developer Experience
    • API Care
  • Solutions
    • Insurance
    • Open Banking
    • Retail & E-commerce
  • Blog
  • Contact
    • Contact
    • Customers
  • Career
  • English
    • Portuguese (Brazil)
    • Spanish

Using Microservices Architecture as API Enablement Strategy

    Home API Using Microservices Architecture as API Enablement Strategy

    Using Microservices Architecture as API Enablement Strategy

    By Rafael Rocha | API | 0 comment | 3 January, 2018 | 0

    Context

    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.

    The Problem and the Microservices approach

    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:

    • Monolithic web applications using a unique database. E.g.: Java (JSF) with Oracle database.
    • Product or platform, such as SAP ERP.
    • High level applications written in Cobol
    • Client-Server applications implemented in VB6 and SQL Server.

    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:

    • Total compatibility with RESTful standard
    • Organization by business domains
    • Being easily scalable
    • Lightweight packages with a quick initialization.

    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:

    • Orchestration: in some cases, one should route and/or execute other services depending on some specific condition.
    • Composition: sometimes, it is necessary to execute more than one service to compose and return a response.
    • Transformation of Complex Messages: when it is necessary to use more complex algorithms in order to return a message to the consumer of the service.

    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:

    Arquitetura Microserviços

    This is a very interesting Microservices article.

    Microservices Implementation Strategy

    After deciding that the adapter implementation will be based on a Microservices architecture, some features are necessary:

    • Lightweight packages and low memory consumption
    • The initialization of the application must be fast to quickly create new instances of containers or servers.
    • Fast and simple development based on the Swagger specification
    • Security features like OAuth2

     

    Some of the frameworks we suggest include:

    Java:

    • Spring boot
    • Spark Framework
    • Play Framework
    • Dropwizard
    • Apache Camel

    JavaScript:

    • js

    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.

     

    Microservices Implementation Strategy

    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:

    • Use of containers
    • Orchestration of containers
    • Storage (file system and database)
    • Real-time monitoring
    • Logging and tracking

    Two other important features are:

    • Being able to climb to support transportation
    • Offering APIs to automate the implementation process

     

    The main PaaS offers in the market for an implementation strategy should be evaluated, including:

    1. Pivotal Cloud Foundry
    2. Red Hat OpenShift
    3. SalesForce Heroku

     

    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:

    • Java
    • js
    • Apache Camel

     

    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.

     

    Microservices and API Management Platforms

    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:

    • Security and Resilience: necessary to protect your backend from people or applications not enabled to consume those APIs. When an API is opened for partners, its Microservices must be protected against peaks of transport, so that it is not out of service and, hence, it is necessary to have control of the traffic limit (Rate Limit and Spike Arrest) and size limit of the message body (Payload Size).
    • Access Control: API consumers must be under their control and, thus, one should use market standards such as OAuth 2.0 or JSON Web Tokens.
    • Monitoring and Tracking: one should manage to monitor all the types of requests made on their platform; in addition, one ought to have a powerful log mechanism to find the errors that occur in their API.

     

    All the above capabilities are common in an API Gateway solution, but some other crucial features for the complete management of its APIs are:

    • Caching: it should be able to avoid unnecessary requests in one’s API, offering a much better latency for one’s requests, saving even the cost of one’s backend infrastructure.
    • Analytics: the use of the API monitored in real time is very important, both to monitor consumption and to offer insights on how to sell, monetize and use API in the best way.

    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:

     

    Arquitetura Microserviços e APIs

    Conclusion

    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.

     

    References

    [1] Microservices – http://www.martinfowler.com/articles/microservices.html

    [2] Apache Camel – http://camel.apache.org/

    [3] PaaS Comparator – https://paasfinder.org/compare

    [4] Twelve Factor App – https://12factor.net/

    [5] Sensedia API Management Platform- http://sensedia.com/api-management-platform/

    [6] API Gateway Pattern – https://www.nginx.com/blog/building-microservices-using-an-api-gateway/

    No tags.
    Rafael Rocha

    Rafael Rocha

    Lead Solutions Architect - Sensedia API Platform

    More posts by Rafael Rocha

    Related Post

    • Aumento sazonal na prática

      Capillary action: how e-commerces thrive

      By Lucas Tempestini | 0 comment

      To make your business grow, it’s necessary to reach as many prospective new clients as possible, besides developing customer loyalty from previous clients. For that, investing in creating capillarity has a fundamental function. Amazing! But,Read more

    • What REALLY is Omnichannel?

      By Lucas Tempestini | 0 comment

      Omnichannel, multi-channel, crosschannel… I bet that you have already found these terms sometimes when searching on the Internet. You have even read some things about omnichannel, maybe you already know what it is. But doRead more

    • Health Insurance market with wearable technology

      By Eduardo Arantes | 0 comment

      Soccer with friends on Saturday… The first 10 minutes go well, you run through the sides, throw deep passes, and even score a goal in a rebound from a shot. And from the eleventh minute on?Read more

    • lo que CIOs necesitan saber sobre APIs

      What CIOs must know about APIs

      By Lucas Tempestini | 0 comment

      We’ve already written multiple articles here in the Blog about how APIs are part of our daily routine, from login on websites through our social network profiles, to the color of your house’s lamps dependingRead more

    • Sensedia ready to go International

      By Lucas Tempestini | 0 comment

      Sensedia, a Brazilian technology company focused on APIs (Application Programming Interfaces), Agile Architecture, and API Management solutions is starting its business in the US. For the first time in the Gartner’s Magic Quadrant for FullRead more

    • What CIOs need to know about Microservices

      By Lucas Tempestini | 0 comment

      Microservices has gained a lot of strength during the last few years, and no wonder why. With poster boys like Amazon and Netflix, it’s hard to argue against it. But what do CIOs need toRead more

    • What CIOs really need to know about Partner Ecosystems and Integrations

      By Eike Malavasi | 0 comment

      Imagine if everything your company needed to create was a platform, working as a means of communication so that a range of users could add content and create value to your business. Or that yourRead more

    • Open Banking

      What is Open Banking and why it can make all the difference?

      By Lucas Tempestini | Comments are Closed

      Think about a while ago, when banks started to offer digital services, like Internet Banking or apps. How did you feel? Comfortable, modern, with a first-class service? Before that, could you imagine yourself performing aRead more

    Leave a Comment

    Cancel reply

    Your email address will not be published. Required fields are marked *

    Categories

    • Analytics
    • API
    • Digital Business
    • Events
    • Internet of Things
    • SOA
    • Uncategorized

    Tags

    Acquisitions API API Design API Economy API Management API MANAGEMENT PLATFORM API MANAGEMENT SOLUTIONS API Platform APIs APIs Management Architecture Banks Business Business Model Development Digital Ecosystem Digital Experiences Digital Strategies digital transformation eCommerces ecosystem Ecosystems Event Driven Architecture Events Financial Services Full Lifecycle API Management Global Health Home Home Insurance Innovation Insurance APIs Integration Integrations International Management Market MicroServices Omnichannel Partner Partners Ecosystem Retailes Security Strategy Technology

    Recent Posts

    • Black Friday Post – The Via Varejo experience
    • The importance of a good support service
    • Optimizing Event Driven Architecture in Java (from the low level)
    • The importance of using metrics in APIs
    • Preparing for Black Friday | E-commerce
    • Política de Privacidade
    Copyright © 2020 Sensedia | All Rights Reserved
    • API Products
      • API Management Platform
      • API Governance
      • Event-Driven Architecture
      • Service Mesh & Microservices Architecture
      • PCI
      • Flexible Actions
    • API Services
      • Consulting & Professional Services
      • Developer Experience
      • API Care
    • Solutions
      • Insurance
      • Open Banking
      • Retail & E-commerce
    • Blog
    • Contact
      • Contact
      • Customers
    • Career
    • English
      • Portuguese (Brazil)
      • Spanish
    Sensedia