the pitfalls of building large scale applications

76
© 2013 SpringOne 2GX. All rights reserved. Do not distribute without permission. Pitfalls Of Building Large-Scale Apps By Jeffrey Sogolov @gsogol

Upload: spring-io

Post on 03-Nov-2014

313 views

Category:

Technology


5 download

DESCRIPTION

Speaker: Jeffrey Sogolov Relying on network reliability and topology are just a few mistakes most engineers make. Common fallacies of distributed computing are one of the most important factors that engineers need to keep in mind when building enterprise software. We will cover each fallacy while showing mistakes most engineers make. We will then cover what coupling truly means and how to tell whether your current project is heading the wrong way. Finally, we will apply aspects of object orientation that held up to this day and learn how to apply them to the new age architectures. Don't learn from your mistakes, learn from others and come away with techniques that you can apply to your current project right away. This is the session that I wish I attended when I was a young lad.

TRANSCRIPT

Page 1: The Pitfalls Of Building Large Scale Applications

© 2013 SpringOne 2GX. All rights reserved. Do not distribute without permission.

Pitfalls Of Building Large-Scale Apps By Jeffrey Sogolov

@gsogol

Page 2: The Pitfalls Of Building Large Scale Applications

Network Is Reliable

Page 3: The Pitfalls Of Building Large Scale Applications

Do things

REALLY FAIL?

Page 4: The Pitfalls Of Building Large Scale Applications

Microsoft’s Datacenter

5.2 Devices

40.8 Links P

er Day

59,000 Packets Loss

Page 5: The Pitfalls Of Building Large Scale Applications

HP’s Datacenter

Connectivity

11.4% Support Tickets

2hr 45min Down Time For Support Tickets

HIGHEST

Page 6: The Pitfalls Of Building Large Scale Applications

Google

Chubby

61 Outages 700 IN days

Page 7: The Pitfalls Of Building Large Scale Applications

aphyr.com/posts/288-the-network-is-reliable

See more

Page 8: The Pitfalls Of Building Large Scale Applications
Page 9: The Pitfalls Of Building Large Scale Applications
Page 10: The Pitfalls Of Building Large Scale Applications
Page 11: The Pitfalls Of Building Large Scale Applications
Page 12: The Pitfalls Of Building Large Scale Applications

Latency Is Not A Problem

Page 13: The Pitfalls Of Building Large Scale Applications
Page 14: The Pitfalls Of Building Large Scale Applications
Page 15: The Pitfalls Of Building Large Scale Applications

Bandwidth Is Infinite

Page 16: The Pitfalls Of Building Large Scale Applications

OOH…

GIGA

Page 17: The Pitfalls Of Building Large Scale Applications

1 Gigabit

50 MB 128 MB

Page 18: The Pitfalls Of Building Large Scale Applications
Page 19: The Pitfalls Of Building Large Scale Applications
Page 20: The Pitfalls Of Building Large Scale Applications
Page 21: The Pitfalls Of Building Large Scale Applications
Page 22: The Pitfalls Of Building Large Scale Applications

Topology Won’t Change

Page 23: The Pitfalls Of Building Large Scale Applications

Subnets Moving

Added Firewalls

Hardcoded IPs

Same Rack?

Page 24: The Pitfalls Of Building Large Scale Applications
Page 25: The Pitfalls Of Building Large Scale Applications

Administrator Knows

WHAT TO DO

Page 26: The Pitfalls Of Building Large Scale Applications
Page 27: The Pitfalls Of Building Large Scale Applications
Page 28: The Pitfalls Of Building Large Scale Applications
Page 29: The Pitfalls Of Building Large Scale Applications
Page 30: The Pitfalls Of Building Large Scale Applications
Page 31: The Pitfalls Of Building Large Scale Applications

Network IS Homogeneous

Page 32: The Pitfalls Of Building Large Scale Applications
Page 33: The Pitfalls Of Building Large Scale Applications
Page 34: The Pitfalls Of Building Large Scale Applications

System Is Atomic

Page 35: The Pitfalls Of Building Large Scale Applications

Big Ball Of Mud

Page 36: The Pitfalls Of Building Large Scale Applications
Page 37: The Pitfalls Of Building Large Scale Applications
Page 38: The Pitfalls Of Building Large Scale Applications
Page 39: The Pitfalls Of Building Large Scale Applications
Page 40: The Pitfalls Of Building Large Scale Applications

The System Is Finished

Effort

Time

“Normal Project”

Product

“Finished”

Rewrite

Original date

Page 41: The Pitfalls Of Building Large Scale Applications
Page 42: The Pitfalls Of Building Large Scale Applications

Business Logic Should Be Centralized

Page 43: The Pitfalls Of Building Large Scale Applications

Entities

Calculations/ Validations

Services

Page 44: The Pitfalls Of Building Large Scale Applications
Page 45: The Pitfalls Of Building Large Scale Applications

What Is Loose

Afferent coupling (Ca) – who depends on you Incoming coupling

Efferent coupling (Ce) – on who you depend

Outgoing coupling

Coupling ?

Page 46: The Pitfalls Of Building Large Scale Applications

Ca

Ce

Ca VS Ce

Framework

DTOs

UI

>

>

1.

2.

3.

Page 47: The Pitfalls Of Building Large Scale Applications

A Touch OF

Platform

Coupling

Page 48: The Pitfalls Of Building Large Scale Applications

A Touch OF

Platform

Coupling

VS

Page 49: The Pitfalls Of Building Large Scale Applications

A Touch OF

Spatial

Coupling

Product

Synchronous Call

Waiting Working

Return

Pricing

Page 50: The Pitfalls Of Building Large Scale Applications

A Touch OF

Temporal

Coupling

Product

Synchronous Call

Waiting Working

Return

Pricing

Page 51: The Pitfalls Of Building Large Scale Applications
Page 52: The Pitfalls Of Building Large Scale Applications

What Is The Business Telling YOU?

Page 53: The Pitfalls Of Building Large Scale Applications

So What Is Loose Coupling?

Efferent

Afferent

Platform Temporal

Spatial

Page 54: The Pitfalls Of Building Large Scale Applications

What do you choose? Style Over Substance!

Page 55: The Pitfalls Of Building Large Scale Applications
Page 56: The Pitfalls Of Building Large Scale Applications

History Repeats Itself

Same monolithic procedural code… …just with HTTP to make it really fly!

Page 57: The Pitfalls Of Building Large Scale Applications

So…Web Services Are Like…

Page 58: The Pitfalls Of Building Large Scale Applications

But Wait…

Page 59: The Pitfalls Of Building Large Scale Applications

One Problem…

Asking 100 engineers… how to solve a problem? …how many answers will I get?

Page 60: The Pitfalls Of Building Large Scale Applications

Martin Fowler’s Definition of Architecture

“Design decisions you wished you've gotten right at the beginning of the project”

Page 61: The Pitfalls Of Building Large Scale Applications

Encapsulation

Page 62: The Pitfalls Of Building Large Scale Applications

Composition OR Inheritance

Page 63: The Pitfalls Of Building Large Scale Applications

Composition OVER Inheritance

Page 64: The Pitfalls Of Building Large Scale Applications

Services Should:

•  Be autonomous & self-governing •  Contain explicit boundaries •  Well…be encapsulated

Page 65: The Pitfalls Of Building Large Scale Applications

Chain Of Services am I highly encapsulated & autonomous?

Page 66: The Pitfalls Of Building Large Scale Applications

iTunes Example

Page 67: The Pitfalls Of Building Large Scale Applications

What Does Responsibility Mean? •  Encapsulation •  Alignment •  With web services,

is data encapsulated?

Page 68: The Pitfalls Of Building Large Scale Applications

Pricing

Front Office

Marketing

Back Office

Reporting

Page 69: The Pitfalls Of Building Large Scale Applications

4+1 Architectural Views

Page 70: The Pitfalls Of Building Large Scale Applications

Let’s Run A Race…

Page 71: The Pitfalls Of Building Large Scale Applications

Page != Same Service

Keep it DRY!

Page 72: The Pitfalls Of Building Large Scale Applications

Couple Of Rules Then

•  Service != system (does not mean separate process) •  It’s about logical responsibility, Not physical •  Usually…software system = project the team is working on •  Pricing, reviews, inventory cut across systems

Page 73: The Pitfalls Of Building Large Scale Applications

Conway’s Law

“ Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organization”

Page 74: The Pitfalls Of Building Large Scale Applications

Teams’ Effect

Page 75: The Pitfalls Of Building Large Scale Applications

Architecture is as much of a people component as a software component

Page 76: The Pitfalls Of Building Large Scale Applications

Thank You.

Twitter: @gsogol LinkedIn: linkedin.com/in/jeffreysogolov/