Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Distributed Systems Introduction

Mark
November 13, 2014
110

Distributed Systems Introduction

Delivered at Campaign Monitor Dev Camp 2014. A very brief introduction to a very broad topic.

Mark

November 13, 2014
Tweet

Transcript

  1. SCIENCE! ▸ 10 years ▸ 16 billion kilometres ▸ 510

    million kilometres from Earth ▸ 65000 kilometres per our ... and the Rosetta spacecraft's Philae lander touched down on comet 67P/C-G this morning
  2. DISTRIBUTED SYSTEMS A distributed system is a software system in

    which components located on networked computers communicate and coordinate their actions by passing messages. The components interact with each other in order to achieve a common goal. -- Andrews (2000). Dolev (2000). Ghosh (2007)
  3. SYSTEMS ARE not APPLICATIONS We're taught to be application developers

    with an application mindset Remember your first programming lecture at school...
  4. IF YOU THINK LIKE AN application developer ▸ The system

    is atomic ▸ The system is finished ▸ Business logic is centralised ▸ The network doesn't matter
  5. OUR AIM 1. Logical separation, facilitating physical separation. 2. Separation

    allows fault tolerance and scale. Contention kills both. So how do we group and delineate our components? Services thinking!
  6. TENANTS OF A service ▸ Autonomous ▸ Explicit boundaries ▸

    Expose schema and contract ▸ Compatibility is determined by policy
  7. VERTICAL PARTITIONING rules ▸ Along lines of business volatiliy ▸

    Data lives in proper "islands of consistency" Follow the data
  8. MORE VERTICAL PARTITIONING rules ▸ If messages are big, boundaries

    are likely wrong ▸ If you see duplicate data between services, go back to the business ▸ Don't name a service until the end, names are misleading ▸ Don't work bottom up
  9. WHAT HAPPENS AT Amazon IF... 1. 15% discount for a

    certain class of books? 2. A customer changes their shipping address? 3. The government changes the rate of GST? (assume GST applies to below AUD$1000)
  10. WHAT HAPPENS AT a bank IF... You deposit a cheque

    and then view your bank balance?
  11. SOLUTIONS FOR scale ▸ Design for maintenance upfront ▸ Design

    for upgrades Versioning is hard, technology won't save you ▸ Reuse is based on a fallacy
  12. ROUND 'EM UP ▸ Don't think like an application developer

    anymore ▸ Think about business rule and data volality ▸ Data consistency rules ▸ Business modelling, not entity modelling
  13. TEMPORAL COUPLING ▸ caching ▸ split inter-service communications and handling

    (pub/sub versus request/response) ▸ manage consistency explicitly (acceptable "staleness") This is a business concern!
  14. SPATIAL COUPLING ▸ delegate to something else eg messaging ▸

    load balancing (at first logical, then physical)
  15. COUPLING RULES ▸ Don't mechanically reduce all coupling. Zero coupling

    is impossible. ▸ Be concerned when we're breaking a pattern All code should be roughly the same quality.
  16. FALLACIES OF NETWORKED COMPUTING ▸ The network is reliable ▸

    There's no latency ▸ Bandwidth is unlimited ▸ The network is secure
  17. FALLACIES CONTINUED ▸ The topology won't change ▸ Administrators will

    know what to do ▸ Transport is free ▸ Networks are homogeneous