云计算设计模式:构建云应用的架构指导

需积分: 9 4 下载量 10 浏览量 更新于2024-07-21 收藏 5.77MB PDF 举报
“Cloud Design Patterns Book 提供了针对云应用程序的架构指导,涵盖了24种常用的设计模式,旨在帮助开发者更好地理解和设计云应用。” 在云环境中,设计模式是解决常见问题的标准化解决方案,这些模式在构建可扩展、可靠且经济高效的云应用时非常关键。以下是部分设计模式的详细解释: 1. **Cache-Aside Pattern**:这种模式用于缓存数据,提高访问速度。当应用程序需要数据时,它首先尝试从缓存中获取,如果不在缓存中,则从主数据源获取,并将数据放入缓存,以便后续请求。 2. **Circuit Breaker Pattern**:断路器模式用于防止应用程序反复尝试执行可能失败的操作,从而避免系统资源被长时间占用。当检测到连续失败时,断路器会打开,阻止进一步的尝试,直到系统恢复或经过一段时间的冷却期。 3. **Compensating Transaction Pattern**:事务回滚模式用于处理分布式事务中的错误。当一个操作序列的一部分失败时,该模式通过执行补偿操作来撤销已成功部分的影响,确保系统的一致性。 4. **Competing Consumers Pattern**:并行处理模式允许多个消费者并行处理消息队列中的消息,提高了处理速度和系统的吞吐量。 5. **Command and Query Responsibility Segregation (CQRS)**:读写分离模式将数据库的读取和写入操作分开,使用独立的数据模型和存储,以优化读取性能。 6. **Event Sourcing**:追加写入模式通过存储所有对系统的更改作为事件流来维护系统状态,便于审计和回溯。 7. **External Configuration Store**:外部配置存储模式提倡将应用程序的配置信息存储在单独的服务中,使配置易于管理和更新,同时也使得应用能够跨环境部署。 8. **Federated Identity**:外部鉴定模式允许用户使用外部身份提供者的凭据进行认证,简化了多服务或多应用之间的身份验证流程。 9. **GateKeeper Pattern**:守卫者模式用于保护服务免受恶意或过度的请求,通常通过认证、授权和速率限制来实现。 10. **Health Endpoint Monitoring**:服务状态监视模式通过暴露健康检查端点来监控服务的运行状况,以便及时发现并解决问题。 以上只是部分设计模式的概述,每个模式都有其适用场景和实施细节。在实际应用中,开发人员可以根据具体需求选择合适的设计模式,以提升云应用的性能、弹性和可维护性。这些模式不仅适用于Azure平台,也普遍适用于其他云环境。
2014-03-22 上传
Cloud applications have a unique set of characteristics. They run on commodity hardware, provide services to untrusted users, and deal with unpredictable workloads. These factors impose a range of problems that you, as a designer or developer, need to resolve. Your applications must be resilient so that they can recover from failures, secure to protect services from malicious attacks, and elastic in order to respond to an ever changing workload. This guide demonstrates design patterns that can help you to solve the problems you might encounter in many different areas of cloud application development. Each pattern discusses design considerations, and explains how you can implement it using the features of Windows Azure. The patterns are grouped into categories: availability, data management, design and implementation, messaging, performance and scalability, resilience, management and monitoring, and security. You will also see more general guidance related to these areas of concern. It explains key concepts such as data consistency and asynchronous messaging. In addition, there is useful guidance and explanation of the key considerations for designing features such as data partitioning, telemetry, and hosting in multiple datacenters. These patterns and guidance can help you to improve the quality of applications and services you create, and make the development process more efficient. Enjoy! Table of Contents Part 1. Preface Part 2. PATTERNS Chapter 1. Cache-Aside Pattern Chapter 2. Circuit Breaker Pattern Chapter 3. Compensating Transaction Pattern Chapter 4. Competing Consumers Pattern Chapter 5. Compute Resource Consolidation Pattern Chapter 6. Command and Query Responsibility Segregation (CQRS) Pattern Chapter 7. Event Sourcing Pattern Chapter 8. External Confguration Store Pattern Chapter 9. Federated Identity Pattern Chapter 10. Gatekeeper Pattern Chapter 11. Health Endpoint Monitoring Pattern Chapter 12. Index Table Pattern Chapter 13. Leader Election Pattern
2016-04-27 上传
The Definitive Guide to Cloud Architecture and Design. Best-selling service technology author Thomas Erl has brought together the de facto catalog of design patterns for modern cloud-based architecture and solution design. More than two years in development, this book’s 100+ patterns illustrate proven solutions to common cloud challenges and requirements. Its patterns are supported by rich, visual documentation, including 300+ diagrams. “This book continues the very high standard we have come to expect from ServiceTech Press. The book provides well-explained vendor-agnostic patterns to the challenges of providing or using cloud solutions from PaaS to SaaS. The book is not only a great patterns reference, but also worth reading from cover to cover as the patterns are thought-provoking, drawing out points that you should consider and ask of a potential vendor if you’re adopting a cloud solution.” –Phil Wilkins, Enterprise Integration Architect, Specsavers “Thomas Erl’s text provides a unique and comprehensive perspective on cloud design patterns that is clearly and concisely explained for the technical professional and layman alike. It is an informative, knowledgeable, and powerful insight that may guide cloud experts in achieving extraordinary results based on extraordinary expertise identified in this text. I will use this text as a resource in future cloud designs and architectural considerations.” –Dr. Nancy M. Landreville, CEO/CISO, NML Computer Consulting The authors address topics covering scalability, elasticity, reliability, resiliency, recovery, data management, storage, virtualization, monitoring, provisioning, administration, and much more. Readers will further find detailed coverage of cloud security, from networking and storage safeguards to identity systems, trust assurance, and auditing. This book’s unprecedented technical depth makes it a must-have resource for every cloud technology architect, solution designer, developer, administrator, and manager. Table of Contents CHAPTER 1: Introduction CHAPTER 2: Understanding Design Patterns CHAPTER 3: Sharing, Scaling and Elasticity Patterns CHAPTER 4: Reliability, Resiliency and Recovery Patterns CHAPTER 5: Data Management and Storage Device Patterns CHAPTER 6: Virtual Server and Hypervisor Connectivity and Management Patterns CHAPTER 7: Monitoring, Provisioning and Administration Patterns CHAPTER 8: Cloud Service and Storage Security Patterns CHAPTER 9: Network Security, Identity & Access Management and Trust Assurance Patterns CHAPTER 10: Common Compound Patterns APPENDIX A: Cloud Computing Mechanisms Glossary APPENDIX B: Alphabetical Design Patterns Reference