2月初,微软patterns & practices(P&P)组发布了面向Windows Azure的设计模式(Design Patterns),提供了丰富的设计模式、指导和样例代码等资源。
具体请见:http://msdn.microsoft.com/en-us/library/dn568099.aspx
目前,网站中提供了24个设计模式,即:
Cache-Aside Pattern
Circuit Breaker Pattern
Compensating Transaction Pattern
Competing Consumers Pattern
Compute Resource Consolidation Pattern
Command and Query Responsibility Segregation (CQRS) Pattern
Event Sourcing Pattern
External Configuration Store Pattern
Federated Identity Pattern
Gatekeeper Pattern
Health Endpoint Monitoring Pattern
Index Table Pattern
Leader Election Pattern
Materialized View Pattern
Pipes and Filters Pattern
Priority Queue Pattern
Queue-Based Load Leveling Pattern
Retry Pattern
Runtime Reconfiguration Pattern
Scheduler Agent Supervisor Pattern
Sharding Pattern
Static Content Hosting Pattern
Throttling Pattern
Valet Key Pattern
这些模式分别对不同的设计目标进行了支持,包括:
可用性(availability)
数据管理(data management)
设计与实现(design and implementation)
消息(messaging)
管理与监控(management and monitoring)
性能与伸缩性(performance and scalability)
稳定性(resiliency)
安全性(security)
我们可以针对不同的设计目标,可以发现相关的设计模式。例如,在进行高可用性设计的时候,我们可以看到,可以根据应用场景选择下面的三个设计模式:
而Throttling Pattern不仅仅可以支持高可用性设计,实际上对于性能与伸缩性(performance and scalability),也是一个关键的、可选择的设计和实现方式。
对于Throttling Pattern,在实现中,可以使用Enterprise Library 5.0 Integration Pack for Windows Azure中的Autoscaling Application Block(http://msdn.microsoft.com/library/hh680892(v=pandp.50).aspx)
其中,包括了对限流行为的实现(Implementing Throttling Behavior),具体可见:http://msdn.microsoft.com/en-us/library/hh680896(v=pandp.50).aspx