View
496
Download
0
Category
Preview:
Citation preview
Software design is..
Making engineering decisionsDealing with trade-off Critical when something goes wrong
Designing cloud applications
Cache-aside problem - DB becomes bottleneck
User Web Role
Which data to cache? when?
Scale-out
Cache
Database
Seeding or on-demandData consistencyType of data to cacheLifetime of the dataUpdating dataRead-through/Write-behind cache
Cache-aside – considerations
Sharding – Lookup
Pros:- Flexibility on routing- Less impact when rebalancingCons:- Table maintenance is not trivial
Sharding – Range
Pros:- Efficient mapping- Affinity to range queryCons:- Particular shard may become hot spot- Noisy neighbors issue
Sharding – Hash
Pros:- Even distribution- In-memory mappingCons:- Overhead in computing hash- Impact in rebalancing
Use with other partitioning strategyChoose the right sharding strategyKeep the right balance across shardsAvoid JOIN across shardsKeep the room for growth
Sharding design considerations
How/When update the view?Data consistency issueData transfer/calculationGood for restricted access or occasionally connected scenarioNG for frequently changing data
Materialized View design considerations
Event Sourcing problem Limit of CRUD
Collaborative domain
Web site Database
CreateReadUpdateDelete
Conflicting updatesNo history recordAuditing is difficult
Replay events to get the current valueGenerate snapshots for quick replayData consistency issueGood for task-based UING for simple domain or strong consistency scenario
Event Sourcing design considerations
CQRS problem – R/W mismatch
User Interface
Data Access
Business LogicEntity
Collaborative domain Schema
Scale-out strategyUser privilege
Commands
CQRS solution
Data Access
DTOsBusiness Logic
Query / View
Task-Specific Command
User Interface
Event sourcing
Materialized View
Data consistency issuesOnly for limited section of the systemOne team on write, another on readNG for simple domain
CQRS design considerations
Search for “CQRS Journey“
© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Recommended