Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
A Developer's Guide to Building Resilient Cloud Applications with Azure
A Developer's Guide to Building Resilient Cloud Applications with Azure

A Developer's Guide to Building Resilient Cloud Applications with Azure: Deploy applications on serverless and event-driven architecture using a cloud database

eBook
$21.99 $31.99
Paperback
$39.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

A Developer's Guide to Building Resilient Cloud Applications with Azure

Introduction to Serverless Architecture, Event-Driven Architecture, and Cloud Databases

This first chapter introduces the book’s content, which includes the modernization of apps using application programming interfaces (APIs), event-driven architecture, functions, and Service Fabric, and connecting them with a database.

Modernization is not just reserved for companies that have been operating stable systems for years and whose data volume has evolved. Organizations want to remain profitable and not be left behind by not modernizing technology and taking advantage of changes in the market due to world-changing factors, such as Covid-19.

Modernization is about accelerating innovation and reducing costs. Modernization is not just about the app but also the data.

In this chapter, we’re going to cover the following main topics:

  • Understanding serverless architecture
  • Understanding the role of APIs inside an application and their ecosystem
  • Understanding event-driven architecture
  • Exploring cloud databases

Understanding serverless architecture

Serverless architecture is a software design pattern where applications are hosted by a third-party service, allowing developers to build and run services without having to manage the underlying infrastructure.

Applications are divided into separate functions that can be called and scaled individually.

Developers implement and deploy application-only code and can run applications, databases, and storage systems hosted in servers provisioned by cloud providers.

We will understand the role of APIs inside an application and the ecosystem. To start modernizing legacy applications without any modification, we can use APIs to interact with existing code. These APIs will run in the cloud, but if we need to add more features to the application to modernize it, we will encapsulate the data and the functions in services via an API. This encapsulation phase is a technique that consists of reusing legacy software components. The goal is to keep the code in its environment and connect it to the new presentations via encapsulation to access the different layers through an API. APIs permit you to define common protocols (rules) to expose data from an application with the possibility of decoupling the presentation layer.

Technically, the encapsulation works with wrapper technology, providing a new interface for a legacy component. This component will be easily accessible from the rest of the software components.

These minimal modifications reduce the risk of destabilizing the application. Even if encapsulation is a fast, effective, and less expensive solution, it will not solve the present problems related to the difficulties of maintenance or upgrading.

Because we are talking about the role of APIs in digital transformation and their life cycle, we need to define them.

API definition

APIs form a bridge between different applications to ensure communication and the exchange of information between them. They can even define the behavior of these applications.

APIs are considered connectors because they provide the ability for disparate applications to exchange information.

The information exchanged is generally data; for example, if we make a request in a mobile application, the data will be sent to a server that performs the reading and then sends back a response in a format readable in JSON.

Sometimes, microservices are compared with APIs. We often talk about the relationship between APIs and microservices, but there is also a difference between them. Microservices are a style of architecture that divides an application into a set of services; each service presents a very particular domain, for example, an authentication service or another service for the management of the products. On the other hand, an API is a framework (a structure that you can build software on) used by developers to provide interaction with a web application. Alternatively, microservices can use an API to provide communication between services. But how does an API work?

Applications that send requests are called clients, and applications that send responses are called servers. Using bees as an example, the hive is the client, the flower is the server, and the bee is the communication path (REST API requests).

The API life cycle

The API manager – usually the enterprise architect or API product manager – manages the API life cycle.

The API life cycle consists of the following three main phases:

  • The creation phase: This consists of creating and documenting the API. There are some key aspects of API creation to consider; the API will use or reuse backend resources (service or business capability implementation). These resources are typically available as RESTful services, Simple Object Access Protocol (SOAP)-based web services, or even Advanced Message Queuing Protocol (AMQP)-compliant message brokers.
  • The control phase: This consists of applying the security policies necessary to ensure that the exchanges are secure.
  • The consumption phase: This consists of publishing the API so that we can consume and monetize it.

After understanding the API life cycle and the different phases, we will next look at the important role of an API in terms of communication between applications.

An APIs role

A set of rules ensures the communication of APIs by defining how applications or machines can communicate, so the API is an intermediate bridge between two applications wanting to communicate with each other.

API types

A web API is an API that can be accessed via the HTTP protocol. There are many API protocols/specifications, as follows:

  • Open APIs
  • Partner APIs
  • Internal APIs
  • Composite APIs
  • Representational State Transfer (REST)
  • SOAP
  • Extensible Markup Language Remote Procedure Call (XML-RPC)
  • JavaScript Object Notation Remote Procedure Call (JSON-RPC)

The most popular type of API is RESTful because it has several advantages in terms of flexibility when creating an API that meets the client’s needs and dependencies because the data is not bound to methods or resources. A RESTful API supports different data formats, such as application/json, application/xml, application/x-wbe+xml, multipart/form-data, and application/x-www-form-urlencoded.

RESTful APIs take advantage of existing protocols – for example, web APIs take advantage of the HTTP protocol.

So far, in this chapter, we have talked about encapsulation to access the different layers through an API as a technique used for legacy system modernization. We have presented the API life cycle and API roles, which encompasses several roles to ensure communication, and we have identified the API types, such as RESTful APIs, which are the most popular. In the next section, we will present the event-driven architecture used to improve agility in complex applications.

Understanding event-driven architecture

Event-driven architecture is a software architecture that uses events in order to be able to communicate between decoupled services. It is a pattern for designing applications that are loosely coupled and is used in modern applications built with microservices. When consumers are listening to an event, which could be a status change or an update, event producers are not able to know which event consumers are listening to and do not even know the consequences of its occurrence.

In an event-driven architecture, we have the following three key components:

  • Event producers: These generate a stream of events
  • Event routers: These manage event delivery between producers and consumers
  • Event consumers: These listen to the events

The following diagram illustrates these components:

Figure 1.1 – Event-driven architecture

Figure 1.1 – Event-driven architecture

The source of an event is triggered by internal or external inputs. They can be generated by either a user (by clicking or using keyboard input, for example), an external source (such as a sensor output), or through a system (such as loading a program).

In an event-driven architecture, we can use event streaming or a publisher/subscriber model. But what is the difference between event streaming and a publisher/subscriber model?

  • Publisher/subscriber model: This provides a framework that enables message exchanges between publishers and subscribers. This pattern involves the publisher and the subscriber and depends on a message broker that reroutes messages from the publisher to the subscriber.
  • Event streaming: When a stream of events is published to a broker, the clients are able to subscribe to the stream and join at any time; they have access to them and can consume multiple preferred streams, and they are able to read from any part and advance their position. The events are always written in a log file.

Event-driven architectures are recommended to improve agility and move quickly. They are used in modern applications, mainly microservices, or in any application that includes several decoupled components. When adopting an event-driven architecture, you may need to rethink how you view your application design.

In this section, we have explored event-driven architecture and the different key components.

Exploring cloud databases

A cloud database is a database service created and accessed through a cloud platform.

A cloud database is a collection of information, structured or unstructured, that is hosted in a private, public, or hybrid cloud computing infrastructure platform. There is no structural or conceptual difference between a cloud or on-premises database, it’s just the location that’s different.

Cloud databases are divided into two broad categories: relational and non-relational.

As in the case of databases with traditional ancestors, we have the same definition for a relational database, which is written in Structured Query Language (SQL). It is composed of tables organized in rows and columns with relationships between them, called fields. This relationship is specified in a data schema.

Non-relational databases, also called NoSQL, use a different storage concept based on documents. They do not use a table model to store content as in the traditional approach; they use a single document instead.

A non-relational database is recommended for unstructured data – for example, for social media content, photos, or video storage. There are two models of cloud database environments: traditional (which we discussed earlier) and database as a service (DBaaS).

For the first case, we can host a virtual machine, install the cloud database management system (DBMS), and the database runs on this machine, so the management and monitoring of the database are managed by the organization. On the other hand, the DBaaS model is a paid subscription service in which the database runs on the physical infrastructure of the cloud service provider.

Azure offers a set of fully managed relational, NoSQL, and in-memory databases:

  • Azure SQL Database: This is used for applications that scale with intelligent, managed SQL databases in the cloud
  • Azure SQL Managed Instance: This is used to modernize your SQL Server applications with a managed, always up-to-date SQL instance in the cloud
  • SQL Server on Azure Virtual Machines: This is used to migrate SQL workloads to Azure while maintaining full SQL Server compatibility and OS-level access
  • Azure Database for PostgreSQL: This is used to build scalable, secure, fully managed enterprise-grade applications using open source PostgreSQL, scale PostgreSQL with single-node and high performance, or move your PostgreSQL and Oracle workloads to the cloud
  • Azure Database for MySQL: This used to provide high availability and elastic scaling for your open source mobile and web apps with the managed community MySQL database service or move your MySQL workloads to the cloud
  • Azure Database for MariaDB: This is used to build applications anywhere with guaranteed low latency and high availability at any scale, or move Cassandra, MongoDB, and other NoSQL workloads to the cloud
  • Azure Cache for Redis: This is used to run fast and scalable applications with open source compatible in-memory data storage
  • Azure Database Migration Service: This is used to accelerate your move to the cloud with a simple, self-paced migration process
  • Azure Managed Instance for Apache Cassandra: This is used to modernize existing Cassandra data clusters and apps and enjoy flexibility and freedom with the Managed Instance service

Summary

If you are building a new application or are in the process of modernizing a legacy application, you need to understand these architectures: serverless architecture, APIs, and event-driven architecture. These architectural patterns are critically important to master.

This chapter was about serverless architecture, API definition, types, life cycles, communication between applications or machines, event-driven architecture, and cloud databases.

In the next chapter, you will learn how to deploy web APIs and the explore function of the API management service.

Questions

  1. What are the three key components of event-driven architecture?
  2. What are the different Azure database services?
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand Function-as-a-Service and Azure Service Fabric for distributed applications
  • Develop event-based and message-based solutions using Event Grid and Azure Event Hubs
  • Explore continuous deployment for Docker with Azure DevOps and integrate Docker Hub with CI/CD pipelines

Description

To deliver software at a faster rate and reduced costs, companies with stable legacy systems and growing data volumes are trying to modernize their applications and accelerate innovation, but this is no easy matter. A Developer’s Guide to Building Resilient Cloud Applications with Azure helps you overcome these application modernization challenges to build secure and reliable cloud-based applications on Azure and connect them to databases with the help of easy-to-follow examples. The book begins with a basic definition of serverless and event-driven architecture and Database-as-a-Service, before moving on to an exploration of the different services in Azure, namely Azure API Management using the gateway pattern, event-driven architecture, Event Grid, Azure Event Hubs, Azure message queues, FaaS using Azure Functions, and the database-oriented cloud. Throughout the chapters, you’ll learn about creating, importing, and managing APIs and Service Fabric in Azure, and discover how to ensure continuous integration and deployment in Azure to fully automate the software delivery process, that is, the build and release process. By the end of this book, you’ll be able to build and deploy cloud-oriented applications using APIs, serverless, Service Fabric, Azure Functions, and Event Grid technologies.

Who is this book for?

This book is for cloud developers, software architects, system administrators, database administrators, data engineers, developers, and computer science students who want to understand the role of the software architect or developer in the cloud world. Professionals looking to enhance their cloud and cloud-native programming concepts on Azure will also find this book useful. A solid background in C#, ASP.NET Core, and any recent version of Visual Studio and basic knowledge of cloud computing, Microsoft Azure, and databases will be helpful when using this book.

What you will learn

  • Understand the architecture of Azure Functions and Azure Service Fabric
  • Explore Platform-as-a-Service options for deploying SQL Server in Azure
  • Create and manage Azure Storage and Azure Cosmos DB resources
  • Leverage big data storage in Azure services
  • Select Azure services to deploy according to a specific scenario
  • Set up CI/CD pipelines to deploy container applications on Azure DevOps
  • Get to grips with API gateway patterns and Azure API Management

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 24, 2023
Length: 296 pages
Edition : 1st
Language : English
ISBN-13 : 9781804612965

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Feb 24, 2023
Length: 296 pages
Edition : 1st
Language : English
ISBN-13 : 9781804612965

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 131.97
Azure Architecture Explained
$49.99
A Developer's Guide to Building Resilient Cloud Applications with Azure
$39.99
A Developer's Guide to Cloud Apps Using Microsoft Azure
$41.99
Total $ 131.97 Stars icon

Table of Contents

17 Chapters
Part 1: Building Cloud-Oriented Apps Using Patterns and Technologies Chevron down icon Chevron up icon
Chapter 1: Introduction to Serverless Architecture, Event-Driven Architecture, and Cloud Databases Chevron down icon Chevron up icon
Chapter 2: API Management – Import, Manage, and Publish Your First API Chevron down icon Chevron up icon
Chapter 3: Developing Event-Based and Message-Based Solutions Chevron down icon Chevron up icon
Part 2: Connecting Your Application with Azure Databases Chevron down icon Chevron up icon
Chapter 4: Creating and Deploying a Function App in Azure Chevron down icon Chevron up icon
Chapter 5: Develop an Azure Service Fabric Distributed Application Chevron down icon Chevron up icon
Chapter 6: Introduction to Application Data Chevron down icon Chevron up icon
Chapter 7: Working with Azure SQL Database Chevron down icon Chevron up icon
Chapter 8: Working with Azure Storage Chevron down icon Chevron up icon
Chapter 9: Working with Azure Cosmos DB to Manage Database Services Chevron down icon Chevron up icon
Chapter 10: Big Data Storage Overview Chevron down icon Chevron up icon
Part 3: Ensuring Continuous Integration and Continuous Container Deployment on Azure Chevron down icon Chevron up icon
Chapter 11: Containers and Continuous Deployment on Azure Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(6 Ratings)
5 star 66.7%
4 star 16.7%
3 star 0%
2 star 0%
1 star 16.7%
Filter icon Filter
Top Reviews

Filter reviews by




Adriana Sanches Apr 10, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you're interested in building resilient cloud applications with Azure, then "A Developer's Guide to Building Resilient Cloud Applications with Azure: Deploy applications on serverless and event-driven architecture using a cloud database" is the book for you.The book covers important topics, including serverless architecture, event-driven architecture, and cloud databases. It explains the different types of APIs and their roles in an application ecosystem. This is a critical foundation for building cloud applications.Next, the book covers API management and API security. It explains how to import, manage, and publish your first API using Azure API Management.It also teachs you how to develop event-based and message-based solutions, using multiple services including Event Grid, Azure Event Hubs, and Service Bus Queue and Topic.It covers all the different data services you can use with your apps, including Azure SQL, SQL Managed Instance and Storage Accounts.And last but not least, you learn how to apply important principles, such as continuous integration/continuous delivery (CI/CD) to automate the provisioning and deployment of your apps and the environment hosting them.Overall, this book is an excellent guide for everyone who wants to build resilient cloud applications using Azure. It covers everything from API management to big data storage, making it a comprehensive resource for anyone interested in cloud application development. I highly recommend it!
Amazon Verified review Amazon
Hamida Rebai Nov 16, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
"A Developer's Guide to Building Resilient Cloud Applications with Azure" is a comprehensive resource for anyone looking to modernize applications using Azure's cloud services. This book is particularly valuable for those grappling with the challenges of transitioning from legacy systems to a more scalable, cloud-based architecture.Key strengths of the book include its detailed coverage of Azure services like Function-as-a-Service, Azure Service Fabric, Event Grid, and Azure Event Hubs. These sections provide not only theoretical understanding but also practical guidance on developing distributed applications and implementing event-based and message-based solutions.Another notable aspect is the book's focus on continuous deployment, especially for Docker with Azure DevOps. This integration is crucial for modern software development, and the book does an excellent job of explaining how to automate the software delivery process using Azure's CI/CD pipelines.For developers and IT professionals, the exploration of database options, such as managing Azure Storage and Azure Cosmos DB resources, is particularly useful. It provides a solid foundation for leveraging big data storage in Azure services and choosing the right service for specific scenarios.However, the book might be overwhelming for beginners due to its technical depth. It's more suited for those with some background in Azure or cloud services. Additionally, while it covers a vast range of topics, some readers might find the need for more in-depth case studies or real-world examples.In summary, this book is a valuable asset for developers and IT professionals looking to modernize applications using Azure. It offers a detailed exploration of various Azure services, making it a worthwhile investment for those looking to deepen their understanding of cloud-based application development.
Amazon Verified review Amazon
Tidjani Belmansour Mar 18, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've started reading this book out of curiousity at first but it is so interesting that I've read it cover-to-cover in under a week!It's well written and provides practical guidance. I appreciated that there was a real-world scenario that I followed from chapter to chapter, each chapter adding a new piece to the puzzle. Concepts such as Serverless computing, Event streaming and API Gateway are explored in this book, which are at the core of Cloud solutions.I also really liked the fact that each chapter comes with exercises to engage me as a reader and allow me to practice each concept.I recommend it!
Amazon Verified review Amazon
Houssam Chahine Aug 21, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The author provides practical examples and code snippets to demonstrate effective patterns for event-driven designs. Whether you're a cloud architect or developer looking to optimize your next project, this book provides invaluable guidance on modern application development in the Azure ecosystem.
Amazon Verified review Amazon
davehunter Aug 28, 2023
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
🚀 Overall this is a great book with in-depth subjects across the Azure stack.This is a personal view, but I believe it lacked the "Resilient" focus. The title could of been Building Cloud Native Applications with Azure and would be 5 stars ⭐⭐⭐⭐⭐. I would still rate the book a well deserved and enjoyable read at 4 stars ⭐⭐⭐⭐The whole resilient topic can be blurred across highly available, reliable and fault tolerance. Microsoft's view is "Reliability consists of two principles: resiliency and availability. The goal of resiliency is to return your application to a fully functioning state after a failure occurs. The goal of availability is to provide consistent access to your application or workload be users as they need to."Taking this view of returning the application to a fully functioning state after a failure occurs, yes the platform or Azure Infrastructure has resilience built-in, however building an application on Azure using Service Bus topics with other consuming applications could make use of Retry Policies. Or use cases for using the DLQ for poison messages using MessageReceiver.Abandon() method to reject the message from further processingespecially when processing of messages from a 3rd party cannot be guaranteed. You could also compare integration scenarios when using Azure Functions vs Logic Apps, with the latter giving more granular error handling.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.