How to design a distributed system

33
How to design a distributed system By Jinglun Li

description

Introduce one framework of designing distributed system for small and medium company.

Transcript of How to design a distributed system

Page 1: How to design a distributed system

How to design a distributed system

By Jinglun Li

Page 2: How to design a distributed system

Agenda

• A framework of designing distributed system• Two critical challenges

Page 3: How to design a distributed system

RequirementsFunctionality Quality Constraint

Business Requirements A vertical search engine which gears the market. (e.g. a music search engine)

Release in three months…

10 machines…

Users Requirements 1. Show query suggestions when user types words.

2. Show records which user are most likely searching for.

1. Response quickly. 2. Search records are good.…

Development Requirements 1. Flexibility2. Maintainable3. Scalable…

Resource:One UEDOne Frontend DevelopersThree Backend Developers

Page 4: How to design a distributed system

From Mud to Structure

Page 5: How to design a distributed system

NEAT

Page 6: How to design a distributed system

Layer

Page 7: How to design a distributed system

Pipe and Filter

Page 8: How to design a distributed system
Page 9: How to design a distributed system

Logical View

Page 10: How to design a distributed system

Logical View (cont.)

Page 11: How to design a distributed system

4 + 1 Views

Page 12: How to design a distributed system

4 + 1 Views (cont.)

Page 13: How to design a distributed system

Development View

Page 14: How to design a distributed system

Development View (cont.)

• Src/– Php/– Search manager/– Search/– Index/– …

• Util/– Log/– String/– Persistence/

• …

Page 15: How to design a distributed system

Process View

Page 16: How to design a distributed system

Deployment View

Page 17: How to design a distributed system

Review

Page 18: How to design a distributed system

Challenges

Page 19: How to design a distributed system

Distribution Infrastructure

• Broker• Message• Publisher-Subscriber

Page 20: How to design a distributed system

Broker

Page 21: How to design a distributed system

Broker (Server Side)

Page 22: How to design a distributed system

Messaging

Page 23: How to design a distributed system

Publisher-Subscriber

Page 24: How to design a distributed system

Models Summary

Page 25: How to design a distributed system

Concurrency

• Half-Sync/Half-Async• Leader/Followers• Active Object• Monitor Objector

Page 26: How to design a distributed system

Half-Sync/Half-Async

Page 27: How to design a distributed system

Leader/Follower

Page 28: How to design a distributed system

Active Object

Page 29: How to design a distributed system

Monitor Object

Page 30: How to design a distributed system

Reference1. Pattern-Oriented Software Architecture-Volume 1 A System of Patterns

19962. Pattern-Oriented Software Architecture-Volume 3 Patterns for Resource

Management3. Pattern-Oriented Software Architecture-Volume 4 A Pattern Language for

Distributed Computing May 20074. Pattern-Oriented Software Architecture-Volume 5 On Patterns and Pattern

Languages 20075. SOA in Practice The art of Distributed System Design 20086. Domain-Driven Design Trackling Complexity in The Heart of Software 20107. The 4+1 View Model of Architecture8. Applying UML and Patterns An Introduction to Object-Oriented Analysis

and Design and Iterative Development 20069. 一线架构师 2009

Page 31: How to design a distributed system

Thanks!

Page 32: How to design a distributed system

Backup

Page 33: How to design a distributed system