Maneuverable Web Architecture Michael T. Nygard - Cognitect - - PowerPoint PPT Presentation

maneuverable web architecture
SMART_READER_LITE
LIVE PREVIEW

Maneuverable Web Architecture Michael T. Nygard - Cognitect - - PowerPoint PPT Presentation

Maneuverable Web Architecture Michael T. Nygard - Cognitect Thursday, October 17, 13 Thesis Thursday, October 17, 13 Thesis Agile dev works at micro scale Thursday, October 17, 13 Thesis Agile dev works at micro scale Wont


slide-1
SLIDE 1

Maneuverable Web Architecture

Michael T. Nygard - Cognitect

Thursday, October 17, 13

slide-2
SLIDE 2

Thesis

Thursday, October 17, 13

slide-3
SLIDE 3

Thesis

✤ Agile dev works at micro scale

Thursday, October 17, 13

slide-4
SLIDE 4

Thesis

✤ Agile dev works at micro scale ✤ Won’t create macro scale agility

Thursday, October 17, 13

slide-5
SLIDE 5

Maneuverability

Thursday, October 17, 13

slide-6
SLIDE 6

John Boyd

✤ Fighter pilot ✤ Air combat

instructor

✤ Military theorist

Thursday, October 17, 13

slide-7
SLIDE 7

Thursday, October 17, 13

slide-8
SLIDE 8

Kinetic to potential

Thursday, October 17, 13

slide-9
SLIDE 9

Kinetic to potential Potential to kinetic

Thursday, October 17, 13

slide-10
SLIDE 10

Energy-Manueverability (EM)

Thursday, October 17, 13

slide-11
SLIDE 11

Energy-Manueverability (EM) Kinetic ⟷ Potential

Thursday, October 17, 13

slide-12
SLIDE 12

Energy-Manueverability (EM) Kinetic ⟷ Potential Gain and Shed Momentum

Thursday, October 17, 13

slide-13
SLIDE 13

Energy-Manueverability (EM) Kinetic ⟷ Potential Gain and Shed Momentum Rapidly Change Maneuvers

Thursday, October 17, 13

slide-14
SLIDE 14

Thursday, October 17, 13

slide-15
SLIDE 15

Thursday, October 17, 13

slide-16
SLIDE 16

Maneuver Warfare

Thursday, October 17, 13

slide-17
SLIDE 17

Control tempo of engagement Maneuver Warfare

Thursday, October 17, 13

slide-18
SLIDE 18

Control tempo of engagement Take initiative Maneuver Warfare

Thursday, October 17, 13

slide-19
SLIDE 19

Control tempo of engagement Take initiative Send ambiguous signals Maneuver Warfare

Thursday, October 17, 13

slide-20
SLIDE 20

Note how orientation shapes observation, shapes decision, shapes action, and in turn is shaped by the feedback and

  • ther phenomena coming into our sensing or observing window.

Also note how the entire loop (not just orientation) is an ongoing many-sided implicit cross-referencing process

  • f projection, empathy, correlation, and rejection.

From The Essence of Winning and Losing, John R. Boyd, January 1996.

Feed Forward

Observations Decision (Hypothesis)

Action (Test)

Cultural Traditions

Genetic Heritage

New Information Previous Experience

Analyses & Synthesis

Feed Forward Feed Forward

Implicit Guidance & Control Implicit Guidance & Control Unfolding Interaction With Environment Unfolding Interaction With Environment Feedback Feedback Outside Information Unfolding Circumstances

Observe Orient Decide Act

Defense and the National Interest, http://www.d-n-i.net, 2006

Thursday, October 17, 13

slide-21
SLIDE 21

Maneuverable Web Architecture

Thursday, October 17, 13

slide-22
SLIDE 22

Control tempo of engagement Take initiative Send ambiguous signals

Thursday, October 17, 13

slide-23
SLIDE 23

“From now on, I control the tempo.”

Thursday, October 17, 13

slide-24
SLIDE 24

Cross-cutting Themes

✤ Plurality ✤ Break monoliths ✤ Use URIs with abandon ✤ c.f. “Architecture Without an End State” ✤ Augment upstream ✤ Contextualize downstream

Thursday, October 17, 13

slide-25
SLIDE 25

Techniques, not patterns… yet

Thursday, October 17, 13

slide-26
SLIDE 26

Sufficiently Abstract UI

Counterexample: 100+ countries. 6 services per country. UI knows which services to call UI has forms specific to each one.

Thursday, October 17, 13

slide-27
SLIDE 27

Sufficiently Abstract UI 2

Better: Generic UI + Semantic HTML + Unobtrusive JavaScript Best: Above, plus either SSR or CSR, with CMS & toolkit for adaptable components.

Thursday, October 17, 13

slide-28
SLIDE 28

Services & scripting

URL μService μService script

✤ Dynamic

deployment of script

✤ Script addressable

by URL

Thursday, October 17, 13

slide-29
SLIDE 29

Immutable values, monotonic succession

Ref Value at TN

Thursday, October 17, 13

slide-30
SLIDE 30

Ref Value at TN Value at TN+1

Immutable values, monotonic succession

Thursday, October 17, 13

slide-31
SLIDE 31

Value Semantics Ref Semantics

Thursday, October 17, 13

slide-32
SLIDE 32

Value Semantics Ref Semantics Values do not change Change is atomic No observable intermediate states

Thursday, October 17, 13

slide-33
SLIDE 33

Value Semantics Ref Semantics Values do not change Change is atomic No observable intermediate states Equality is identity Equality based on referent

Thursday, October 17, 13

slide-34
SLIDE 34

Example: Perpetual string

✤ Perpetual string: store strings forever. ✤ URL is SHA-256 hash of string. ✤ Use for scripts, legal text. ✤ Edit the script, get a new URL

Thursday, October 17, 13

slide-35
SLIDE 35

Example: Shopping Cart as Value

Add: function from Cart, Item, Qty to Cart Remove: function from Cart, Item to Cart Cart is a number

Thursday, October 17, 13

slide-36
SLIDE 36

Example: Shopping Cart as Value

Cart0 User Cart «ref»

Thursday, October 17, 13

slide-37
SLIDE 37

Example: Shopping Cart as Value

Cart0 User Cart «ref»

Add

Thursday, October 17, 13

slide-38
SLIDE 38

Example: Shopping Cart as Value

Cart0 User Cart «ref»

Add

Cart0 User Cart «ref» Cart1

Thursday, October 17, 13

slide-39
SLIDE 39

Generalized minimalism

Feature: Send email to customer ahead

  • f credit card expiration.

Complexity: Number of reminders and advance notice vary by tenant. Required: Record email sent, bounced.

Thursday, October 17, 13

slide-40
SLIDE 40

Complected solution

Daily job wakes up, scans cards, creates warnings, sends email, checks bounces.

User ID Sent on Warning ID Bounced? Token Expiration Card ID User ID User Email

Thursday, October 17, 13

slide-41
SLIDE 41

Minimal, generalized solution

At: at datetime, call this URL. Template: accept body + params to format text Lead time: generate series of datetimes Mailer: send email to addr, track bounces

Thursday, October 17, 13

slide-42
SLIDE 42

Minimal, generalized solution

Registration At

  • 3. Several calls to "At".

Provide URLs for script Script Engine

  • 2. create new script,

get URL Lead time

  • 1. create reminder dates

Reminder script Much later: invoke reminder script creates Perpetual string

  • A. Get template

Template Mailer

  • B. Format message
  • C. Send message

Thursday, October 17, 13

slide-43
SLIDE 43

Issue identifiers

✤ Every service issues

identifiers

✤ No restrictions on

use

Catalog Create Add Query

catalog ID

Thursday, October 17, 13

slide-44
SLIDE 44

Policy Proxy

Client Query

catalog ID client ID

Catalog Policy Proxy

F: client → catalog

Thursday, October 17, 13

slide-45
SLIDE 45

Faceted identities

User Ledger Cart Dept.

Address Book Wish List

Concierge

Company

Thursday, October 17, 13

slide-46
SLIDE 46

Faceted identities

✤ IDs all issued by

services

✤ Relationships

externalized

Catalog

Company

Item SKU

Microsite Prize Pool

Thursday, October 17, 13

slide-47
SLIDE 47

Explicit context

Implicit Explicit Bare identifiers URLs State names State machines Assumed channel Reply-to queue

Thursday, October 17, 13

slide-48
SLIDE 48

Self-defense

✤ Required for use without

permission

✤ Protect from overload ✤ Allow cut off of maluser ✤ Important for operational

safety and authorization

Client Query Catalog Policy Proxy

F: client → catalog

client ID catalog ID

gateway

trusted untrusted Thursday, October 17, 13

slide-49
SLIDE 49

Self-defense 2

✤ Also applies to outcalls

Payment Processor gateway The Collector

trusted untrusted

Thursday, October 17, 13

slide-50
SLIDE 50

Half-duplex testing

Wrong

  • 1. Set up mock
  • 2. Set up call
  • 3. Make call
  • 4. Assertions about result
  • 5. Verify mock was called

Thursday, October 17, 13

slide-51
SLIDE 51

Half-duplex testing

Wrong

  • 1. Set up mock
  • 2. Set up call
  • 3. Make call
  • 4. Assertions about result
  • 5. Verify mock was called

Right - call side

  • 1. Set up mock
  • 2. Set up call
  • 3. Make call
  • 4. Verify mock was called

correctly.

Thursday, October 17, 13

slide-52
SLIDE 52

Half-duplex testing

Right - call side

  • 1. Set up mock
  • 2. Set up call
  • 3. Make call
  • 4. Verify mock was called

correctly. Right - response side

  • 1. Skip mock & call
  • 2. Inject fake results
  • 3. Verify results handled correctly.

Thursday, October 17, 13

slide-53
SLIDE 53

Other techniques I’m not 100% sure about

✤ Separate query from action ✤ Never deploy together ✤ Tell, don’t ask ✤ Unbundle parameters

Thursday, October 17, 13

slide-54
SLIDE 54

Maneuverability and tempo

Thursday, October 17, 13

slide-55
SLIDE 55

Thanks!

Michael T. Nygard Cognitect mtnygard@cognitect.com @mtnygard

Thursday, October 17, 13