Vous êtes sur la page 1sur 13

Time-Proven Design

Practical CQRS with Windows Azure CQRS architecture principles


Lokad Flavor are based on DDD2, Event
Sourcing and cloud experience.

Simplified practical approach to build and By Cloud Enthusiasts


Lokad team continuously learns
maintain complex cloud solutions with small ff
and shares Azure experience
teams. via conferences and blogs.

With OSS Framework


Lokad relies on Lokad.CQRS for
complex integrations, high-load
data processing and business
workflows.

1. CQRS = Command Query Responsibility Segregation


2. DDD = Domain Driven Design http://abdullin.com
Limitations
Every approach has these

We are still learning


Based on the current practical experience

Only 3 cloud projects


Not all scenarios are covered

Limited teaching experience


Only with distributed teams in EU/ Russia

Startup Survival Mindset


Limited resources, low-friction development

Unlearning Curve
A bit of unlearning is needed to build for cloud

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


CQRS
Command-Query Responsibility Segregation

Design Principle
Separation of reads from writes

Architecture Model for Cloud


Patterns + Design + Project Guidelines

Messaging

Domain-Driven Design

CQRS

Event Sourcing

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Simple Organizational Model
deriving from Command-Query
Responsibility Segregation Load Balance

Decide Partition Replicate

Command Query 1 2 3

Act Report
Native cloud distribution for fault-
Event
tolerance (cloud is cheap but
volatile) and performance.

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Worker Role

Windows Azure Azure Fabric Web Role


Platform as a Service Platform as a Service

Custom VM
Pay-as-you-go SQL Azure
Elastic Scaling Cloud MS SQL

Native .NET Table

Azure Storage Queue


NoSQL

Blob

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Client
Web Role, ASP.NET
Send MVC 2/3, WinForms,
WCF REST API, AJAX Query
Commands
Views

Service Bus Views


Azure Worker, Azure Blob/Table
Service Publish Storage, NoSQL
Persistence Events
View Handlers
Azure SQL, NoSQL,
Azure Worker Role,
Azure Blob/Table Service
Domain Log
Azure SQL, Table Storage

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Lokad.CQRS
for Windows Azure

CodePlex Project Cloud Architecture Guidance


CQRS1 App Engine for Azure Tutorials Samples
Native Azure Queues Article Series
Architecture Patterns & Practices
Atomic Storage Development and deployment
Debugging, upgrades and
Streaming Storage maintenance
Full auditability
Project Testability Scalability Theory
ASP.NET MVC Web Client Guidance
System.Transactions
Decoupled Interface Lokad Feature Studies
Lokad.Cloud Support Ask.Lokad Community
1. CQRS = Command Query Responsibility Segregation

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Case 1: Salescast
Cloud integration engine
capable of processing millions
of product references, tailored
for large retail networks.

Lokad.CQRS significantly
simplifies the development
while preserving cloud Salescast Web UI Maintenance UI
scalability. It allows to have .NET 4.0, Lokad.CQRS Client, .NET 4.0, Lokad.CQRS Client,
less than one hour interval ASP.NET MVC 2 Windows Forms
between committing code and
reliably deploying latest
changes into production. Lokad
Customer DBs
Forecasting API
Features: Salescast Server
Multi-tenant Partner APIs
Lokad.CQRS Worker
Tenant-specific ad-hoc
integration logic. Integration Servers Lokad Hub
Full audit logs.
Auto detection of 3rd party Salescast Store
business apps.
SQL Azure, Azure Storage
API.

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Case 2: Callcalc
Email-based forecasting client
for call centers. You send an
Excel spreadsheet with call
volumes and Callcalc replies
with forecasts.

Lokad.CQRS provides simple


and reliable foundation for a CallCalc Web UI
heavily verticalized solution .NET 4.0, Lokad.CQRS Client,
Email Interface
that tailors our raw Forecasting .NET 4.0, Lokad.CQRS Client, IMAP
ASP.NET MVC 3
API for the very specific needs
of call centers.
Lokad
Features: Forecasting API
Multi-tenant IMAP Mailbox
Callcalc Server
Multiple calling queues Lokad.CQRS Worker
Erlang-C staffing Microsoft Excel
optimization Lokad Hub
IMAP interface
Callcalc Store
Azure Blob Storage

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Case 3: Lokad Hub
Platform unifying metered pay-
as-you-go forecasting
subscription offered by Lokad.

Lokad.CQRS was key to


transition a pre-cloud business
app toward a decoupled and
efficient design. It provided Hub Customer UI Hub Admin UI
additional reliability and .NET 4.0, Lokad.CQRS Client, .NET 4.0, Lokad.CQRS Client,
allowed much faster iterations. ASP.NET ASP.NET

Features:
Multi-tenant.
Full audit logs. Payment Gateway
Flexible reporting, including Hub Server
ad-hoc reports and Geo-Location Lokad Analytics
Lokad.CQRS Worker
temporal queries.
Reliable failure handling. CRM System
No-downtime upgrades.
Integration with payment,
Geo-Location and CRM Hub Data
systems. SQL Azure, Azure storage

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


Conclusion: Diverse Projects leveraging CQRS + Azure
Targeting retailers:
Massive Scalability – CQRS
Lokad Salescast
Complexity – DDD
Handling integrations with unreliable legacy

Targeting call centers:


Parsing Excel spreadsheets on the cloud
Lokad Callcalc
Blending automation and human support
Azure seamlessly integrated into existing IT

Centralized SaaS subscription management:


Metered pay-as-you-go billing
Lokad Hub
Kept simple and lean with DDD
Full auditability to reduce dev & support friction

Same Resources and Experience


Same Azure Stack Same Architecture Same Tools

Same Teams Same Design Principles Same Scalability

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


CQRS Scaling

Tackle Complexity Teams Performance


DDD1 UI vs Server Storage + Load

Models Domain vs Reports Replication

Reliable Integration Familiar IDEs Cloud Elasticity

Lower Costs
Efficient Competitive
Less Friction
Development Advantage
Faster Iterations
1. DDD = Domain Driven Design

CQRS with Windows Azure – http://abdullin.com and http://lokad.com


References on CQRS with Windows Azure
CQRS Info: http://cqrsinfo.com/
CQRS Starting Point: http://abdullin.com/cqrs/
Lokad.CQRS for Windows Azure: http://code.google.com/p/lokad-cqrs/

Presentation
Rinat Abdullin: http://abdullin.com
Lokad SAS: http://lokad.com

Questions?
DDD/CQRS: http://groups.google.com/group/dddcqrs
CQRS + Azure: http://groups.google.com/group/lokad
Private: rinat.abdullin@gmail.com

CQRS with Windows Azure – http://abdullin.com and http://lokad.com

Vous aimerez peut-être aussi