Application Architecture Fundamentals
Earlier we discussed about PaaS and Azure/AWS PaaS services basics, now let’s discuss the
fundamentals of Application Architecture.
Let’s explore further,
What do you mean by Application Architecture?
An application architecture describes the patterns and techniques used to design and build an
application. The architecture gives you a roadmap and best practices to follow when building
an application, so that you end up with a well-structured app.
Software design patterns can help you to build an application. A pattern describes a
repeatable solution to a problem. Patterns can be linked together to create more generic
application architectures. Instead of completely creating the architecture yourself, you can
use existing design patterns, which also ensure that things will work the way they’re supposed
to.
Basic Application Architecture
Back-End Services
User
Web
Server
Internet
Or
FW
or
User
Interface
DB
Or
Data
Services
App
Gateway
Front-End Services
You’ll need to make implementation choices that are not captured in an architecture. For
example, a first step is to choose a programming language in which to write the application.
i.e Javascript for Front-end app or Swift for Mobile app.
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
Other popular programming languages include Ruby, Python, Swift, TypeScript, Java, PHP,
and SQL, among others. The language used when building an application will depend on
the type of application, available development resources, and the requirements.
Applications can be build using one of the below forms.
•
Monolith: Historically, applications were written as a single unit of code, where the
components all share the same resources and memory space.
•
Microservice: Modern application architectures are more often loosely coupled,
using microservices and application programming interfaces (APIs) to connect
services, they provide the foundation for cloud-native applications.
Cloud-native development is a way to speed up how you build new applications,
optimize existing ones, and provide a consistent development and automated management
experience across private, public, and hybrid clouds.
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
Choosing Your Architecture Style’s
An architecture style is a family of architectures that share certain characteristics. For
example, N-tier is a common architecture style. More recently, microservice
architectures have started to gain favor. Architecture styles don't require the use of particular
technologies, but some technologies are well-suited for certain architectures. For example,
containers are a natural fit for microservices.
The following are the Architecture Style Types:
1.
2.
3.
4.
5.
N-tier Application
Web- queue- Worker
Microservices
Event -driven Architecture
Big data and Big compute
N-tier Application: is a traditional architecture for enterprise applications. Dependencies
are managed by dividing the application into layers that perform logical functions, such as
presentation, business logic, and data access. A layer can only call into layers that sit below it.
However, this horizontal layering can be a liability. It can be hard to introduce changes in one
part of the application without touching the rest of the application. That makes frequent
updates a challenge, limiting how quickly new features can be added.
An N-tier architecture divides an application into logical layers and physical tiers.
A traditional three-tier application has a Presentation (Web) tier, a middle (Business Logic)
tier, and a database tier. The middle tier is optional. More complex applications can have
more than three tiers.
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
An N-tier application can have a closed layer architecture or an open layer architecture:
•
•
In a closed layer architecture, a layer can only call the next layer immediately
down.
In an open layer architecture, a layer can call any of the layers below it.
A closed layer architecture limits the dependencies between layers. However, it might
create unnecessary network traffic, if one layer simply passes requests along to the next
layer.
When to use N-tier Architecture
N-tier architectures are typically implemented as infrastructure-as-service (IaaS)
applications, with each tier running on a separate set of VMs.
Consider an N-tier architecture for:
•
•
•
Simple web applications.
Migrating an on-premises application to cloud with minimal refactoring.
Unified development of on-premises and cloud applications.
N-tier architectures are very common in traditional on-premises applications, so it's a
natural fit for migrating existing workloads to Azure.
N-tier architecture running on VMs on Azure Cloud.
Reference Link:
https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/n-tier
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
Web-Queue-Worker architecture style:
The core components of this architecture are
• Web Role (Front End): Serves client requests.
• Worker Role: performs resource-intensive tasks, long running workflows or batch
jobs.
The web front end communicates with the worker through a message queue.
Other components that are commonly incorporated in Web-Queue-Worker architecture
include:
•
•
•
•
•
One or more databases.
A cache to store values from the database for quick reads.
CDN to serve static content
Remote services, such as email or SMS service. Often these are provided by third
parties.
Identity provider for authentication.
The web and worker are both stateless. Session state can be stored in a distributed cache.
Any long-running work is done asynchronously by the worker. The worker can be triggered
by messages on the queue, or run on a schedule for batch processing. The worker is an
optional component. If there are no long-running operations, the worker can be omitted.
When to use Web-Queue-Worker Architecture
The Web-Queue-Worker architecture is typically implemented using managed compute
services, In regards to Microsoft Azure it uses either Azure App Service or Azure Cloud
Services.
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
Consider this architecture style for:
•
•
•
Applications with a relatively simple domain.
Applications with some long-running workflows or batch operations.
When you want to use managed services, rather than infrastructure as a
service
Recommended Web-Queue-Worker architecture that uses Azure App Service.
Reference Link:
https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/webqueue-worker
Microservices Architecture Style:
Earlier, monolith architecture were used for application development. By the mid-2000s, the
architectures began to change so that various layers existed outside a single server and as
independent service silos. Applications were designed to integrate these services by using an
enterprise service bus for communication. This is when Service Oriented Archtectures (SOA)
was introduced.
Service Oriented Archtectures (SOA):
SOA is an architectural style for building software applications that use services available in a
network such as the web. It promotes loose coupling between software components so that
they can be reused. Applications in SOA are built based on services. A service is an
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
implementation of a well-defined business functionality, and such services can then be
consumed by clients in different applications or business processes.
SOAs also coincided with the rise of the virtual machine (VM), which made physical server
resources more efficient. Services could be deployed much more quickly on smaller VMs than
previous monolithic applications on bare-metal servers. With this combination of
technologies, better high-availability (HA) solutions were developed, both within the services
architecture and with the associated infrastructure technologies.
Microservices Architecture: is an “architectural style that structures an application as a
collection of small autonomous services, modeled around a business domain.
Microservices architectures have come into use along with Docker containers—a packaging
and deployment construct. VM images have been used as the deployment mechanism of
choice earlier. But now containers are even more efficient than VMs, allowing the code (and
required code libraries) to be deployed on any OS that supports Docker containers. Containers
are the perfect deployment vector for microservices. They can be launched in seconds, so
they can be redeployed rapidly after failure or migration, and they can scale quickly to meet
demands.
Microservices provides the foundation for cloud-native applications.
What are Microservices?
•
•
•
•
•
•
Microservices are small, independent, and loosely coupled. A single small team of
developers can write and maintain a service.
Each service is a separate codebase, which can be managed by a small development
team.
Services can be deployed independently. A team can update an existing service
without rebuilding and redeploying the entire application.
Services are responsible for persisting their own data or external state. This differs
from the traditional model, where a separate data layer handles data persistence.
Services communicate with each other by using well-defined APIs. Internal
implementation details of each service are hidden from other services.
Supports polyglot programming. For example, services don't need to share the same
technology stack, libraries, or frameworks.
Some other components appear in a typical microservices architecture:
Management/orchestration: This component is responsible for placing services on nodes,
identifying failures, rebalancing services across nodes, and so forth. Typically this component
is an off-the-shelf technology such as Kubernetes, rather than something custom built.
API Gateway: is the entry point for clients. Instead of calling services directly, clients call the
API gateway, which forwards the call to the appropriate services on the back end.
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
Reference Link:
https://docs.microsoft.com/en-us/azure/architecture/guide/architecturestyles/microservices
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
Event- Driven Architecture Style:
An event-driven architecture consists of event producers that generate a stream of events,
and event consumers that listen for the events.
When to use this architecture
•
•
•
•
Multiple subsystems must process the same events.
Real-time processing with minimum time lag.
Complex event processing, such as pattern matching or aggregation over time
windows.
High volume and high velocity of data, such as IoT.
Reference Link:
https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/eventdriven
Big Compute Architectural Style:
Reference Link:
https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/bigcompute
Big Data Architectural Style:
Reference Link:
https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/big-data
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com
Please review the below references for a deep dive on Application Architectures.
Microservices Architectural Pattern:
https://www.oreilly.com/library/view/software-architecturepatterns/9781491971437/ch04.html
Design Principles for Azure applications:
https://docs.microsoft.com/en-us/azure/architecture/guide/design-principles/
Best Practices in Cloud Applications:
https://docs.microsoft.com/en-us/azure/architecture/best-practices/index-best-practices
Explore Industry Solutions with Azure.
Find the related topics mentioned in Azure Architecture Center Documentation.
Azure Cloud solutions for the following business verticals and Domain.
•
•
•
•
•
•
•
•
•
Retail
Finance
Education
Government
Health Care
Manufacturing
Media and Entertainment
Game Development
Many More….
Reference Link:
https://docs.microsoft.com/en-us/azure/architecture/industries/retail
This brings to end to an exciting topic on Cloud Application Architectures, Next we will observe
Azure PaaS services in action.
Do follow me on LinkedIn
Faiz Kazi
https://www.linkedin.com/in/faiz-kazi-13675b4a/
Application Architecture Fundamentals
Faiz Kazi- fkaz2021@outlook.com