Top Banner
Network Based Architecture Haussmann, Fielding, Fowler HTTP, REST, Microservices Eric Horesnyi Tech2Day 2015 @StreamdataIO #Tech2Day
55

Haussmann Fielding Fowler: network-based architects

Jul 28, 2015

Download

Internet

streamdata.io
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Haussmann Fielding Fowler: network-based architects

Network Based Architecture Haussmann, Fielding, Fowler

HTTP, REST, Microservices

Eric Horesnyi

Tech2Day 2015

@StreamdataIO #Tech2Day

Page 2: Haussmann Fielding Fowler: network-based architects

Realtime UX from any API

@StreamdataIO #Tech2Day  

Page 3: Haussmann Fielding Fowler: network-based architects

Haussmann & Fielding

1853, Paris 2000, Irvine

@StreamdataIO #Tech2Day  

Page 4: Haussmann Fielding Fowler: network-based architects

CHALLENGES IN PARIS IN 1853 Haussmann Fielding and Fowler

@StreamdataIO #Tech2Day  

Page 5: Haussmann Fielding Fowler: network-based architects

Dropout

@StreamdataIO

Cholera, 1832 – 19,000 dropout

#Tech2Day  

Page 6: Haussmann Fielding Fowler: network-based architects

Congestion

@StreamdataIO

1hab/sq mt density

#Tech2Day  

Page 7: Haussmann Fielding Fowler: network-based architects

Slow & Unsecure

@StreamdataIO

Security threats: No inspection possible

obscure streets

No patches to remove viruses and threats

lack of air circulation

Poor latency: slow access lines

narrow streets

No backbone Street  in  Ile  de  La  Cité,  Early  XiXth  

#Tech2Day  

Page 8: Haussmann Fielding Fowler: network-based architects

Unstable system

Full reboot 1789, 1815, 1830, 1848…

No backward compatibility

No service desk Restricted vote

DDOS in small access lines

Barricades

@StreamdataIO

Liberty  Leading  the  People,  July  28th,  1830'  by  Delacroix  

#Tech2Day  

Page 9: Haussmann Fielding Fowler: network-based architects

INHERITED FEATURES Haussmann Fielding Fowler

@StreamdataIO #Tech2Day  

Page 10: Haussmann Fielding Fowler: network-based architects

Inherited Properties

@StreamdataIO #Tech2Day  

Page 11: Haussmann Fielding Fowler: network-based architects

DNS

.gov, .com and .fr follow same scheme

Seine is .root

Streets start there

Right/even

Left/Uneven

@StreamdataIO

Paris street numbering, 1805

#Tech2Day  

Page 12: Haussmann Fielding Fowler: network-based architects

Famous heritage

@StreamdataIO

Napoleon, France 1804 Tim Berners-Lee, CERN 1990

Comment: // limited to ability to establish basic rules. I do not admire Napoleon for anything else.

#Tech2Day  

Page 13: Haussmann Fielding Fowler: network-based architects

Separation of concerns

@StreamdataIO

Client Server

#Tech2Day  

Page 14: Haussmann Fielding Fowler: network-based architects

Stateless

@StreamdataIO

All clients

are treated equal, no special

treatment, no

segregation

A server cannot treat a client, even if he is root, as part of itself: Affaires

Palais de Justice, Ile de la Cité

#Tech2Day  

Page 15: Haussmann Fielding Fowler: network-based architects

Stateless

@StreamdataIO

Client access server via a network call

#Tech2Day  

Page 16: Haussmann Fielding Fowler: network-based architects

SELECTION OF PROPERTIES FIELDING // HAUSSMANN REST // PARIS

Haussmann Fielding Fowler

@StreamdataIO #Tech2Day  

Page 17: Haussmann Fielding Fowler: network-based architects

Mission

@StreamdataIO

Network performance throughput, small

overhead, bandwidth

User-perceived performance latency,

and completion

Network-efficiency avoid using the street too

much. Homeworking (differential data)

Napoleon  III  describing  his  mission  to  Haussmann,  1853    

#Tech2Day  

Page 18: Haussmann Fielding Fowler: network-based architects

KPIs Haussmann // Fielding Scalable make it possible for Paris to grow

Simple no need for a city-user manual,

Modifiable ability to evolve in the future through change

Extensible add new neighborhood

Customizable specialize a building without impacting others

Configurable easily modify a building post-deployment

Reusable building can host a bakery then a cremerie

Visible to provide best security and auditability

Portable style should work well in other regions

Reliable susceptible to failure (no single event could stop water, gas or circulation for citizens)

@StreamdataIO #Tech2Day  

Page 19: Haussmann Fielding Fowler: network-based architects

P1: Low-Entry Barrier

@StreamdataIO

A  popular  neighborhood  in  Paris  

#Tech2Day  

Page 20: Haussmann Fielding Fowler: network-based architects

P2: Extensibility

@StreamdataIO

Streaming  =  Paris  Metro/Subway,  1900    

#Tech2Day  

Page 21: Haussmann Fielding Fowler: network-based architects

P3: Distributed Hypermedia

@StreamdataIO #Tech2Day  

Page 22: Haussmann Fielding Fowler: network-based architects

P4: Anarchic Scalability

@StreamdataIO

Paris  Metropole  today,  10m+  people  

#Tech2Day  

Page 23: Haussmann Fielding Fowler: network-based architects

P6: Independant Deployment

@StreamdataIO

Ile  de  La  Cité  restructured,  embedding  legacy/sacred  Notre  Dame  

#Tech2Day  

Page 24: Haussmann Fielding Fowler: network-based architects

WHY HAUSSMANN DECIDED TO MAKE PARIS RESTFUL

Haussmann Fielding Fowler

@StreamdataIO #Tech2Day  

Page 25: Haussmann Fielding Fowler: network-based architects

REST=LCODC$SS&UI

@StreamdataIO #Tech2Day  

CSS=Client-Server-Stateless

Page 26: Haussmann Fielding Fowler: network-based architects

Layer 1: sewage & gas

@StreamdataIO #Tech2Day  

Page 27: Haussmann Fielding Fowler: network-based architects

Layer 2: street & boulevards

@StreamdataIO #Tech2Day  

Page 28: Haussmann Fielding Fowler: network-based architects

Layer 3: roofs

@StreamdataIO #Tech2Day  

Page 29: Haussmann Fielding Fowler: network-based architects

Layered Networks

Within a layer, a component connects to

its neighboor

Between two layers, gateways allow for

interaction

Each layer is autonomous

@StreamdataIO #Tech2Day  

Page 30: Haussmann Fielding Fowler: network-based architects

Cache

@StreamdataIO

Le  Bon  Marché,  LeS  Bank  Grand  Magasin/Mall,  server  w/cache    

#Tech2Day  

Page 31: Haussmann Fielding Fowler: network-based architects

Cache

@StreamdataIO

Opera,  a  server  with  cache    

#Tech2Day  

Page 32: Haussmann Fielding Fowler: network-based architects

Code On Demand

@StreamdataIO

Les  Halles,  seXng  the  tone  for  all  restaurants  in  the  City  

#Tech2Day  

Page 33: Haussmann Fielding Fowler: network-based architects

Uniform Interface = Genious

@StreamdataIO

Codified  UI,  by  floor  (header),  with  token/key,  proxy,  cache  

#Tech2Day  

Page 34: Haussmann Fielding Fowler: network-based architects

Uniformity = beauty inside

@StreamdataIO

Uniformity  in  APIs  brings  harmony  in  UX  

#Tech2Day  

Page 35: Haussmann Fielding Fowler: network-based architects

Uniformity = pattern beauty

@StreamdataIO

Uniformity  brings  fractal  harmony:  s`ll  there  from  a  distance  

#Tech2Day  

Page 36: Haussmann Fielding Fowler: network-based architects

HAUSSMANN URBANIST // FOWLER CONTINUOUS DELIVERY & MICROSERVICES

Haussmann Fielding Fowler

@StreamdataIO #Tech2Day  

Page 37: Haussmann Fielding Fowler: network-based architects

Continuous Delivery

@StreamdataIO

Resilient  Water  Induc`on,  requiring  aqueducts  and  reservoirs  

#Tech2Day  

Page 38: Haussmann Fielding Fowler: network-based architects

Microservices

Not too big/high

Autonomous components

Own API

Standard protocol

Scalable @StreamdataIO

Rue  Montorgueil,  Paris  2e  

#Tech2Day  

Page 39: Haussmann Fielding Fowler: network-based architects

Continuous Delivery

@StreamdataIO

Aqueduct,  Arcueil   Reservoir,  Arcueil  

#Tech2Day  

Page 40: Haussmann Fielding Fowler: network-based architects

Zoning

@StreamdataIO

Quar`er  Panthéon,  a  zone  dedicated  to  Our  Big  Men  

#Tech2Day  

Page 41: Haussmann Fielding Fowler: network-based architects

Lead by example

@StreamdataIO

Opera,  an  Hypermedia  API  >  great  UX  >  trac`on  for  API  owners  

#Tech2Day  

Page 42: Haussmann Fielding Fowler: network-based architects

Cut Corners

@StreamdataIO

Cut  corners  vs  straight  corners:  a  design  choice    

#Tech2Day  

And  x2  exemplar:  conduct  the  most  difficult  transforma`ons  

Page 43: Haussmann Fielding Fowler: network-based architects

Polyglot

@StreamdataIO

XVIII  architecture  encapsulated,  if  API  complies  

#Tech2Day  

Page 44: Haussmann Fielding Fowler: network-based architects

SUSTAINABLE SYSTEMS? PARIS 160 YEARS LATER HTTP REST 16 YEARS LATER

Haussmann Fielding Fowler

@StreamdataIO #Tech2Day  

Page 45: Haussmann Fielding Fowler: network-based architects

UX performance: City of Lights

@StreamdataIO #Tech2Day  

20m  unique  visitors  a  year  

Page 46: Haussmann Fielding Fowler: network-based architects

Reproductible

@StreamdataIO

Chicago  aSer  the  Burnham  Plan,  designed  in  1909  

#Tech2Day  

Page 47: Haussmann Fielding Fowler: network-based architects

@StreamdataIO

Durable

Courneuve,  1986,  20y  lifespan  Monolith  

#Tech2Day  

Page 48: Haussmann Fielding Fowler: network-based architects

Evolvable

@StreamdataIO

Tour  Eiffel  under  construc`on,  evolu`on  built  years  aSer  Haussmann  had  leS  office  

#Tech2Day  

Page 49: Haussmann Fielding Fowler: network-based architects

DAYTODAY LIFE IN A RESTFUL CITY

Haussmann Fielding Fowler

@StreamdataIO

Page 50: Haussmann Fielding Fowler: network-based architects

Incomplete Protocol: Velib

Leverage reusable assets

Share same layer as existing traffic

But incomplete protocol: collisions, missing RFC

for cars

Rate-limited API, realtime difficult

@StreamdataIO #Tech2Day  

Page 51: Haussmann Fielding Fowler: network-based architects

Error Handling in your code

@StreamdataIO

Gare  Montparnasse,  1895  –HTTP  or    REST  does  not  prevent  from  good  error  handling,  contrib  @rit    

Page 52: Haussmann Fielding Fowler: network-based architects

HTTP//PARIS DICTIONARY, MAPS & RESSOURCES

Haussmann Fielding Fowler

@StreamdataIO #Tech2Day  

Page 53: Haussmann Fielding Fowler: network-based architects

Lost in Translation

Code Civil HTTP

Paris Web

Boulevards Internet Backbone

Streets Access Lines

Street Numbers URI

Light in the streets Authentication

Concierge Proxy

Cellar Cache

Carriage Request/Response

Subway/Metro Streaming

Homeworking Differential update over JSON Patch

Pierre de Carrière JSON

Compagnon du Devoir API Developer

Haussmann Architect

Beaux Arts Apple, Android and JS Developers

Façade API

Haussmann Façade RESTful API

Utilities (gas, water) Cloud/PaaS

Annonces Parisiennes Criteo

Grands Magasins Amazon

Opera Deezer

Theaters Netflix

Prefecture NSA

Bibliotheque Nat. Wiki

Senat W3C

Assemblee Nationale IETF

Louvre Pinterest

Bois de Boulogne MineCraft

Bois de Vincennes Facebook

Bon Marché Ebay

Eiffel Tower Twitter

Latin Quarter Udacity, Coursera MOOCs

Left bank spirit Android

Right bank spirit Apple iPhone

@StreamdataIO #Tech2Day  

Page 54: Haussmann Fielding Fowler: network-based architects

To go deeper

Paris Architecture & Urbanism: Musée Carnavalet, Cité Chaillot

Haussmann: Haussmann à Paris : Architecture et urbanisme Seconde moitié du XIXe siècle, Book, 2012

HTTP: Tim Berners-Lee & Team, Cern, 1990

REST: Network-Based Architecture Style, Thesis, Fielding 2000

Continuous Delivery : Farley & Humbl, 2010

Microservices : Microservices in a Nutshell, Fowler & Lewis, Thoughtworks, 2014

Web Corp Organization: How Google Works, Eric Schmidt, 2014

Design & UX : Jonathan Ive, Apple by The New Yorker, 2015

Microservices Building Microservices, Sam Newman, O’Reilly Book, 2015

Code Civil : on github by Steeve

@StreamdataIO #Tech2Day  

Page 55: Haussmann Fielding Fowler: network-based architects

To go deeper

UX/API articulation at Netflix : Dan Jacobson blog

API best practices:

Kin Lane APIEvangelist,

Jason Harmon,

ProgrammableWeb,

Mike Amundsen,

Steve Klabnik,

Mark O’Neill,

Runscope inc. Neill & Darrel ,

Guillaume Laforge, and many more

@StreamdataIO #Tech2Day