Developing Cloud Native Applications in Azure using .NET Core: A Practitioner’s Guide to Design, Develop and Deploy Apps
By Rekha Kodali
()
About this ebook
Customers are embarking on the enterprise digital transformation journeys. Adopting cloud and cloud native architectures and microservices is an important aspect of the journey.
This book starts with a brief introduction on the basics of cloud native applications, cloud native application patterns. Then it covers the cloud native options available in Azure.
The objective of the book is to provide practical guidelines to an architect/designer/consultant/developer, who is a part of the Cloud application definition Team. The book articulates a methodology that the implementation team needs to follow in a step-by-step manner and adopt them to fulfil the requirements for enablement of the Cloud Native application. It emphasizes on the interpersonal skills and techniques for organizing and directing the Cloud Native definition, leadership buy-in, leading the transition from planning to implementation. It also highlights the steps to be followed for performing the cloud native applications, cloud native patterns in the development of Cloud native applications, Cloud native options available in Azure, Developing BOT, Microservices based on Azure. It also covers how to develop simple IoT applications, Machine learning based applications, server less architecture, using Azure with a practical and pragmatic approach.
This book embraces a structured approach organized around the following key themes, which represent the typical phases that an enterprise traverses during its Cloud Native application journey:
● Basics of Cloud Native Applications: It covers basics of cloud native applications using .NET core.
● Cloud Native Application Patterns: The reader will understand the patterns for developing Cloud Native Applications.
● Cloud Native Options available in Azure: The reader will understand the different options available in Azure.
● Developing a Simple BOT using .NET Core: The reader will understand the Azure BOT framework basics and will learn how to develop a simple BOT.
● Developing cloud native applications leveraging Microservices: The reader will understand the concepts of developing micro services using the Azure API Gateway Manager.
● Developing Integration capabilities using serverless architecture: The reader will understand the integration capabilities and various options available in Azure
● Developing a simple IoT application: The reader will understand the basics of developing IoT applications.
● Developing a simple ML based application: The reader will understand Machine Learning basics and how to develop a simple ML application
● Different enterprise use cases, which enable digital transformation using the Cloud Native Applications: The reader will learn about different use cases that can be built using cloud native application
Related to Developing Cloud Native Applications in Azure using .NET Core
Related ebooks
Building Modern Serverless Web APIs: Develop Microservices and Implement Serverless Applications with .NET Core 3.1 and AWS Lambda (English Edition) Rating: 0 out of 5 stars0 ratingsMicroservices by Examples Using .NET Core: Using .NET Core Rating: 0 out of 5 stars0 ratingsBuild Serverless Apps on Kubernetes with Knative: Build, deploy, and manage serverless applications on Kubernetes (English Edition) Rating: 0 out of 5 stars0 ratingsApplication Observability with Elastic: Real-time metrics, logs, errors, traces, root cause analysis, and anomaly detection Rating: 0 out of 5 stars0 ratingsMastering Cloud-Native Microservices: Designing and implementing Cloud-Native Microservices for Next-Gen Apps (English Edition) Rating: 0 out of 5 stars0 ratingsInfrastructure Automation with Terraform: Automate and Orchestrate your Infrastructure with Terraform Across AWS and Microsoft Azure Rating: 0 out of 5 stars0 ratingsEnterprise Applications with C# and .NET: Develop robust, secure, and scalable applications using .NET and C# (English Edition) Rating: 0 out of 5 stars0 ratingsFundamentals of Software Engineering: Designed to provide an insight into the software engineering concepts Rating: 0 out of 5 stars0 ratingsParallel Programming with C# and .NET Core: Developing Multithreaded Applications Using C# and .NET Core 3.1 from Scratch Rating: 0 out of 5 stars0 ratingsHands-On Parallel Programming with C# 8 and .NET Core 3: Build solid enterprise software using task parallelism and multithreading Rating: 0 out of 5 stars0 ratingsCI/CD Pipeline with Docker and Jenkins: Learn How to Build and Manage Your CI/CD Pipelines Effectively (English Edition) Rating: 0 out of 5 stars0 ratingsASP.NET Web API Security Essentials Rating: 0 out of 5 stars0 ratingsBuilding Microservices with .NET Core Rating: 1 out of 5 stars1/5DynamoDB Applied Design Patterns Rating: 3 out of 5 stars3/5Microservices Architecture Handbook: Non-Programmer's Guide for Building Microservices Rating: 5 out of 5 stars5/5Serverless Beyond the Buzzword: What Can Serverless Architecture Do for You? Rating: 0 out of 5 stars0 ratingsMicroservices with Azure Rating: 0 out of 5 stars0 ratings
Computers For You
SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Elon Musk Rating: 4 out of 5 stars4/5The Invisible Rainbow: A History of Electricity and Life Rating: 4 out of 5 stars4/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5101 Awesome Builds: Minecraft® Secrets from the World's Greatest Crafters Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsAlan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 0 out of 5 stars0 ratingsThe Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Dark Aeon: Transhumanism and the War Against Humanity Rating: 5 out of 5 stars5/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 0 out of 5 stars0 ratingsCreating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Childhood Unplugged: Practical Advice to Get Kids Off Screens and Find Balance Rating: 0 out of 5 stars0 ratingsAP Computer Science Principles Premium, 2024: 6 Practice Tests + Comprehensive Review + Online Practice Rating: 0 out of 5 stars0 ratingsCompTIA Security+ Practice Questions Rating: 2 out of 5 stars2/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Going Text: Mastering the Command Line Rating: 4 out of 5 stars4/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5People Skills for Analytical Thinkers Rating: 5 out of 5 stars5/5Remote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5How to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5
Reviews for Developing Cloud Native Applications in Azure using .NET Core
0 ratings0 reviews
Book preview
Developing Cloud Native Applications in Azure using .NET Core - Rekha Kodali
CHAPTER 1
An Introduction to Cloud Native Applications
With changes in business and IT priorities, more and more organizations are entering newer geographies, expanding their businesses by introducing newer products and leveraging newer channels.
It is in this context, cloud-native architectures are being adopted. Some of the key drivers for its adoption are reducing cost of infrastructure, operations, and rationalizing/consolidating application portfolio.
Structure
Basics of Azure cloud-native applications
Cloud Native applications:Microservices – principles
Cloud Native applications - Design Patterns
Azure components that enable cloud-native application development
Cloud-native applications – Microservices in Azure
Cloud-native applications – Enterprise Use Cases
Objective
In this chapter, the reader will understand the basics of cloud native applications, their need, principles for developing cloud-native applications and some enterprise scenarios, as well as use cases.
Basics of Azure cloud-native Applications
With the evolution in business models, organizations are looking at developing smart applications. Smart applications are characterized by smart interactions, smart processes, smart platforms and smart security. Cloud-native technologies enable organizations to build smart applications.
Cloud-native technologies are used to develop applications, which leverage native cloud offerings. They leverage the underlying platform capabilities to support containerization, DevOps, scalability, resiliency, orchestration, compute storage, networking and orchestration, monitoring and management. Cloud-native applications leverage microservices and server-less architectures, containers, and other PaaS offerings. Cloud-native applications are optimized for reliability, scalability, faster time to market and better performance.
The main characteristics of cloud-native applications include:
Modular design, microservices based: Loosely coupled with clear separation of stateful and stateless services.
Containerized: They are packaged as containers.
Leverage Orchestrators like Azure Kubernetes Services
Use standard programming models
Cross platform: They are typically platform and Operating System agnostic
Use Cloud platforms for elasticity, scalability
Are supported by standardized DevOps process, continuous delivery
Following are the characteristics of cloud-native applications:
Figure 1.1: Cloud-Native Applications Characteristics
Typically, moving to a cloud is a multi-step journey.
Following is a typical journey that an organization takes to move their applications to a cloud:
Figure 1.2: Moving to a Cloud
Let us understand each term now:
Lift and shift the applications: To take advantage of IaaS offerings, initially, the applications can be moved as lift and shift to get immediate benefit of moving away from physical infrastructure. Infrastructure as a service (IaaS) is an instant computing infrastructure, provisioned and managed over the internet (definition from https://azure.microsoft.com/en-in/overview/what-is-iaas/)
Containerize the applications: Containerizing the applications helps them to be deployed easily across platforms.
Moving to cloud-native architectures: This would actually help organizations leverage the PaaS offerings of the platform. This is driven by business need to modernize applications.
Lower capex and opex costs: Capex costs would include investment costs like the infrastructure costs while opex costs include operating costs. Capex is needed to build enterprise cloud. Chargeback is based on monitored usage of compute/storage/network. Apps show ROI faster; Cloud investment recovery via chargeback
Opex: OpEx is further reduced by automation; VMs are vanilla and service restoration is via redeploy of O/S leading to easier management of assets and reduced OpEx;
Increase innovation: Moving to cloud native architecture helps in creating innovative solutions like using BoTs for user interactions, AI/ML models for intelligent processing
Adopt newer revenue generation models – For eg, a pump manufacturing company can tie up with an oil company to provide AI based predictive maintenance services to the oil company to alert if the pump is not performing to its fullest efficiency.
Scale on demand
Adopting cloud native architectures helps in new pricing models like per use pricing models
The final maturity level in the adoption of cloud for any organization would the adoption of cloud-native architectures. While adopting cloud native architectures, it is recommended to follow a microservices-based architecture for new development work. For existing applications, modernization might require significant amount of rework.
A good approach in adoption of cloud-native architectures would be to move small sets of services. Cloud-native applications should adhere to The Twelve-Factor App (https://12factor.net/), which are described in detail in the subsequent section.
Cloud-native applications: Microservices –principles
A microservices-based application should adhere to the best practices encapsulated in 12 the factor design principles. Engineers at Heroku came up with the 12 factors that need to be adhered while designing new microservices..
Applications that adhere to the 12 factors can be deployed on any cloud provider platform and allow the same set of tools/processes/scripts to be run across environments in a consistent manner.
Following are the 12 factors that an application should adhere to:
Figure 1.3: 12 Factors
Following is a table that summarizes 12 factors:
Cloud-native Applications - Design Patterns
While designing cloud-native applications, we need to adhere to certain design patterns.
Given below are some patterns for ensuring availability, data management, design, messaging, management and monitoring, performance and scalability, security and resiliency.
Availability
Following are some of the patterns for availability:
Figure 1.5: Availability
Following are some availability patterns:
Data management
Given below are some of the patterns for data management:
Figure 1.6: Data management
Given below are some data management patterns:
Design and implementation:
Following are some patterns for design and implementation:
Figure 1.7: Design and Implementation Patterns
Following are some design and implementation patterns:
Messaging
Following are some patterns for messaging:
Figure 1.8: Messaging patterns
Following are some messaging patterns:
Management and monitoring
Following are some patterns for management and monitoring:
Figure 1.9: Management and monitoring patterns
Following are some of the management and monitoring patterns:
Performance and scalability
Following are some patterns for performance and scalability:
Figure 1.10: Performance patterns
Given below are some performancepatterns:
Resiliency
Following are some patterns for resiliency:
Figure 1.11: Resilience patterns
Following are some resilience patterns:
Security
Following are some patterns for security:
Figure 1.12: Security patterns
Given below are some security patterns:
Azure Components that Enable Cloud-native Application Development
There are certain building blocks which are essential for building cloud-native applications.
Infrastructure which provides Compute, Storage
DevOps, Automation
Runtime Containerization
Orchestration Engines
Monitoring, Logging and Auditing
In this book, we will look at how Azure as a platform provides the components required for building cloud-native applications.
Following are the high-level components that enable building cloud-native applications in Azure:
Figure 1.13: Components of Cloud Native Applications
App Services: App Services is a Platform as a Service offering for developing multichannel, multi-language and cross-platform applications.
We can deploy pre-built containers leveraging the App Service Plan with support for Azure Container Registry. In AppService option, there is no inbuilt support for orchestration or service discovery.
Serverless: A deployment infrastructure that hides the concept of - physical or virtual hosts, or containers. The infrastructure takes service code and runs it. Consumer charged for each request based on the resources consumed.
To deploy service using this approach, code needs to be packaged (e.g. as a ZIP file), uploaded to the deployment infrastructure and specify the desired performance characteristics.
The deployment infrastructure is usually operated by a public cloud provider. It typically uses either containers or virtual machines to isolate the services. However, these details are hidden from the users.
There are options like Azure Functions and Azure Logic Apps for addressing infrastructure concerns like capacity planning and server management. Azure Functions, Logic Apps are invoked as a reaction to events or triggers. Billing for serverless applications is based on resources consumed and, on the duration for which the application was running.
Integration, Messaging and Events: There are multiple integration, messaging and event processing options with Azure as a platform. It includes various services like
Service Bus
Event Grid
Event Hub
IoT Hub
API Gateway
Logic Apps
Compute options: (On-demand delivery of applications, storage, and other IT resources):
App Service is a managed PaaS offering
Service Fabric
Azure Kubernetes Service
Azure Functions
Azure Batch
Cloud Services
Containers:
Azure Kubernetes Service: AKS leverages Kubernetes Engine, which is open source.
Service Fabric supports containerization, and provides orchestration and discovery platform.
Data, Storage and Insights:
Stream Analytics
HDInsight
Data Factory
Data Lake Analytics
File storage:
Azure Storage blobs
Azure Data Lake Store
NoSQL databases:
Azure Cosmos DB
HBase on HDInsight
Cloud Native Applications – Microservices in Azure
We can leverage the following options to build microservices in Azure:
Service Fabric
Azure Service Fabric is Platform as a Service (PaaS) offering from Microsoft. It provides life cycle management, health monitoring, orchestration, container services.
Following are the features provided:
Containerization Service
Orchestration Service
APIs
Application Lifecycle Management
Service Discovery
Figure 1.14: Service Fabric
Azure Kubernetes Service
This service makes management and deployment of container-based applications easy. It provides health monitoring and reduces operational overhead.
It offers the following features:
Serverless Kubernetes
Provides CICD
Security
Governance
Azure Functions
Serverless compute service enables writing code in preferred language and running the code to handle events. Serverless architecture leverages the infrastructure only when resources are consumed. It removes the overhead of providing infrastructure. These are useful for handling short-lived tasks like writing to a blob, writing to a database, and so on.
API Management
The broad goals of API design in general can be defined as:
Enabling self-service for app developers and app users alike Reducing barriers to accessing valuable enterprise resources Prioritizing the needs and preferences of client app developers.
Encouraging collaboration between and among internal and external resources addressing the security and scaling issues of exposing IT assets to the open market.
Above all, API design must be focused on maximizing the business value of the interface. In part two, we will take a closer look at how APIs add value to the business.
API Management is used for provisioning, publishing, monitoring and managing APIs.
Security
Transformation
Allows setting quotas and rate limits
Caching
Logging
Mocking
Cloud Native Applications – Enterprise Use Cases
Following are some use cases that can be developed using cloud-native applications:
Use Cases for Conversational AI:
Bots can be built leveraging Language understanding models, Bing Knowledge and content out of the box, which are capable of learning from previous interactions
Omnichannel (across mobile, web) retailing uses a variety of channels in a customer’s shopping experience, including research before a purchase
Bots can help end customers have intelligent conversations with banks.
Use cases for Immersive Contextual Interactions:
Bots can help in Architecture Design Review in a construction site
Bots can help in enabling Remote Support in the field
Employee/User Training: VR provides training experiences where employees can visualize complex workplace situations and learn the appropriate responses first-hand through artificial intelligence
Improved Safety: 3D visualization can be leveraged to check crane reach and capability, in addition to examining the risks in case of load fall; or to access what the crane jib could hit
Use cases for Contextual Applications:
Trained AI-Hybrid Recommendation Algorithm
Product Recommendations, Personalized recommendations for medicines, and more.
Patients could receive guidance and treatment when needed. They can access their medical records, have an improved experience during office visits and receive ongoing personalized support
Clinicians could proactively identify at-risk patients by analyzing their medical records, use data from smart devices to provide personalized care
Use cases for Cognitive Processes:
HealthCare: Computer vision and OCR can be used to digitize the forms and convert them into electronic records. The electronic records in conjunction with AI based genealogy recommendations help in providing appropriate recommendations.
Oil and gas companies have a lot of seismic and geology data. Cognitive-based processing helps in making the right decisions.
Insurance: Fraud Risk Analysis can be done by leveraging Azure Machine Learning.
Pharma use cases - Digitized Pharma value chain
Following is a view of how cloud-native applications can be leveraged across the Pharma Value Chain to enable digital transformation:
Figure 1.15: Pharma Value chain
AI and Machine Learning help in more accurate R&D and clinical trials. They help in improved operations, cost efficiencies, and improved safety. Other use cases include improved supply chain management, which includes end to end supply chain integration, real-time analytics and dashboards, better patient communication and connected healthcare.
Oil and gas use cases:
Virtual/Mixed Reality: Helps mitigate risk and promotes safety by enabling remote connectivity.
Improved Collaboration: AR/VR-enabled collaboration helps in connecting field workers with subject matter experts who can guide them with the correct solution.
Predictive Maintenance: Predictive maintenance solutions gather data and leverage historical data to predict failures.
Retail use case:
Following is a sample use case in a retail scenario developed using cloud-native architecture:
Figure 1.16: Retail use case
Following is a brief overview of