Designing API-First Enterprise Architectures on Azure: A guide for architects and developers to expedite digital transformation with API-led architectures
()
About this ebook
API-centric architectures are foundational to delivering omnichannel experiences for an enterprise. With this book, developers will learn techniques to design loosely coupled, cloud-based, business-tier interfaces that can be consumed by a variety of client applications.
Using real-world examples and case studies, the book helps you get to grips with the cloudbased design and implementation of reliable and resilient API-centric solutions. Starting with the evolution of enterprise applications, you'll learn how API-based integration architectures drive digital transformation. You'll then learn about the important principles and practices that apply to cloud-based API architectures and advance to exploring the different architecture styles and their implementation in Azure. This book is written from a practitioner's point of view, so you'll discover ideas and practices that have worked successfully in various customer scenarios.
By the end of this book, you'll be able to architect, design, deploy, and monetize your API solutions in the Azure cloud while implementing best practices and industry standards.
Related to Designing API-First Enterprise Architectures on Azure
Related ebooks
Developing Cloud Native Applications in Azure using .NET Core: A Practitioner’s Guide to Design, Develop and Deploy Apps Rating: 0 out of 5 stars0 ratingsBuilding Modern SaaS Applications with C# and .NET: Build, deploy, and maintain professional SaaS applications Rating: 0 out of 5 stars0 ratingsRealize Enterprise Architecture with AWS and SAFe: A comprehensive, hands-on guide to AWS with Agile and TOGAF Rating: 0 out of 5 stars0 ratingsAzure for Developers.: Implement rich Azure PaaS ecosystems using containers, serverless services, and storage solutions Rating: 0 out of 5 stars0 ratingsArchitecting Cloud-Native Serverless Solutions: Design, build, and operate serverless solutions on cloud and open source platforms Rating: 0 out of 5 stars0 ratingsThe Kubernetes Operator Framework Book: Overcome complex Kubernetes cluster management challenges with automation toolkits Rating: 0 out of 5 stars0 ratingsThe Machine Learning Solutions Architect Handbook: Create machine learning platforms to run solutions in an enterprise setting Rating: 0 out of 5 stars0 ratingsMastering Spring Boot 3.0: A comprehensive guide to building scalable and efficient backend systems with Java and Spring Rating: 0 out of 5 stars0 ratingsAccelerating DevSecOps on AWS: Create secure CI/CD pipelines using Chaos and AIOps Rating: 0 out of 5 stars0 ratingsMicroservices by Examples Using .NET Core: Using .NET Core Rating: 0 out of 5 stars0 ratingsMastering Service Mesh: Enhance, secure, and observe cloud-native applications with Istio, Linkerd, and Consul Rating: 0 out of 5 stars0 ratingsScalable Data Architecture with Java: Build efficient enterprise-grade data architecting solutions using Java Rating: 0 out of 5 stars0 ratingsCloud Native Software Security Handbook: Unleash the power of cloud native tools for robust security in modern applications Rating: 0 out of 5 stars0 ratingsAzure Integration Guide for Business: Master effective architecture strategies for business innovation Rating: 0 out of 5 stars0 ratingsThe Azure Cloud Native Architecture Mapbook: Explore Microsoft Cloud's infrastructure, application, data, and security architecture Rating: 0 out of 5 stars0 ratingsEngineering MLOps: Rapidly build, test, and manage production-ready machine learning life cycles at scale Rating: 0 out of 5 stars0 ratingsEnterprise DevOps for Architects: Leverage AIOps and DevSecOps for secure digital transformation Rating: 0 out of 5 stars0 ratingsArchitecting Data-Intensive Applications: Develop scalable, data-intensive, and robust applications the smart way Rating: 0 out of 5 stars0 ratingsHands-On Azure for Developers: Implement rich Azure PaaS ecosystems using containers, serverless services, and storage solutions Rating: 0 out of 5 stars0 ratingsOptimizing Microsoft Azure Workloads: Leverage the Well-Architected Framework to boost performance, scalability, and cost efficiency Rating: 0 out of 5 stars0 ratingsPractical Microservices Rating: 0 out of 5 stars0 ratingsMastering Azure Machine Learning.: Execute large-scale end-to-end machine learning with Azure Rating: 0 out of 5 stars0 ratings
Programming For You
Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Mastering Windows PowerShell Scripting Rating: 4 out of 5 stars4/5HTML in 30 Pages Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsPython: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Python for Beginners: Learn the Fundamentals of Computer Programming Rating: 0 out of 5 stars0 ratingsSpies, Lies, and Algorithms: The History and Future of American Intelligence Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Python Data Structures and Algorithms Rating: 5 out of 5 stars5/5C Programming For Beginners: The Simple Guide to Learning C Programming Language Fast! Rating: 5 out of 5 stars5/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5Visual Studio Code: End-to-End Editing and Debugging Tools for Web Developers Rating: 0 out of 5 stars0 ratingsPYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Assembly Programming:Simple, Short, And Straightforward Way Of Learning Assembly Language Rating: 5 out of 5 stars5/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Linux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5
Reviews for Designing API-First Enterprise Architectures on Azure
0 ratings0 reviews
Book preview
Designing API-First Enterprise Architectures on Azure - Subhajit Chatterjee
BIRMINGHAM—MUMBAI
Designing API-First Enterprise Architectures on Azure
Copyright © 2021 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 author(s), nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been 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.
Group Product Manager: Richa Tripathi
Publishing Product Manager: Kushal Dave
Senior Editor: Ruvika Rao
Content Development Editors: Ananya Endow, Kinnari Chohan
Technical Editor: Pradeep Sahu
Copy Editor: Safis Editing
Project Coordinator: Ajesh Devavaram
Proofreader: Safis Editing
Indexer: Subalakshmi Govindhan
Production Designer: Alishon Mendonca
First Published: July 2021
Production reference: 1160721
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80181-391-4
www.packt.com
To my mother, Krishna Chatterjee, and my father, the late Nirmalendu Chatterjee, whose countless sacrifices have made me the man that I am today.
To my elder brother, Abhijit, without whose support and guidance I wouldn't have come this far.
To my loving wife, Tamanna, for believing in me and keeping me motivated.
To my daughter, Tanusha, who makes me a proud father.
– Subhajit Chatterjee
Contributors
About the author
Subhajit Chatterjee completed his bachelor's degree in engineering from NITK, Surathkal, India, way back in 2002. He also holds a postgraduate diploma in information technology from Amity University. Aside from this, he has undertaken various other online certifications that have helped him to learn and grow as a software engineering professional.
Subhajit has close to two decades of exposure to designing, implementing, and managing software development projects, using Microsoft and open source technologies. He currently works as a solutions architect with Microsoft Consulting Services, leading large and complex projects in Azure, IoT, enterprise integrations, web applications, and mobility space.
Subhajit loves to solve problems and has had the privilege of working with customers across the globe. He is passionate about sharing what he learns with the community. He believes in continuous learning and enjoys coaching and mentoring others for professional enrichment.
I wish to thank the people who have been close to me and supported me, especially all my colleagues and mentors who have shared their knowledge and experiential learning with me.
About the reviewer
Niloshima Srivastava has around 12 years of experience working as Software Architect in a Product Based Organization. She is a graduate in CSE and holds several Cloud Certifications on Azure/AWS. She has been an evangelist when it comes to Microsoft platforms, augmented by being a hands-on developer, solution architect, and outstanding illustrator of design concepts and methodology. Not the least but proven track records even in training and orchestrating what she has learned to new rising developers across various platforms on various forums.
Table of Contents
Preface
Section 1: API-Led Architecture in the Digital Economy
Chapter 1: Evolution of Enterprise Solution Architectures
History of application architectures in an enterprise
From monoliths to SOA and microservices
IT strategies in the modern world
Outlook for digital transformation
The emergence of API-led architectures
The complexity problem
The importance of API-led architecture
Case study
About Packt Insurance Inc.
Summary
Further reading
Chapter 2: APIs as Digital Connectors
The connected enterprise
The role of APIs in digital experiences
Major benefits of API-led connectivity
APIs serve as digital enablers for an enterprise
An API is a digital service
API architecture within an enterprise
API classification by management and access pattern
Packt Insurance Inc. – an API-led architecture strategy
Domain decomposition
Service and persona map
API composability using microservices
Summary
Further reading
Section 2: Build Reliable API-Centric Solutions
Chapter 3: Architecture Principles and API Styles
Architecture principles
Evolve architecture blueprints iteratively
Constructs of an API
API operations or service contract
Data contract or entity schema
API endpoint
Communication protocol (application layer)
Input and output – the request-response pair
Popular API architecture styles
The tunneling or RPC style
RI (or REST) style
Query or GraphQL style
Event-driven or asynchronous messaging style
Hypermedia style
Other API styles
Finding the right style for your API use cases
Serverless APIs – accelerators for innovation
Benefits of using serverless computing for APIs
Serverless architecture use cases
Implementing API-led architectures in Azure
Reference architecture for an enterprise API platform
Azure services for hosting API solutions
Service Fabric
Additional services for building end-to-end solutions
Case study elaboration – Packt Insurance Inc.
API style fitment analysis
Microservices and API styles
API platform architecture
Summary
Additional reading
Chapter 4: Assuring the Quality of the API Service (or Product)
The ISO 25010 standard for software product quality
Functional Suitability
Operability/Usability
Reliability
Performance Efficiency
Security
Compatibility
Maintainability
Portability
Architecture Tradeoff Analysis Method (ATAM)
The Azure Well-Architected Framework
Benefits of using WAF
WAF recommended practices
API security considerations
Core principles – the Security Frame analysis
The Security Development Lifecycle (SDL)
Reliability through scale, performance, availability
Site Reliability Engineering (SRE)
How do you ensure appropriate reliability?
Commonly used SLOs for an API service
Defining, implementing, and measuring SLI metrics for an API platform
Using SLIs to calculate the initial SLOs for your API service
Modeling performance based on scale requirements
The API (or application) performance management lifecycle
Checklist for development teams
High-availability patterns
High-availability calculation
Architecting for operations
Logging, monitoring, and alerts
Feature flags
Understanding maintainability
Proactive maintainability
Reactive maintainability
Tracking objectives using a quality dashboard
Case study elaboration – Packt Insurance Inc.
Important SLOs for the API platform
Architecture backlog – focus on quality and handle technical debt
Summary
Further reading
Chapter 5: RESTful APIs – the New Web
Technical requirements
Understanding RESTful APIs
Using HTTP verbs for your CRUD actions correctly
History of inter-machine application communication
REST architecture constraints
Advantages and challenges of building a RESTful API
Advantages
Common challenges
Exploring the checklist for building RESTful APIs
Contract-first design for your REST APIs
OpenAPI Specification
OpenAPI definition file format
Visualizing the API definition file using the Swagger extension in VSCode
Summary
Further reading
Chapter 6: API Design Practices
Understanding API design considerations
Coupling
Chattiness
Client complexity
Cognitive complexity
Caching
Discoverability
Versioning
Exploring recommended practices
Design should adhere to the SOLID principles
Design should be flexible to change
Use the Decision Analysis and Resolution technique
Produce documentation as per industry standards
Secure by design
Optimized for response time
API testing
Size and granularity
Content negotiation
Prefer stateless over stateful services
User-digestible response codes and messages
Using cloud design patterns
Implementing an API service using design patterns
Data-driven CRUD API
Command and Query Responsibility Segregation (CQRS)
Event Store API (Event Sourcing)
Clean architecture
Backends for Frontends (BFF)
Developer toolbox
Summary
Further reading
Chapter 7: Accelerating through DevOps Essentials
Business objectives and key results
The DevOps Dojo framework
The benefits of having a good DevOps strategy
DevOps metrics and their importance
Identifying the maturity index for your enterprise
The power of GitHub and Azure DevOps
DevOps in practice
Capability – continuous planning
Capability – continuous integration
Capability – continuous delivery
Capability – continuous operations
Capability – continuous quality
Capability – continuous security
Capability – continuous collaboration
Capability – continuous improvement
Pillar – culture
Pillar – lean product
Pillar – architecture
Pillar – technology
Tracking DevOps initiatives in the backlog
Summary
Further reading
Section 3: Deliver Business Value for a Modern Enterprise
Chapter 8: API-Centric Enterprise Integrations
Exploring EAI
Key initiatives toward a digital enterprise
Modernizing legacy applications using APIs
API use cases in the enterprise
The rise of iPaaS
What is an iPaaS platform?
Types of integrations
Benefits of iPaaS
iPaaS architecture for the Azure cloud
Implementing EAI patterns using iPaaS
API management
API gateways
API publishing, control, and governance
Developer portal
API versioning and life cycle management
Analytics and metrics
Understanding Azure Integration Services
iPaaS building blocks of Azure – explained
Using Azure Integration Services
Summary
Further reading
Chapter 9: APIs as a Monetized Product
APIs as digital assets
Growth of the API economy
The API value chain
Exploring business drivers of monetization
Expand the channels of revenue streams
Capture analytics for improved marketing strategies
Enhance brand value through customer loyalty
Foster innovation through new product capabilities
Stay relevant in the marketplace
API monetization models
Free
Consumer pays
Consumer gets paid
Indirect monetization
API productization in Azure
Requirements summary
Solution approach
API products and publishing in APIM
Subscription management
API consumption – rate limits and quotas
Measuring API consumption
API analytics
Summary
Further reading
Why subscribe?
Other Books You May Enjoy
Preface
Rapid adoption of cloud technologies has revolutionized the way modern-day applications are architected and implemented. Solution architects and IT decision-makers are constantly faced with the challenge to quickly adapt to the latest technology trends to establish a competitive advantage in the marketplace. Gartner has predicted that by 2025, about 80% of enterprises will have shifted their operations to the cloud. Hence, it has become even more imperative that enterprises pay attention to their digital transformation roadmaps to benefit from their cloud-first and mobile-first initiatives. Tactically, this means a lot of changes on the ground, including reinventing business processes, adopting agile and DevOps best practices, and even embarking on the modernization of operations.
API-led architecture is not something new – rather, it has just become a lot more relevant and important in today's world. Cloud computing offers three key benefits: flexibility, efficiency, and strategic value. API-led connectivity has changed the way enterprises interact with their customers and partners. Customers today are very demanding. They expect businesses to be agile and adapt to their demands. They prefer a simple and intuitive approach to meeting their needs. They are open to the use of technology and apps to get the job done in just a few steps. Thus, enterprises are required to utilize the insights derived from analyzing customer behavior as the basis for their digital innovation strategies.
Over the past few years, I have worked with multiple enterprise customers to define their blueprints for a robust and reliable API-led solution. However, the common challenge has been in getting them to understand the benefits of this approach, as it requires some initial investment and work prioritization. It was always a hard sell unless the key stakeholders had prior experience with implementing solutions using a service-oriented architecture (SOA) approach. Many lacked the appetite to incur any additional complexity on top of what they were used to. It was also a revelation to me that teams weren't too well versed in the concept of microservices. Everybody wanted to do it, but nobody seemed to know how to approach it. A few believed that splitting a large monolith into smaller services was, in effect, building microservices. While this was still a good starting point, it lacked a futuristic vision, as the many other aspects of a microservices architecture were not considered as part of the design process. The technical teams were also getting used to the new way of building solutions and would often miss out on the fundamentals, leading to problems later in the life cycle. Teams often lacked a production-first mindset as many of the important architecture-critical requirements were deferred to later.
In this book, it has been my endeavor to provide a glimpse of the whole nine yards
that is essential for the successful delivery of an API-led enterprise solution. This book focuses on the latest emerging trends in the industry, supplementing theoretical concepts with real-world scenarios and examples to help you grasp the concepts more easily. The book touches upon the important principles and practices that can eventually serve as a checklist for development teams. While I have used the Microsoft Azure cloud as the platform of choice, the topics discussed are valid even for a multi-cloud scenario as well.
After reading this book, you will be well versed in how to architect, design, implement, deploy, and maintain a digital service.
Who this book is for
This book is meant to serve as a ready reckoner for solution architects, developers, and IT and business decision-makers as they are taken through a journey showing how to approach their API-led connectivity requirements. The book has been written from a practitioner's point of view, with lots of tips, practical guidance, and additional references that will surely provide clarity of thought for developers, allowing them to confidently prepare for their next API-first architecture implementation.
What this book covers
Chapter 1, Evolution of Enterprise Solution Architectures, gives you a background on the evolution of enterprise architectures, from SOA to a more microservices-based approach, and discusses how the adoption of open standards will help advance the building of interconnected experiences in the evolution process.
Chapter 2, APIs as Digital Connectors, walks you through the concept of a connected enterprise, emphasizing the role and importance of APIs in fueling the growth of the digital economy.
Chapter 3, Architecture Principles and API Styles, provides an overview of important architecture principles that are the basis for the foundation of any API platform. The chapter also covers the popular architecture styles that are frequently used in an enterprise and how they can be implemented in the Azure cloud.
Chapter 4, Assuring the Quality of the API Service (or Product), focuses on the quality attributes that are critical for the success of API solutions. It also explains how to make use of the Azure Well-Architected Framework to design, implement, and measure the quality of service for your API solutions.
Chapter 5, RESTful APIs – The New Web Standard, covers some of the best practices that must be followed while designing and implementing RESTful-style API interfaces, which are becoming a new web standard.
Chapter 6, API Design Practices, discusses the important design practices that must be followed while building your API-centric solutions. It also briefly covers the different patterns that are commonly used for implementing your API microservices.
Chapter 7, Accelerating through DevOps Essentials, focuses on the essential DevOps practices that must be followed by the engineering teams to drive greater IT maturity across the broad spectrum of the enterprise.
Chapter 8, API-Centric Enterprise Integrations, takes a deeper look into some real-world enterprise integration scenarios and considers how the Azure Integration Services offering can be utilized for this purpose.
Chapter 9, API as a Monetized Product, discusses how enterprises can realize greater business value and improve their revenue streams by applying an intelligent productization strategy for their API assets.
To get the most out of this book
This book is intended for audiences who are likely to have a role in either defining and/or implementing API-centric solutions. Hence, it is recommended that you apply the inferences shared to your own practical requirements and do further self-study and analysis to better understand the concepts presented.
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781801813914_ColorImages.pdf.
Conventions used
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: For example, say the URI /api/policies/id returned the policy resource for the specified ID. Then the URL /api/policies/id/assets will return all the assets linked to the respective policy.
A block of code is set as follows:
GET /policy/getPolicy?id=POLICY1122334455 HTTP/1.1
Host: api.contoso.inc
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
https://api.packinsurance.com/quotingservice/getquote?api-version=1.0
https://api.packinsurance.com/quotingservice/getquote?api-version=2.0
Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: Observe that Quote Service (Basic) is accessible to Guests.
Tips or important notes
Appear like this.
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Share Your Thoughts
Once you've read Designing API-First Enterprise Architectures on Azure, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.
Section 1: API-Led Architecture in the Digital Economy
In the first part of the book, you will discover why API-based integration architectures within enterprises are increasing, and how they are beneficial compared to traditional approaches to expedite digital transformation in a cloud-first, mobile-first world.
This section includes the following chapters:
Chapter 1, Evolution of Enterprise Solution Architectures
Chapter 2, APIs as Digital