The Pitfalls Of Building Large Scale Applications

Preview:

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.

Citation preview

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

Pitfalls Of Building Large-Scale Apps By Jeffrey Sogolov

@gsogol

Network Is Reliable

Do things

REALLY FAIL?

Microsoft’s Datacenter

5.2 Devices

40.8 Links P

er Day

59,000 Packets Loss

HP’s Datacenter

Connectivity

11.4% Support Tickets

2hr 45min Down Time For Support Tickets

HIGHEST

Google

Chubby

61 Outages 700 IN days

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

See more

Latency Is Not A Problem

Bandwidth Is Infinite

OOH…

GIGA

1 Gigabit

50 MB 128 MB

Topology Won’t Change

Subnets Moving

Added Firewalls

Hardcoded IPs

Same Rack?

Administrator Knows

WHAT TO DO

Network IS Homogeneous

System Is Atomic

Big Ball Of Mud

The System Is Finished

Effort

Time

“Normal Project”

Product

“Finished”

Rewrite

Original date

Business Logic Should Be Centralized

Entities

Calculations/ Validations

Services

What Is Loose

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

Efferent coupling (Ce) – on who you depend

Outgoing coupling

Coupling ?

Ca

Ce

Ca VS Ce

Framework

DTOs

UI

>

>

1.

2.

3.

A Touch OF

Platform

Coupling

A Touch OF

Platform

Coupling

VS

A Touch OF

Spatial

Coupling

Product

Synchronous Call

Waiting Working

Return

Pricing

A Touch OF

Temporal

Coupling

Product

Synchronous Call

Waiting Working

Return

Pricing

What Is The Business Telling YOU?

So What Is Loose Coupling?

Efferent

Afferent

Platform Temporal

Spatial

What do you choose? Style Over Substance!

History Repeats Itself

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

So…Web Services Are Like…

But Wait…

One Problem…

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

Martin Fowler’s Definition of Architecture

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

Encapsulation

Composition OR Inheritance

Composition OVER Inheritance

Services Should:

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

Chain Of Services am I highly encapsulated & autonomous?

iTunes Example

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

is data encapsulated?

Pricing

Front Office

Marketing

Back Office

Reporting

4+1 Architectural Views

Let’s Run A Race…

Page != Same Service

Keep it DRY!

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

Conway’s Law

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

Teams’ Effect

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

Thank You.

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

Recommended