Robust Cloud Integration with Azure - Gyanendra Kumar Gautam - E-Book

Robust Cloud Integration with Azure E-Book

Gyanendra Kumar Gautam

0,0
47,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Any software developers, architects, and technical managers lookng to learn about Azure IaaS essentials need look no further. This book is ideal for Microsoft Enterprise developers, DevOps or any IT professionals looking to connect cloud-based and on-premises systems with Azure.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 464

Veröffentlichungsjahr: 2017

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Robust Cloud Integration with Azure
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the color images of this book
Errata
Piracy
Questions
1. An Introduction to Systems Integration in the Cloud
What is Azure?
What is cloud computing?
Types of cloud platform
Types of cloud service
Cloud computing - something old or something new?
What is integration in the cloud?
The benefits of integration using the cloud
Design patterns for cloud integration
The evolution of integration design and how this applies to the cloud
Introduction to the microservices architecture
The evolution of architectures
Limitation of monolithic application design
What is microservices?
The characteristics of microservices
Types of microservices
Stateless microservices
Stateful microservices
Challenges with the microservices architecture
SOA and microservices
Summary
2. What Is an Azure App Service?
What is an Azure App Service?
Why use Azure App Service?
What are Azure Resource Groups?
App Service plans
An overview of our sample solution
Summary
3. Getting Started with API Apps
Why use API Apps?
Building, hosting, and consuming your first API App
What is Swagger?
Developing and hosting RESTful API App
Enabling the Swagger UI
Testing your API
Deploying ProductAPI to Azure
Viewing and managing the ProductAPI in Azure portal
Consuming your API App by generating client code in Visual Studio
The API App's architecture
The CORS support
Enabling CORS in Azure App Service
Bringing your APIs as-is
Testing an API using Postman
Creating a new API App
Setting up the deployment source for your new API App
Deploying Node.js API code to Azure
Security
What is App Service authentication and authorization?
Authentication
Authorization
Scenario on Authenticating an API App and consuming the authenticated API App
Summary
4. What is Azure API Management?
The anatomy of Azure API Management
API and operations
Objects within API Management
Azure API Management policies
Working with Azure API Management
Creating your first Azure API Management instance
Publisher portal and Developer portal
Importing the API definition through the Publisher portal
Managing user access rights for Products and APIs
Customizing the developer experience
Policies in Azure API Management
How to use Policies in Azure API Management
Working with policies in the Publisher portal
What are the different policies available in the Publisher portal?
Basic Scenario #1 – Throttle Requests Using a Rate Limit Policy
Basic Scenario #2 – Rewrite the public facing URI for the GetProducts API operation
Getting slightly more advanced – Modify default API behavior using conditional statements
Securing your API in Azure API Management
Securing your API backend with mutual certificates
Securing your API backend with Azure Active Directory
VPN connection in Azure API Management
Monitoring your API
Analytics in the Publisher portal
Logging to EventHub
Summary
5. Trigger Your First Logic App in Azure
An introduction to Logic App
The comparison between BizTalk server and Logic Apps
Why and when to use
Diagnosing Logic Apps
Building your first Logic App
Create Azure SQL server, database, and table
Create Logic App and workflow
Logic Apps using Visual Studio
Visual Studio 2015 configuration steps for Logic App
Run Visual Studio 2015 as administrator
Create Resource group template for Logic App
Polling Twitter for #SunnyElectricals
Code view
Deployment
Summary
6. Working with Connectors in Logic Apps
Categorizing Microsoft connectors
Standard connectors
Enterprise Integration connectors
Connectors as triggers
Types of triggers
Connector as an action
Standard Actions:
Collection Actions
Building your first connector
Azure Storage Table connector
Make your connector work for Logic Apps
Adding summary and XML Documentation
Discovering partion keys in the storage table
Summary
7. Azure Functions in Logic Apps
The basics of Azure Functions
Runtime environment
Bindings, languages, and function types
Building Azure Functions
Creating a function
The structure of a Function App
Adding complexity
Adding integration
Using functions with Logic Apps
Calling functions directly
Scenario - Invoice checker
Other considerations
Deploying your Function App
Testing your Function App
Scaling your Function App
Monitoring your Function App
Managing your Function App
Summary
8. A Deep Dive into Logic Apps
Workflow definition language
Parameters
Output
Expression
Operators
Functions
Content type in Logic Apps
Content-Type header
Text/plain
Application/json
Application/XML
Flow controls, SplitOn, and scope in Logic Apps
For each loop
The Do Until loop
SplitOn
Switch statement
Single run instance
Scope
Exception handling in Logic Apps
Scopes to catch failures
Retry Policies
The runAfter property to catch failures
Logic App to update on-premise warehouse with data gateway
On-premise data gateway for Logic Apps
Microsoft account prerequisites for installing on-premise data gateway for Logic Apps
Installation and configuration on-premise data gateway
Installing on-premise data gateway:
Creating a work or school identity in Azure Active Directory
Summary
9. Powerful Integration with SaaS Using Logic Apps
Exploring the Logic App SaaS connectors
Hooking up to SaaS solutions using the SaaS connectors
Working with Dynamics 365 and Office 365
User authorization using the Salesforce connector
Salesforce connector - Under the hood
Leveraging the Salesforce connector: Sunny Electricals automated credit check solution
Reaching out to the credit check API
Processing the credit check report using an Azure Function
Triggering automatic account creation using the Salesforce connector
Testing the credit check solution
Hybrid scenarios
Summary
10. Advanced Integration with Powerful, Scalable Service Bus in the Cloud
Service Bus types
Service Bus tiers
Service Bus Queue characteristics
Message size
Time to live
Dead-lettering
Sessions
Retrieving messages off a queue
Deferring message processing
Security
Handling service bus subscription security
Managing Service Bus outages and disasters
Service Bus topics
Subscriptions
Subscription rules
Rule filter
Rule action
Partitioned queues/topics
Administration tools
Scenario
PremiumInvoice and Invoice topic subscription creation
Summary
11. Connecting to Event Hubs and an Introduction to IoT Hubs
An introduction to Event Hubs
Security in Event Hubs
Event Hub streaming and partitions
Consumer groups
Reading from an Event Hub
Replaying of messages
Poisoned messages
Connecting to Event Hubs
Introduction to Azure IoT Hubs
Getting started with IoT Hub
Differences between Event Hub and IoT Hub
Security in IoT Hub
The device identity registry
Shared access policies
Shared access signatures
X.509 certificates
IP filtering
Monitoring your IoT Hub
Communicating with IoT Hub
D2C messaging
C2D messaging
Receiving C2D messages
Processing D2C messages
Uploading files
IoT Hub tools
Device Explorer
iothub-explorer
IoT gateways
IoT Hub protocol gateway
IoT Hub gateway SDK
IoT suite
Scenario - bringing it all together
Summary
12. EAI/B2B Integration Using Logic Apps
Enterprise Integration Pack for Logic Apps
Enterprise messaging in Logic Apps
Logic Apps Enterprise Integration Tool
Enterprise Integration Pack connectors
Enterprise Integration templates
Building your first Enterprise Messaging solution
Add partners in your workflow
Creating a partner within the Integration Account
Create an AS2 agreements
Configure your agreement to handle receive messages
Configure your agreement to send messages
Store custom metadata information in Integration Accounts artifacts
Add Metadata information to Integration Account artifacts
Retrieve metadata from artifacts for logic apps
Summary
13. Hybrid Integration Using BizTalk Server 2016 and Logic Apps
Hybrid Integration
Why Hybrid Integration?
Maximize use of past/existing investment
Customer privacy and data security
Wider audience
Message exchange pattern
Datagram or one-way pattern
Half-duplex or request-response
Duplex Message Exchange Pattern
What is a BizTalk Server?
Azure Relay service
SB-Messaging Adapter
Logic App Adapter
Installing and configuring an adapter in BizTalk Server 2016
Installing the Logic Apps Adapter in BizTalk Server 2016
Connecting on-premise BizTalk Server 2016 with Azure Logic App
Step 1 - Creating Logic Apps for cognitive services
Step 2 - Typed Polling with the WCF adapter
Connecting to the Sunny Electricals database
Creating a two-way send port for Logic Apps
Connecting Azure Logic App with on-premise BizTalk Server 2016
IIS configuration for Logic App Adapter
Consuming a WCF Service in BizTalk 2016
Creating a Logic App to call BizTalk
Summary
14. Tooling and Monitoring for Logic Apps
Tools to monitor Azure resources
Deployment options
Azure Resource Management templates
Parameters
Variables
Resources
Outputs
Expressions and Functions
Parameter Files
Deploying templates
Creating ARM Template using Visual Studio
Best practices
Manual deployments of App Services
FTP
MS Visual Studio
Synch
Local Git
Continuous deployment
Azure Function deployments
Managing solutions using PowerShell
Monitoring
Metrics
Add metric alert
Diagnostics settings
The OMS Portal
Logic App monitoring
Run history
Trigger history
Logic App message logging with Azure Functions Application Insights
Summary
15. Whats Next for Azure Integration?
An integration roadmap for the future
What and when of Microsoft Azure integration
Business productivity transformation
An introduction to PowerApps
An introduction to Microsoft Flow
Keeping up with the pace of change
Final thoughts

Robust Cloud Integration with Azure

Robust Cloud Integration with Azure

Copyright © 2017 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: March 2017

Production reference: 1170317

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham 

B3 2PB, UK.

ISBN 978-1-78646-557-3

www.packtpub.com

Credits

Authors

Mahindra Morar

Abhishek Kumar

Martin Abbott

Gyanendra Kumar Gautam

James Corbould

Ashish Bhambhani

Copy Editor

Dipti Mankame

Reviewers

Jeff Hollan

Bill Chesnut

Glenn Colpaert

Howard S. Edidin

Riaan Gouws

Project Coordinator

Judie Jose 

Commissioning Editor

Kartikey Pandey

Proofreader

Safis Editing

Acquisition Editor

Prachi Bisht 

Indexer

Pratik Shirodkar 

Content Development Editors

Juliana Nair

Rashmi Suvarna

Graphics

Kirk D'Penha

Technical Editor

Mohd Riyan Khan

Production Coordinators

Shantanu N. Zagade

Shraddha Falebhai

Foreword

As the world becomes ever more connected to the cloud, integration is more relevant and important than ever. Also, as enterprises trust the cloud to run more and more workloads, robustness is a core non-negotiable requirement. With the diversity of services and applications both in the cloud and on premises, the need to provide the connective tissue that gets systems and services talking in a clean and efficient way is paramount. Let’s not forget that everyone also wants to achieve and improve the reuse and manageability as well as implementing their solutions quicker. Enterprise integration skills and experience are core competencies for this generational shift. As a practitioner for more than 20 years, I’ve seen this evolving firsthand, and the pace of innovation has not only been dramatic, but it’s also accelerating.

Keeping up with everything has become a challenge in itself and the goal of this book is to get you success in your projects as fast as possible. It covers everything from basic introductions to services to complex integration solutions all underpinned with practical and easy-to-understand scenarios that help consolidate your learning. Whether it is creating a simple Logic App or a more complex hybrid integration solution that spans both cloud and on premises, this book delves deep into all the key technologies that are part of the current integration landscape in Microsoft Azure.

Mahindra, Abhishek, Martin, James, Gautam, and Ashish have accumulated over 50 years of integration knowledge between them, and they use this experience to great effect to tell the story of cloud and hybrid integration in a way that is accessible and easy to learn. Using a fictional company, Sunny Electricals, they stitch together solutions that are immediately relevant and usable. I’m sure you’ll enjoy reading this book as much as I did and gain valuable insights from these experts that will help you be a great integration professional as well.

There’s never been a more exciting time to be working in the integration space. It's time for you to take your first steps into the world of Robust Cloud Integration with Azure!

Jon Fancey

Principal Program Manager

Pro Integration, Microsoft Corporation

About the Authors

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. He has worked in many industries, including manufacturing, financial institutions, insurance, retail/wholesale and power utilities.

His interests are exploring new technologies and deciding how to use them in the integration world.

You can view Mahindra’s blog at https://connectedcircuits.wordpress.com.

This is Mahindra’s second book he has co-authored; the first book was called SOA Patterns with BizTalk Server, and was published in 2015.

I would like to thank my co-authors, Abhishek, James, Martin, Gautam, and Ashish, who also dedicated their time in writing this book. Without them this book would not have created.The last 9 months writing this book has been a great learning experience; I now truly appreciate the hard work and dedication authors endure. I take my hat off to you all. For the readers of this book, I hope you find it interesting and beneficial to your career in IT.Finally, I would like to thank the three precious people in my life: Vanita, my lovely wife, and my two joyful boys, Ameesh and Jayan, who gave me the time to co-author this book.

Abhishek Kumar is working as Integration Consultant with Datacom New Zealand and has more than 8 years of experience in the fields of designing, building, and implementing integration solution.

He is a Microsoft Azure MVP and worked with multiple clients worldwide on modern integration strategies and solutions. He started his career in India as a BizTalk Consultant with Tata Consultancy Services before taking up consultant roles at Cognizant Services and Robert Bosch GmbH.

Abhishek has published multiple articles on modern integration strategy on the Web and the Microsoft TechNet wiki. His areas of interest include technologies such as Logic Apps, API Apps, Azure Functions, Cognitive Services, PowerBI, and Microsoft BizTalk Server.

His Twitter username is @Abhishekcskumar.

I would like to thank my co-authors, Mahindra, James, Martin, Gautam, and Ashish, who also dedicated their time and effort in writing this book. It has been a  fabulous 9 months of work by all of us as a team. Thanks to our exceptional technical reviewers, Jeff Hollan, Bill Chesnut, Riaan Gouws, Glenn Colpaert, and Howard S. Edidin for their efforts in reviewing each chapter and providing valuable insights for the authors. I would also like to take this opportunity to thank Datacom and my manager, Brett Atkins, for their guidance and support throughout our write-up journey.

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.

Most recently, his interests and work have led him to the Internet of Things, where he has been actively involved in the development of products and solutions for customers across a range of industries. 

Martin is a regular speaker, runs the Perth MS Cloud Computing User Group, and is a member of the admin teams that organize Global Azure Bootcamp and Global Integration Bootcamp. 

His blog can be found at: http://martinabbott.com, and his Twitter username is @martinabbott.

I would first like to thank my co-authors, James, Abhishek, Mahindra, Gautam, and Ashish, for their support and tireless effort during the development of this book. It has been a pleasure to work with you all and I look forward to our next collaboration. We managed to secure some great reviewers for the book, and I would like to thank them for their dedication to making sure this book hits every mark, and for providing great constructive feedback. Thank you to you, the reader of this book. You are the reason we do this, and having you thumb through the pages, either physically or electronically, makes this all worthwhile. Finally, no acknowledgement would be complete without me thanking the most important people in my life. I want to thank my wife, Leigh, and my three wonderful sons, Joel, Noah, and Aaron, for their support and the sacrifices they have made over many weekends and evenings as this book has taken shape. I love you all and I could not have done it without you.

Gyanendra Kumar Gautam is a BizTalk consultant, specialized in integration solutions across enterprise and cloud with Microsoft’s suite of tools and services. He is currently working with Synegrate as Sr. Cloud Integration Architect in the San Francisco Bay Area, helping customers to hook their stuff together within their enterprise by providing unified integration solutions, both on-premise and on the cloud. 

Gautam began his career in 2005 at a start-up consulting firm in Bangalore, India. Since this startup company was primarily focused on the healthcare industry, he worked on multiple projects to develop healthcare software such as Practice Management System (PMS), Electronic Medical Records (EMR), and a few HL7 integrations. He also worked for a global IT consulting firm and a global mutual fund company, which gave him exposure to SOA/BPM technologies.

Prior to Synegrate, Gautam was with Microsoft as a PFE (Premier Field Engineer). In this role he was responsible for ensuring the success of enterprise integration solution using Microsoft BizTalk Server within customers' IT operations by providing deep technical skills for proactive and reactive delivery that involved technically complex or politically sensitive situations in large, enterprise-scale environments.

Gautam holds certifications in developing Microsoft Azure Solution and Microsoft BizTalk Server (MSTS). He also maintains a blog as learning web-log from his day-to-day work experience about enterprise integration with BizTalk Server and Azure Cloud Platform at: http://gautambiztalkblog.com/.

I would like to thank my co-authors, Abhishek, Mahindra, James, Martin, and Ashish, for all the hard work they did on their chapters, as well as for helping me out with the reviewing process of my chapters. I also want to thank my exceptional technical reviewers, Riaan Gouws, Glenn Colpaert, Howard S. Edidin, and Bill Chesnut. They made significant contributions in their role as technical reviewers. This book is of a higher caliber as a result of their insight, wisdom, and real-world experience. I would also like to thank my mentor, John Sonmez, for inspiring and guiding me to pursue my goals with hard work and dedication. Most of all, I would like to thank my lovely wife, Shilpa, for being so patient with me and understanding me while I was working on this book. I couldn't have gotten this task done without her support. Finally, thank you, dear readers, for reading this book. It makes all the effort worthwhile.

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.

Living and working in Auckland, New Zealand, James currently works for Datacom Systems as a consultant and team lead.

James seeks to contribute to the community through his blog (https://jamescorbould.wordpress.com) and is a technical reviewer for a couple of publications: The A-Y of running BizTalk Server in Microsoft Azure and BizTalk Server Extensibility, both available from the BizTalk360 website.  This is James’ first foray as an author. You can follow him via his Twitter username: @jamescorbould.

I would like to thank my fellow co-authors, Abhishek, Mahindra, Martin, Gautam, and Ashish, for their commitment to this project, through all the challenges and good times.  It was a pleasure to work with you all and to make new friends. Many thanks too to our reviewers and the excellent feedback and comments that we received. Thanks also to my employer, Datacom, to my colleagues and managers, for the mentorship, assistance, opportunities, and the trust placed in me over the years. Last, and by no means least, to my beautiful wife, Bronwyn, and my two wonderful boys, Ben and Lachlan, for their support and encouragement while writing this book.  I would also like to thank my parents, Nigel and Linda, for such wonderful support over the years. I hope that all readers find something useful in this book, as an introduction to the brave new world of integration using the Azure platform.

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 Microsoft’s enterprise customers by architecting, designing, building, and maintaining their integration solutions. He has worked with some of the world’s biggest customers for Microsoft in the integration space. 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 Microsoft’s training that is delivered to clients worldwide. Additionally, he was part of the team that wrote the BizTalk performance whitepaper for msdn.com.

I would like to thank my co-authors on the book (Abhishek, Mahindra, James, Martin, and Gautam) for putting in their time and effort into getting quality content created. Also, I would like to thank my family, especially my wife, Shruti, and my sons, Ekam and Meir, for inspiring me to do this and supporting along the way. Lastly, I would also thank my employer and my manager, Mark Edwards, for enabling me to write my parts for the book.

About the Reviewers

Jeff Hollan is a program manager for Azure Logic Apps at Microsoft.  He has been with Microsoft for a number of years, initially working in Microsoft IT to integrate and gain real-time insights across sales, marketing, and development pipelines.  For the past 3 years, he has been a part of the Microsoft Integration team, which focused on the development of the Azure Logic Apps service.  Being a passionate presenter, he helps share Microsoft’s vision for integration and serverless orchestrations at conferences and events around the world.

Bill Chesnut is a cloud platform and API evangelist for SixPivot based in Melbourne, Australia. Bill started his career in IT in 1983 with the US Defence Department as an IBM Mainframe Systems Programmer. In 1994, he switched to the Microsoft Windows platform, and he has been involved with Windows development ever since.

Bill has worked on numerous enterprise projects using the full suite of Microsoft technologies, specializing in systems integration. He started working with the first release of Microsoft BizTalk Server, BizTalk Server 2000, and has worked with every version of BizTalk, including the most recent BizTalk Server 2016.  Bill has also been working with Azure since its initial release. In his current role as a cloud platform and API evangelist with SixPivot, Bill is helping clients streamline their adoption of cloud technologies, including Azure API Management, Azure Logic Apps, Azure App Services, and Azure Functions, with a focus on hybrid integration. Bill has been a Microsoft MVP since 2004, initially in BizTalk Server, then Microsoft Integration, and now Microsoft Azure.  He has also been extensively involved in the Microsoft User Group Community as a leader of the Melbourne .NET User Group, Melbourne BizTalk User group, and assisting with the Melbourne Azure Meetup Group.  Bill has presented at user groups in Australia, New Zealand, and the US. He has also presented at Microsoft TechEd/Ignite in Australia and New Zealand numerous times.

Glenn Colpaert is Azure and IoT Domain Lead at Codit, where he ensures the day-to-day operations of the Azure and IoT domain within Codit. Since 2014, he has been a Microsoft Azure MVP and Microsoft Azure Advisor.

Next to his day-to-day job, he also is a part of the Belgian BizTalk User Group (BTUG) board and the Belgian MEET Community.

Glenn has been integrating businesses with BizTalk, Cloud and Microsoft technologies for more than 8 years. He has gained a lot of hand-on experience during his projects and likes to share it with colleagues and the community.

You can find his blogposts on the Codit Blog (http://www.codit.eu/blog/) and follow his tweets via http://twitter.com/GlennColpaert.

Howard S. Edidin has over 25 years’ experience in delivering enterprise integration solutions. For the past 15 years, Howard has been specializing in Healthcare and Life Sciences. He is a Microsoft MVP for the data platform and a P-TSP for Microsoft Healthcare and Life Sciences (BizTalk and Azure). Howard is also a DocumentDB Wizard and TechNet Ninja.

He has coauthored several books, the last one being HL7 for BizTalk, and has been a technical reviewer for two others.

Howard is very heavily involved with development and implementation of a new HL7 Standard, FHIR®.   He is considered the go-to person by Microsoft for HL7 integration on Azure.  

Howard has been working directly with the Microsoft Product Managers to integrate FHIR on Azure. He has published two tutorials to the Microsoft Azure portal; Logging and Error Handling in Logic Apps (https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-scenario-error-and-exception-handling) and Notifying patients of HL7 FHIR healthcare record changes using Logic Apps and DocumentDB (https://docs.microsoft.com/en-us/azure/documentdb/documentdb-change-feed-hl7-fhir-logic-apps). Both tutorials are based on FHIR integration.  Howard has also delivered several webcasts for the Integration User Group; Azure DocumentDB for Healthcare Integration – Part I (http://www.integrationusergroup.com/azure-documentdb-and-biztalk/) and  Azure DocumentDB for Healthcare Integration – Part 2 (http://www.integrationusergroup.com/azure-documentdb-for-healthcare-integration-part-2/).

Howard is employed by VNB Consulting, Inc, a Microsoft Gold Partner for Integration and Azure Cloud Solution Provider (CSP), as a Sr. Azure Solutions Architect for Healthcare Integrations.

I would like to thank Mahindra, Gyanendra, James, Abhishek, Ashish, and Martin for giving me the opportunity to be a technical reviewer for this book.

Riaan Gouws, a seasoned integration architect, brings over 20 years of integration experience to the table. Riaan has a passion for technology, which is in turn complemented by his deep technical knowledge of integration, web, and data solutions.

Riaan cofounded Synegrate Inc, a consulting firm specializing in integration, web, and data workloads on the Microsoft Azure cloud platform. He holds the title of Chief Technology Officer. Synegrate is a Gold Partner, Application Integration, and shares Microsoft’s strategic vision of cloud first, mobile first.

Riaan is also a member of the elite Microsoft Virtual Technology Specialist Program (VTSP) team, a small group of selected industry experts working as an extension to the Microsoft Technology Specialist teams. He has a strong relationship with Microsoft as a valued partner in implementing enterprise solutions on top of Microsoft Azure.

I would like to thank my wife, Selmarie, for being ever-supportive of my geekiness and Azure obsession.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www.packtpub.com/mapt

Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Customer Feedback

Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at: www.amazon.com/dp/ASIN/B01KK6H3J4.

If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

Preface

Microsoft is investing heavily in Azure, its cloud computing platform. It's tempting to view this trend as a fad, but it is obvious that Microsoft is committed to this endeavor, and businesses are realizing the benefits of a platform that abstracts and manages the complex tasks of infrastructure management and application lifecycle management on its behalf, to name just a couple of offerings.

As the platform matures, more enterprises move their systems and workloads to the cloud. Software as a Service (SaaS) providers now offer rich services that companies are attracted to, in order to provide a competitive edge to their operations. Although many SaaS solutions can be customized to fit particular use cases, this is often limited out of the box (regardless of what the sales literature says!); customization for specific use cases is sacrificed for the benefits of a shared feature platform.

Many companies have decades of investment in on-premises solutions that are often heavily customized, and it is difficult to justify migrating to a new platform. In addition, there may be privacy concerns with storing sensitive data in the cloud.

Within this landscape, companies wish to extend the reach of their IT systems to the cloud while often key systems remain on-premises. Typically, enterprises also wish to introduce a degree of smart business process automation too. In this book, we demonstrate, with a practical "hands-on" approach, how these aspirations may be achieved by integrating the various disparate cloud-based and on-premises systems using the technologies available in Azure.

The book also seeks to show how cloud and on-premises systems may be integrated in a "robust" fashion, by ignoring the hype and instead drawing on lessons learned from integrating systems in the past.

What this book covers

Chapter 1 , An Introduction to Systems Integration in the Cloud, introduces the concept of cloud computing and modern integration using the Azure cloud platform.

Chapter 2 , What Is an Azure App Service?, explores Azures Platform as a Service (PaaS) offering for a building and managing applications aka Azure App Service.

Chapter 3 , Getting Started with API Apps, demonstrates how to build a robust, scalable, secure, and easy-to-use API backend to be consumed by your web, logic, or mobile app (or any third-party application hosted outside of App Service).

Chapter 4 , What is Azure API Management, shows how to control and manage API assets using Azure API Management (APIM).

Chapter 5 , Trigger Your First Logic App in Azure, is a first look at constructing workflows in the cloud using Logic Apps, to achieve smart business process automation quickly with no coding required.

Chapter 6 , Working with Connectors in Logic Apps, provides an introduction to connectors that abstract away the complexities of directly interacting with a third-party API or data source, using prebuilt functionality provided by Microsoft. Learn how to create your own custom connector!

Chapter 7 , Azure Functions in Logic Apps, looks into the hot topic of serverless computing by demonstrating how to build a function app and calling a function from a Logic App, to chain functionality and build complex workflows.

Chapter 8 , A Deep Dive into Logic Apps, is a more in-depth look at Logic Apps, exploring advanced features such as control flow, looping, and exception handling.

Chapter 9 , Powerful Integration with SaaS Using Logic Apps, shows how to hook up to Software as a Service (SaaS) providers using specialized Logic App connectors and how to leverage SaaS solutions in new and interesting ways to support unique business processes.

Chapter 10 , Advanced Integration with Powerful, Scalable Service Bus in the Cloud, is a deep dive into Azure Service Bus, and this chapter demonstrates how to build loosely coupled and scalable integrations using this technology.

Chapter 11 , Connecting to Event Hubs and an Introduction to IoT Hubs, provides an introduction to connecting disparate devices in Azure using IoT Hubs and processing large amounts of device data using Event Hubs.

Chapter 12 , EAI/B2B Integration Using Logic Apps, introduces Enterprise Integration Pack, which is an Enterprise level set of features that extends Logic Apps to support common business scenarios such as B2B communication using XML, mapping between different message formats, and transmission protocols such as AS2.

Chapter 13 , Hybrid Integration Using BizTalk Server 2016 and Logic Apps, introduces the reality that many businesses wish to not only leverage existing on-premises systems but also utilize SaaS applications (such as CRM Online). Using BizTalk Server 2016, this section demonstrates how to build a hybrid integration to do this, pairing with Logic Apps.

Chapter 14 , Tooling and Monitoring for Logic Apps, looks into options after you have built your Logic App, to deploy your workflow in Azure and then ongoing monitoring and alerting features.

Chapter 15 , What's Next for Azure Integration?, discusses Microsoft's future roadmap for integration using Azure and touches on Flow, the lightweight version of Logic Apps.

What you need for this book

The practical examples found in this book require an Azure subscription. It is possible to sign up for a free trial account via the Azure website, https://azure.microsoft.com/ .

Other examples in the book may require a subscription to a particular SaaS provider; further details are provided in the relevant section.

Who this book is for

This book is for software developers, architects, and technical managers who wish to explore using Azure to connect cloud-based and on-premises systems. No prior knowledge of cloud computing and Azure is assumed.

It is expected that the reader has familiarity with the C# programming language and the JSON message exchange format. Code examples in this book use C# and JSON.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "the code PD30 specifies that payment was past due by 30 days and COLL indicates that the account was referred to a debt collection agency."

A block of code is set as follows:

public static string SharedAccessSignatureTokenProvider.GetSharedAccessSignature(string keyName, string sharedAccessKey, string resource, TimeSpan tokenTimeToLive)

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public static string SharedAccessSignatureTokenProvider.GetSharedAccessSignature(string keyName, string sharedAccessKey, string resource, TimeSpan tokenTimeToLive)

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "click on the SQL databases option and click on Add to create new SQL database instance."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors .

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from:  https://www.packtpub.com/sites/default/files/downloads/RobustCloudIntegrationwithAzure_ColorImages.pdf .

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata , selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to  https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.

Chapter 1. An Introduction to Systems Integration in the Cloud

 

Unity makes strength.

  --Motto

This book is about building modern integration solutions in the cloud using Microsoft Azure technologies, enabling connectivity to Software as a Service (SaaS) applications such as Salesforce and Dropbox. Azure is Microsoft's premier cloud platform. It also looks at how to extend the reach of existing on-premises integration solutions and other legacy Line of Business (LOB) systems by connecting them to the cloud.

We also discuss important design patterns to build distributed systems in the cloud, such as the microservices pattern that builds on the principles of service-oriented architecture (SOA). We highlight some of the issues encountered when integrating traditional on-premises systems and how they can be solved, applying some of these learnings to the next generation of cloud-based applications.

We will discuss and demonstrate some of the Azure technologies using a full turnkey demonstration scenario as follows:

Azure App Service: This is a new, fully managed Platform as a Service (PaaS) cloud solution in order to host web, mobile, and integration applications. In this book, we will be focusing primarily on API Apps, Logic Apps, and Web Apps (along with associated connectors):
API Apps: Build robust, scalable, and secure API backends for your web, mobile, and enterprise applications
Azure Service Bus: Which comprises queues, topics, and relaysLogic Apps: Automate business processes in a workflow and run them reliably in the cloudAPI Management: How to monitor APIs running in Azure and secure them using Azure Active Directory and OAuthAzure Storage: BlobsApplication Insights: Get a view on how the various components comprising that your integration solution are workingEvent Hubs/IoT Hubs: Connect devices in the field and obtain valuable insights that can drive business automation and revenueAzure Functions: Trigger the execution of code on demandASP.NET Webhooks: Notify subscribers that an event has occurred via an asynchronous callbackBizTalk Server 2016 Cloud Adapters: Extend the reach of on-premises BizTalk into the cloud using the new Logic App adapter, for example

The cloud offering for on-premises systems will be examined, showing, for example, how to hook up BizTalk Server running in a local company data center to Azure using the new features of BizTalk Server 2016. Here, we will see how BizTalk on-premises can extend business capabilities into new territories not thought of before, well beyond the company firewall in a secure manner, reaching into third-party SaaS providers.

Businesses are realizing that with the right solutions in place, they can use the cloud to create extra competitive advantage, new business opportunities, and hence revenue by extending the capabilities of their IT, creating next generation solutions and also by enhancing existing applications. This is achievable through streamlined and responsive business automation in the cloud, which provides reliable and rich data to frontline applications. In this book, we seek to show how this can be done.

What is Azure?

Azure is Microsoft's cloud computing platform that comprises a collection of software services that can be hosted outside the traditional company IT infrastructure and provides an avenue to getting started quickly building and hosting software, in a flexible pricing business model.

A good place to learn more about Azure is via the Azure website: https://azure.microsoft.com .

The following is a list of current service categories available in Azure:

Compute: This is a high-level description of base services that provide a platform in order to run other applications and tasks, for example, virtual machines running Windows and Linux and platforms such as Service Fabric that act as a hosting platform within which applications can run.Web and Mobile: This includes services in order to run web and mobile applications, from the backend services required to the frontend web applications.Data and Storage: This includes relational and non-relational database systems including raw binary storage of data.Services focused on cognitive services and artificial intelligence.Analytics: This includes services in order to process large quantities of data using techniques such as machine learning as well as large-scale data transformation and movement.Internet of Things: This manages IoT assets on a big scale using IoT Hubs and processes real-time events and data using services such as Stream Analytics.Networking: This includes features such as load balancing, DNS, high-speed dedicated connections to Azure (ExpressRoute), and the configuration of private networks within Azure.Media and CDN: Robust content delivery through a distributed network of proxy servers deployed in multiple data centers across multiple regions.Enterprise Integration: This includes technologies in order to link on-premises and cloud-based systems, which encompasses Logic Apps, Service Bus, API Management, Functions, and BizTalk.Identity and Access Management: This includes authentication and authorization services using Active Directory in the cloud (with sync available to on-premises directories) and multifactor authentication.Developer Services: This includes services for the application developer including functionality such as Visual Studio Team Services for software development support and Application Insights that offers real-time monitoring of applications.Management: This assists with management tasks such as key management and offers task automation.

What is cloud computing?

There is little doubt that the concept of cloud computing is still in its infancy and as such, the definition of what cloud computing means is still much debated. This book doesn't seek to enter into the debate, instead prefers to focus on the services and capabilities that Azure can provide.

A good (and impartial) definition is available at http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-145.pdf provided by The National Institute of Standards and Technology (NIST), who defined cloud computing as follows:

"Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction."

NIST go on to specify five essential characteristics of a cloud computing platform as follows:

On-demand self-service: Resources can be provisioned by the consumer at will and in a timely fashion, in a fully automated way. For example, it should be possible for a consumer to spin up a virtual machine as required with no service ticket needing to be raised with the provider; instead, the VM should be able to be provisioned in a self-serviced, automated way.Broad network access: Resources should be available over the Internet and other networks via many different client devices, for example, laptop, mobile phone, and tablet.Resource pooling: Consumers are provisioned computing resources via a common resource pool (multitenancy), which can be assigned dynamically, matching the highs and lows of consumer demand. Resource pools are geographically dispersed across different countries, states, and data centers.Rapid elasticity: Resource utilization can go up or down automatically (or manually) to provide greater or lesser computing power based on current resource requirements.Measured service: Feedback is readily available in regard to current resource usage and cost with metrics available (for example, storage and processing costs, bandwidth usage, the number of users). Billing is automated, transparent, consistent, and reliable.

Armed with these essential characteristics, it is apparent that there is a difference between a simpler hosting platform and a more fully featured cloud platform.

With a hosting platform, a company may employ VMware ESX hypervisor software on the private network to deploy and manage VMs. If a developer, for instance, requires a shared development VM on the company domain, it is usually not possible for the developer to start a VM in a self-service model: this would no doubt cause a few eyebrows to be raised by the IT infrastructure team! There is a finite limit on the total amount of resources assigned to the farm (disk, CPU, RAM, and so on), and this needs to be carefully managed. Also, there is a whole raft of questions and requirements around a regime of installing software patches, to mention just a few questions. In fact, in most organizations, a job ticket would need to be raised with the service provider (or internal IT infrastructure support team) for the VM to be provisioned. This proves a time-consuming and often onerous task.

Compare the description of a hosting platform with a cloud platform. With the cloud, the developer would be able to spin up a VM on a shared public platform, with the required supporting infrastructure and required specifications, on-demand. In Azure, for instance, this could be achieved via the web-based Azure Portal or using a scripting language such as Windows PowerShell. Costing would be pay as you go: as long as the VM is running, the developer will be charged a finely tuned fee based on the resource consumption of the VM (disk usage, CPU load, network usage, and so on). If the VM is switched off, the fee would just be for storing the VM image file. The VM can be spun up and shut down on-demand, as required, by the developer. If extra resources are required (for indicative software load testing, for instance), these can be assigned to the VM and the capacity is limitless. However, it would be the responsibility of the developer to install software and OS patches, so maintaining and supporting the VM.

So, we can see here that a hosting platform is missing many of the essential characteristics of a cloud platform. What many may regard as a cloud platform is in fact a hosting platform. Azure is firmly a cloud platform. A key difference is that in a cloud platform, computing power is a commodity and as such needs to be measured and easily provisioned.

Types of cloud platform

A cloud platform can be deployed in one of two modes:

Private: The platform is accessible by one organization only. A technology called Azure Stack running in a private company data center is an example of this. Stack is a version of the software and services provided by Azure that can be installed and run in a private data center.Public: The platform is available on a public network, shared with multiple different organizations in multitenancy.

Note

At the time of writing, Azure Stack is currently in Technical Preview. More information on Azure Stack can be found at https://azure.microsoft.com/en-us/overview/azure-stack/ .

Following on from this, an additional mode may be applied: hybrid. This typically describes a private or public cloud that is hooked up to one or more other, separate, cloud platforms (public or private). So this is an aggregation of at least two separate cloud platforms, each hosted on their own dedicated infrastructure, possibly providing extra capability to one or other cloud service provider in a way that is transparent to the user.

Azure is a public cloud owned, hosted, and operated by Microsoft, available to most organizations (and countries) across the globe. However, it is true that solutions can be built on Azure such that they are a hybrid. Consider, for example, a solution that is hosted primarily in Azure but leverages services in a company private data center running Azure Stack, a RESTful API. In this case, the solution can be considered a hybrid because it utilizes services provided by both a public and private cloud.

Another example hybrid solution may expose endpoints in Azure that forward requests to an endpoint in the local data center. Service Bus relays, for instance, provide this functionality. This is a pattern that is becoming more prevalent, as companies wish to leverage cloud solutions without opening wide the company on-premises firewall and proxy, relying instead on the security mechanisms offered by Azure.

Types of cloud service

Cloud providers typically break down their service offerings into three categories, which build on top of each other, as shown in the diagram here:

A diagram showing the relationships between Cloud Platform Services

Infrastructure as a Service (IaaS): This layer describes the base hardware and software resources required to run application software in the cloud. This provides the ability to create and configure VMs and their hardware allocation (disk, CPU cores, RAM, and so on). Also, you can specify their base OS and configuration as required. With Infrastructure as a Service (IaaS) the cloud vendor supports the infrastructure as well, such as, network configuration (virtual switches, firewall configuration, and so on).Platform as a Service (PaaS): This layer is built on top of the IaaS layer; in fact, the cloud provider is responsible for maintaining the IaaS layer and this is transparent to the end user. What is presented to the software provider (the vendor) is a readily scalable, configurable, and reliable application-hosting environment for its user base. Developers use development tools provided by the cloud vendor and deploy to the hosting platform. Deployments include the software developed to the specifications of the platform and associated configuration. Microsoft Azure App Services, discussed in this book, is there in this layer.Software as a Service (SaaS): This is a term made famous by cloud applications such as https://www.salesforce.com/in/?ir=1 (provider of CRM software). In this layer, application software runs transparently in the cloud. Via a web browser, for example, a user can use a word processing program via a tablet, not knowing that this program runs in a hosting platform (PaaS), which is in turn provisioned by various load-balanced servers (IaaS).

Inevitably, it has become a great source of amusement to hijack the phrase ... as a service in humorous ways!

Jokes as a Service (JaaS)

Cloud computing - something old or something new?

It will be apparent to some that the ideas presented here touch on a great many old paradigms (indeed computing truths if one may be so bold, that is, concepts that have been proven true time and time again through many implementations and as such are proven to be beneficial). Cloud computing is an agglomeration of a great many old ideas: for one, the concept of a shared pool of computing power invokes parallels with mainframes, running advanced time-sharing operating systems developed in the 1960s; also, the idea of software services that offer high cohesion provokes memories of SOA.

The base enabler for cloud computing is virtualization of computing resources and in many people's minds, this then puts Azure on par with an operating system that is essentially an abstraction of computing hardware for the purposes of ease of understanding and to ensure optimal use of the underlying hardware. But it is apparent that Azure is much more than an OS since it provides services typically in the area that would be considered application software, running on the OS.

Azure touches on so many aspects of computing, which is fascinating and at the same time overwhelming, in terms of effectively unlimited services that can be provided. But it is worth taking heart that core principles and characteristics exist that provide a jumpstart to learning about cloud platform services, which we hope to have introduced in this section of the book. So, all the old learnings are still relevant and provide a pattern for the future; rather, it is a case of something old for something new!

What is integration in the cloud?

Now that we have a good understanding of what cloud computing is and the benefits that it can offer, let's examine the heart of this book: integrating systems and applications using the cloud.

Software integration is the process of connecting disparate systems and applications together that would not normally talk to each other, allowing data and business rules to be shared to drive automated business processes that add value to the business.

Traditional on-premises integration is concerned with linking internal systems and applications together and communicating with other businesses. An enterprise application integration (EAI) product such as BizTalk Server is very good at this and provides useful features out of the box such as error handling and retry capability. However, it requires specialist knowledge, and also, it is now apparent that the demands of modern IT have changed the face of integration is several ways, as listed later, which has required new approaches to integration:

The proliferation of mobile devices means greater demands in throughput requirements and the ability to scale to cope with peak demands. The microservices pattern (discussed in detail later on in this chapter) allows granular tuning and scaling of individual services to meet modern demands.Consumers expect to be able to use applications 24x7, and mobile applications are easily accessible and so promote this. It is therefore becoming increasingly unacceptable to have significant system downtime for software releases and patching. This has led to the development of new platform capabilities, where individual services can be brought offline without needing to disable an entire system or large sections of a system. These concepts are not easily adaptable to traditional integration platforms, which tend to be monolithic in nature.The rise of SaaS solutions hosted in cloud platforms means that it makes sense to host integration platforms in the cloud for performance reasons, and also the skillset required to enter the realm of the mainstream developer, where the platform can handle common integration tasks on behalf of the developer, removing the need for in-depth specialist integration knowledge.Society is now much more demanding in terms of new functionality, and this promotes rapid evolution of consumer demand. As a result, developers need to release new features rapidly to maintain a competitive edge (and also retire old or unsuccessful features equally as quickly): such rapid development is harder to achieve using the more traditional platforms (which require highly trained specialists), and this had led to the rise of Integration Platform as a Service (iPaaS) solutions that provide a hosting platform for integration solutions and reduce the time to market, by handling common integration development tasks automatically. Again, the microservices architectural style is a key enabler of building integration solutions that can support rapid change and versioning.