Click to add a little subtitle
EAS Architecture
TOMY RHYMOND – EAS CLOUD ARCHITECT
DEVELOPMENT APPROACHES
▪ A monolithic app contains domain-specific functionality and is normally divided by functional layers, such as web, business, and data
▪ You scale a monolithic app by cloning it on multiple servers/virtual machines/containers.
▪ A microservice application separates functionality into separate smaller services.
▪ The microservices approach scales out by deploying each service independently, creating instances of these services across servers/virtual machines/containers.
1
2
3
4
MICROSERVICE APPLICATION APPROACH
• Defines an architecture that structures the application as a set of loosely coupled, collaborating services.
• Services can be developed and deployed and scaled independently of one another
• Each service has its own database in order to be decoupled from other services
• Enables the continuous delivery and deployment of large, complex applications
• Each microservice is relatively small
• Improved fault isolation
• Eliminates any long-term commitment to a technology stack
Web Browser
Application Gateway
Asset Service
Document Service
Database
Database
REST
Api
REST
Api
Party Service
Asset Tracking Service
Front End Service
Front End Service
Back End Service
Back End Service
TECHNOLOGY STACK▪ Azure Service Fabric
▪ Distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices and containers.
▪ Azure Application Gateway
▪ Gives you application-level routing and load balancing services that let you build a scalable and highly-available web front end in Azure.
▪ Azure Application Insight
▪ Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms.
▪ Use it to monitor your live web application.
▪ It will automatically detect performance anomalies.
▪ It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app.
▪ Azure SQL Service
▪ Datastore for EAS applications
▪ Azure Storage Blob
▪ EAS documents will be stored in blob storage
▪ Azure Service Bus
▪ Asynchronous Microservice integrations are achieved via Service Bus
▪ Redis Cache
▪ For caching data
▪ Azure Functions
▪ Handle server less functions. For example get data from service bus and update Cosmos DB
▪ Cosmos Db (Mongo API)
▪ No SQL Database for Search
▪ Angular
▪ Bootstrap
▪ .NET Core 2
▪ Entity Framework Core
▪ Swagger
▪ Serilog
▪ MediatR
▪ Automapper
▪ Autofac
▪ Ready Roll
▪ Mongo Driver Core
INFRASTRUCTURE ARCHITECTURE
Browser
Application Gateway
Storage blob
Virtual Network
PORT
Azure SQL database
Service Fabric Cluster
Oracle DB
Services
On-Premise
CORE Application
Azure
HTTPHTTPS
VPN Gateway
Redis cache
Application Insights Cosmos DB (Mongo)
Azure Function
Nod
e
Node
Node
NodeNode
Azure Key Vault
Service bus
SERVICE ARCHITECTURE
API Gateway (Back End For Front End)
ServiceService
Stateless Service
ServiceService
Stateless Service
ServiceService
Stateless Service
ServiceService
Stateless Service
Azure SQL database Cosmos DB
(Mongo)Redis cache
Storage blob Service bus
Background Services
Storage blob
API Gateway (Back End For Fron End)
HTTP
Azure Key Vault
HTTP HTTP
Functions
Logg
ing
(Se
rilo
g)
ApplicationInsights
Azure Application Gateway
HTTPSHTTPS
Angular Web App (Browser) Angular Web App (Browser)
REST REST
SERVICE FABRIC
Azure Service Fabric is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices.
Infrastructure concepts Application concepts System services
Cluster
Node
▪ A network-connected set of virtual or physical machines into which your microservices are deployed and managed.
▪ Clusters can scale to thousands of machines
▪ A machine or VM that's part of a cluster is called a node.
▪ Each node is assigned a node name
▪ An application is a collection of constituent services that perform a certain function or functions.
Application
▪ A service performs a complete and standalone function and can start and run independently of other services.
Service
Naming Service
Image Store Service
Failover Manager Service
▪ Resolves service names to a location in the cluster
▪ Deployed and versioned application packages are kept.
▪ Performs functions related to high availability and consistency of services
▪ Orchestrates application and cluster upgrades
SERVICE FABRIC APPLICATION
• A service fabric application package is the smallest deploy-able unit to a service fabric cluster. The content of an application package describe a service or a set of services that will be deployed on a Service Fabric cluster
• The content and structure of the package is so important to understand in context of creating & updating your micro- services.
Application Manifest
Service Fabric Application
Service
Stateless Service
Code Config Data
• .NET Core • EF Core• Serilog• AutoMapper• Redis• Swagger
Service Manifest
Service Fabric Application
MICROSERVICE APPLICATION
Entity Framework Core
Databse
DbContext
Repository Repository Repository Repository
Unit of WorkUnit of WorkUnit of Work
Model Model Model Model
DbContext DbContext
Cache
API ControllerView
ModelView
ModelView
Model
Mapper
Logg
ing
(Se
rilo
g) Storage blob
Business ServiceEntity Entity Entity
Azure Key Vault
Application Insights
SEARCH MICRO SERVICE
Api Controller
Command Bus
Command Handler
Domain
Repository
DbContext
EntityFramework Core
Domain Model
Domain Model
Domain Model
Event Handler
Database
Eve
nt
Ha
nd
ler
Service bus topic
Cosmos DB(Mongo)
Query Service
Repository
DbContext
EntityFramework Core
Search Api Controller
Query Service
Repository
DbContext
AUTHENTICATION
SAFE Portal
Angular App
Auth Service
Token
OEDS
JWT Token with Claims
ServicesServices
JWT Token with Claims
Azure
On-Premise
CONTINUOUS DELIVERY
Development OperationsCollaboration
Develop & TestRelease
Monitor & LearnPlan
Developers and Test
Operators
Release Management
Requirement Backlog
Performance and availability diagnostics
Continuous Learning and Improvement
Continuous Acceptance Testing
Planning Automated Release pipeline is needed to deliver at the pace development with full traceability
Agile methodologies are accelerating dev/test process
Availability and performance issues are hard to troubleshoot in this fast changing world with distributed applications
Usage should determine the next set of priorities and learning
Database CI/CD
PRODAzure SQL database
VSTS
SQL Script
QAAzure SQL database
DEV Azure SQL database
SQL database (local)
1
2
3
6
4
5
RELEASE MANAGEMENT
Developer
ReleaseBuild
DEV
QA
STAGE
PROD
Build Release
Source Control
master
Dev
Manager
Manager
Manager
CI/CD Pipeline
CI/CD Pipeline
RELEASE MANAGEMENT (cont.)
▪ Manage automated deployments through each stage of your pipeline.
▪ Deploy applications, database changes, and infrastructure to the cloud, on-premises, or hybrid cloud
▪ Gated Release with Approvals at every stage.
▪ Build once and deploy the same bits to all environments
▪ Seamlessly Manage Azure Environments
DEVELOPMENT TOOLS
Developer Tool Installer Location
Visual Studio 2017 (Available in developer machine, no install necessary)
.NET Core SDK 2.xx https://www.microsoft.com/net/download/windows
VS Code https://code.visualstudio.com/
SQL Server 2017 https://www.microsoft.com/en-us/sql-server/sql-server-editions-express
SQL Server Management Studiohttps://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-
ssms
Microsoft Service Fabric SDK (for
VS 2017)Install from Web Platform Installer
Microsoft Service Fabric Explorerhttps://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-visualizing-your-
cluster
Node.Js https://nodejs.org/en/
Linq Pad http://www.linqpad.net/
Docker Container https://store.docker.com/editions/community/docker-ce-desktop-windows
Redis Cache
From Command Line run the following command:
docker run –name eas-cloud –d redis
Run the following command to confirm:
docker ps
Redis cache will now accept connection on container port 6379