Reader small image

You're reading from  Robust Cloud Integration with Azure

Product typeBook
Published inMar 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781786465573
Edition1st Edition
Languages
Tools
Right arrow
Authors (6):
Ashish Bhambhani
Ashish Bhambhani
author image
Ashish Bhambhani

Ashish Bhambhani is an Integration Sr. Premier Field Engineer working for Microsoft. He lives in the Seattle region. He has been working in the integration space for more than a decade. In his current role he helps Microsofts enterprise customers by architecting, designing, building, and maintaining their integration solutions. Recently, he has been able to roll out Azure technologies enterprise-wide for his clients and replace their legacy solutions. He is a content creator and master trainer for some of a Microsofts training that is delivered to clients worldwide. Additionally, he was part of the team that wrote the BizTalk performance whitepaper for msdn.com
Read more about Ashish Bhambhani

Abhishek Kumar
Abhishek Kumar
author image
Abhishek Kumar

Abhishek Kumar works with New Zealand Trade and Enterprise as an integration and data specialist. He is a Microsoft Azure MVP with deep expertise in software development and design. He is a co-author of Robust Cloud Integration and a seasoned contributor to Microsoft blogs, forums, and events. As a technological evangelist, he is specialized in cloud-based technologies such as Azure Functions, Microsoft Graph, Logic Apps, Web API, and Cosmos DB, along with various Software-as-a-Service (SaaS) such as Salesforce, Office 365, and ServiceNow. As a technology advocate, he promotes loosely coupled solution design along with event-based programming.
Read more about Abhishek Kumar

James Corbould
James Corbould
author image
James Corbould

James Corbould has been working in the IT sector since 2003, developing and supporting applications in New Zealand and the United Kingdom. Since 2010, James has been working in the software integration field, designing and building integration solutions using Microsoft technologies such as BizTalk, SQL Server, WCF, .NET, and now Azure, for a wide range of different customers. Recently, he has been working in the health insurance sector and in the building supplies sector.James currently works for Datacom Systems as a consultant and team lead.
Read more about James Corbould

Mahindra Morar
Mahindra Morar
author image
Mahindra Morar

Mahindra Morar has been working in the IT sector from 1997, developing Windows and website enterprise applications. In 2009, he has been focusing primarily on integrating systems as a principle integration consultant. Having come from an electronics engineering background, he is able to use this knowledge to design solutions that integrate between wetware, software and hardware.
Read more about Mahindra Morar

Martin Abbott
Martin Abbott
author image
Martin Abbott

Martin Abbott is a Microsoft Azure MVP living in Perth, Western Australia. He started his career developing subroutines for commercial computational fluid dynamics software, eventually moving on to more mainstream development and systems integration. He has been working with BizTalk Server since the early days of the product, has spent a lot of time with WCF, but more recently has moved in to providing his customers with integration solutions spanning both on-premises and cloud workloads.
Read more about Martin Abbott

View More author details
Right arrow

Types of microservices


Broadly speaking, there are two types of microservices:

  • Stateless microservices

  • Stateful microservices

Stateless microservices

Stateless services are good candidates as the building blocks of a distributed system. As the name suggests, stateless microservices do not maintain session state between requests, for example, if any of the service instance is being removed, it does not affect the overall processing logic for the service. Distributed systems do prefer stateless microservices.

The ORDER diagram

If we look at the earlier diagram, a customer makes a request for a product through the ORDER service, and internally, the ORDER service checks for the product status through the INVENTORY service. Stateless means each request happens independently of the previous or future requests. One call to get product details would return the same result regardless of the previous context or requests. If one call to the ORDER service fails, then it should not halt whole business processing. There should be another instances of microservices running to take up the task.

Stateful microservices

Stateful microservices store session information in the code. When two or more microservices communicate, they maintain a service request state.

In the real world, stateless services are a good choice, but there are multiple use cases where you need to keep state information. If we think of a simple example, then transactions that require multiple database roundtrips require state to be stored.

To read more about stateful microservices, you can refer to the link: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview.

Challenges with the microservices architecture

We have seen how microservices can be useful in creating distributed systems and can be optimized as per business requirement. As we progress through microservices concepts, it is also essential to discuss some of the following microservice challenges so that you can determine if it's the right design for your solution:

  • Application logic: Unlike monolithic where you have all logic embedded inside the same solution package, application logic in microservices design pattern is distributed, and the whole logic behind your solution is distributed among multiple microservices.

    Various microservices calls with correct data and correct sequence of call makes your Application logic. This makes it harder for operational people to effectively manage and monitor the application.

  • Testing limitation: While using microservices pattern, we are limited to testing scenarios. We cannot easily find all the possible interactions among microservices deployed, and it makes harder for us to come up with the exact test cases and results.

    This makes change complex as we cannot predict whether a small change might break functionality of other dependent microservices.

  • Multiple technology: The microservices architecture supports the use of multiple technology in developing stateful and stateless microservices. This concept finds some problem with real-life applications where you use third-party assemblies and libraries. It makes harder to organize your solution because of high dependency on third-party software.

  • Monitoring: With microservices, organizations may find difficulty in monitoring the distributed environment as a whole. Technologies such as Docker and container concepts do ease the process of monitoring. They add one more layer of abstraction to your microservices.

SOA and microservices

Before we go into difference and similarities of SOA and microservices, it is better to move a step back and explain what is Service Oriented Architecture (SOA). What we understand from SOA: It is a design pattern or approach to build Application Architecture based on services. Each service has a specific set of functionality such as taking customer Order and Validating Order request.

With the definition of SOA, we can really see similarity between SOA and microservices. If we try to define microservices in terms of SOA, then we can say that "microservices is a fine grained SOA Architecture style with a set of common features like decentralization, isolation, automation, overs able etc. We can also say that Microservices is subset of SOA".

The diagram showing that Microservices is a subset of SOA

We have discussed microservices concepts in the earlier sections, and it is apparent that there is a lot of similarity with SOA design patterns. The preceding diagram shows how microservices and SOA are interrelated. We can say microservices is a subset of SOA based on the concept defined for SOA and microservices.

SOA is a wider concept; thus, the scope for problems with this style is larger. In SOA, defining a correct service boundary is always a problem; it is simple to how big or how small the service should be. Some useful concepts and technique of SOA, such as shared library and shared database, are totally been discarded from microservices.

Previous PageNext Page
You have been reading a chapter from
Robust Cloud Integration with Azure
Published in: Mar 2017Publisher: PacktISBN-13: 9781786465573
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (6)

author image
Ashish Bhambhani

Ashish Bhambhani is an Integration Sr. Premier Field Engineer working for Microsoft. He lives in the Seattle region. He has been working in the integration space for more than a decade. In his current role he helps Microsofts enterprise customers by architecting, designing, building, and maintaining their integration solutions. Recently, he has been able to roll out Azure technologies enterprise-wide for his clients and replace their legacy solutions. He is a content creator and master trainer for some of a Microsofts training that is delivered to clients worldwide. Additionally, he was part of the team that wrote the BizTalk performance whitepaper for msdn.com
Read more about Ashish Bhambhani

author image
Abhishek Kumar

Abhishek Kumar works with New Zealand Trade and Enterprise as an integration and data specialist. He is a Microsoft Azure MVP with deep expertise in software development and design. He is a co-author of Robust Cloud Integration and a seasoned contributor to Microsoft blogs, forums, and events. As a technological evangelist, he is specialized in cloud-based technologies such as Azure Functions, Microsoft Graph, Logic Apps, Web API, and Cosmos DB, along with various Software-as-a-Service (SaaS) such as Salesforce, Office 365, and ServiceNow. As a technology advocate, he promotes loosely coupled solution design along with event-based programming.
Read more about Abhishek Kumar

author image
James Corbould

James Corbould has been working in the IT sector since 2003, developing and supporting applications in New Zealand and the United Kingdom. Since 2010, James has been working in the software integration field, designing and building integration solutions using Microsoft technologies such as BizTalk, SQL Server, WCF, .NET, and now Azure, for a wide range of different customers. Recently, he has been working in the health insurance sector and in the building supplies sector.James currently works for Datacom Systems as a consultant and team lead.
Read more about James Corbould

author image
Mahindra Morar

Mahindra Morar has been working in the IT sector from 1997, developing Windows and website enterprise applications. In 2009, he has been focusing primarily on integrating systems as a principle integration consultant. Having come from an electronics engineering background, he is able to use this knowledge to design solutions that integrate between wetware, software and hardware.
Read more about Mahindra Morar

author image
Martin Abbott

Martin Abbott is a Microsoft Azure MVP living in Perth, Western Australia. He started his career developing subroutines for commercial computational fluid dynamics software, eventually moving on to more mainstream development and systems integration. He has been working with BizTalk Server since the early days of the product, has spent a lot of time with WCF, but more recently has moved in to providing his customers with integration solutions spanning both on-premises and cloud workloads.
Read more about Martin Abbott