Phy-gital Roundtable: Breakfast Roundup from Germany and Netherlands

02 May '15 | Debjyoti Paul

German Shoppers: Meet Them in the Fast Lane to Phy-gital

15 January '15 | Ralf Reich

Shoppers Will Share Personal Information (But They Don’t Want to be “Friends”)

15 January '15 | Anil Venkat

Modernize or Perish: Property and Casualty Insurers and IT Solutions

14 January '15 | Manesh Rajendran

Benelux Reaches the Phy-gital Tipping Point: Omnichannel Readiness is Crucial

13 January '15 | Anil Gandharve

The New Omnichannel Dynamic: Finding Core Principles Across Industries

13 January '15 | Debjyoti Paul

Technology does not disrupt business – CIO day 2014 Roundup

02 December '14 | Anshuman Singh

Apple Pay – The Best Is Yet To Come

02 December '14 | Indy Sawhney

Digital transformation is a business transformation enabled by technology

01 December '14 | Amit Varma

3 Stages of FATCA Testing and Quality Assurance

06 October '14 | Raman Suprajarama

3 Reasons why Apple Pay could dominate the payments space

18 September '14 | Gaurav Johri

Beacon of Hope: Serving Growth and Customer Satisfaction

05 August '14 | Debjyoti Paul

The Dos and Don’ts of Emerging Technologies Like iBeacon

30 July '14 | Debjyoti Paul

What You Sold Us On – eCommerce Award Finalist Selections

17 July '14 | Anshuman Singh

3 Steps to Getting Started with Microsoft Azure Cloud Services

04 June '14 | Koushik Ramani

8 Steps to Building a Successful Self Service Portal

03 June '14 | Giridhar LV

Innovation outsourced – a myth or a mirage or a truth staring at us?

13 January '14 | Ramesh Hosahalli

What does a mobile user want?

03 January '14 | Gopikrishna Aravindan

APIs and Micro Services – Working together

Posted on: 12 November '15
Sudhir Sawant
Chief Architect with Digital Business

Last few years, APIs have become important part of the digital strategy for organization. APIs have are mostly been used to provide consistent experience to their customers across all the digital touchpoints. In some cases, APIs are also providing means to extend or build the business models through integrating with new partners. Considering these benefits; it important to have consistent strategies for APIs across the organization. 

apis

The key strategies for implementing APIs is – Common API team that works with different channels and back-end applications using Agile methodology and DevOps principals and build a common set of API that provide consistent channel using common API platform.

Using this strategy, APIs become glue across the different digital channels and back-end applications.  Hence, it becomes important to have a common design guidelines and patterns for implementation of these API. 

The implementation pattern for API common used consists of multiple layers – 

API Gateway 

API Gateway provides a central access for the micro-services. It will help in consolidating services across different endpoints as if they were all coming from a single end point. This layer extends the base functionality implemented by APIs by some cross cutting aspects such as security, monitoring, metering, limiting and analytics.  This can be considered as management layer that provides robustness to the APIs.

This is core functionality available in most of the API platforms available from vendors such as Apigee, SOA Software. And, they also provide mechanism to integrate with consuming channels such as Web, Mobile or Call Centers.

Service Gateway

The services gateway implements the business APIs by integrating with back-end application or Micro Services.  It implements uniform resource strategy with standardized message formats across the APIs. It integrates with backend applications using various adaptors. And, it performs caching, transformation and orchestration across multiple back-end applications to build a consolidated response needed by channels.

Service Gateway can be implemented in API platforms in various languages supported by them such as Java, JavaScript, Python or Node.JS.  In some case where there is an existing mature SOA service available, this functionality can be implemented in SOA platforms available from IBM, MuleSoft, Tibco. 

This API Gateway and Service Gateway are the primarily owned by common API team.

Micro Services

Micro Services are primarily unit of a business function in an organization.  Micro Services decomposition is designed is based Scale cube model and Hexagonal architecture. The hexagonal architecture provide design strategy based on scalability across x, y and z axis in terms of functional decomposition, horizontal scale out and data partitioning The well-designed micro services provide flexibility to construct new APIs easily.

Considering Micro Services implement business functions, these are primarily owned business units.  Each business units has autonomy in designing these micro services. However, it is advisable to have common guidelines and standards for implementing these micro services.

Micro Services can be implemented using different options. It includes container based Java/J2EE or SpringBoot, Reactive technologies such as Play/Akka or JavaScript technologies such as Node.JS.

Other Considerations

In addition to the layered implementations, there are other considerations that are important for successful implementation of API. These considerations are –

Uniform Resource Strategy:  API team should define a resource strategy across organization – for example – “/insurer/policy/[id]/renew“. It helps bring clarity in design, implementation and communication across different applications and groups.

API Specification with common message standards: API team should acts a product owner to come up with message standards. It help is clearly defined entity model and also makes easier for applications and channels to integrate.

Versioning: APIs should be designed considering multiple channels; each with their own implementation timelines.  Hence, it needs to support multiple versions (at least 3 versions).

Deployment: The primary decision needs to make is – Cloud vs On Premise.  This decision is made based on the deployment of the back-end applications and channels. Back-end applications location decides the location of micro services or service gateway. And, Channel Applications location decides the locations for the API Gateway Layer

Summary

APIs are important for in order to support multi-channel ever changing business.  Their implementation design is very important for their success. The layered implementation pattern with API Gateway, Services Gateways and Micro Services provides flexibility necessary to support ever changing business and robustness to support different requirements from multiple channels.

In addition to the layered pattern, it is important to consider uniform resource strategy, standardized message structures, versions and cloud based deployment for API implementation.

Sudhir Sawant

Sudhir Sawant is Chief Architect with Digital Business at Mindtree. He has 24 years of experience; of which he has spent last 10 years in architecting digital solutions. Some of key engagement includes architecting exposure management solution for global insurance giant, e-commerce solution for large car rental and direct connect solution for low cost airline. Currently, he anchors digital architecture team in US which helps with pre-sales and consulting engagements.