manueverable architecture
TRANSCRIPT
![Page 1: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/1.jpg)
Maneuverable ArchitectureMichael T. Nygard - Cognitect
![Page 2: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/2.jpg)
Thesis
✤ Agile dev works at micro scale
✤ Won’t create macro scale agility
![Page 3: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/3.jpg)
Maneuverability
![Page 4: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/4.jpg)
John Boyd
✤ Fighter pilot
✤ Air combat instructor
✤ Military theorist
![Page 5: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/5.jpg)
Kinetic to potentialPotential to kinetic
![Page 6: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/6.jpg)
Energy-Maneuverability (EM)
Kinetic ⟷ Potential
Gain and Shed Momentum
Rapidly Change Maneuvers
![Page 7: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/7.jpg)
![Page 8: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/8.jpg)
![Page 9: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/9.jpg)
Control tempo
Take initiative
Send ambiguous signals
Maneuver Warfare
![Page 10: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/10.jpg)
Note how orientation shapes observation, shapes decision, shapes action, and in turn is shaped by the feedback and other 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 of 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
![Page 11: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/11.jpg)
Maneuverable Architecture
![Page 12: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/12.jpg)
Control tempo
Take initiative
Send ambiguous signals
![Page 13: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/13.jpg)
“From now on, I control the tempo.”
![Page 14: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/14.jpg)
Tempo is emergent.
![Page 15: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/15.jpg)
Gain
Shed
Redirect
![Page 16: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/16.jpg)
Typical IT architecture is a disaster for maneuverability.
![Page 17: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/17.jpg)
Techniques, not patterns… yet
![Page 18: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/18.jpg)
Disposability
✤ Infrastructure
✤ Code
✤ Dependencies
✤ Teams?
![Page 19: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/19.jpg)
Architecture for Disposability
✤ Focus on representations✤ Messages✤ Async
![Page 20: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/20.jpg)
Avoid sunk cost lock-in.
![Page 21: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/21.jpg)
Sufficiently Abstract UI
Counterexample:
100+ countries.
6 services per country.
UI knows which services to call
UI has forms specific to each one.
![Page 22: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/22.jpg)
Sufficiently Abstract UI 2
Better:Generic UI + Semantic HTML + Unobtrusive JavaScript
Best:Above, plus either SSR or CSR, with CMS & toolkit for adaptable components.
![Page 23: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/23.jpg)
Services & scripting
URL
μService μService
script✤ Dynamic
deployment of script
✤ Script addressable by URL
![Page 24: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/24.jpg)
Immutable values, monotonic succession
Ref Value at TN
![Page 25: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/25.jpg)
Ref Value at TN
Value at TN+1
Immutable values, monotonic succession
![Page 26: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/26.jpg)
Value Semantics Ref Semantics
Values do not changeChange is atomic
No observable intermediate states
Equality is identity Equality based on referent
![Page 27: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/27.jpg)
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
![Page 28: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/28.jpg)
Example: Shopping Cart as Value
Add: function from Cart, Item, Qty to Cart
Remove: function from Cart, Item to Cart
Cart is a number
![Page 29: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/29.jpg)
Example: Shopping Cart as Value
Cart0
User
Cart«ref»
Add
Cart0
User
Cart«ref»
Cart1
![Page 30: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/30.jpg)
Generalized minimalism
Feature: Send email to customer ahead of credit card expiration.
Complexity: Number of reminders and advance notice vary by tenant.
Required: Record email sent, bounced.
![Page 31: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/31.jpg)
Complected solution
Daily job wakes up, scans cards, creates warnings, sends email, checks bounces.
User ID Sent onWarning ID Bounced?
Token ExpirationCard ID User ID
User Email
![Page 32: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/32.jpg)
Minimal, generalized solution
At: at datetime, call this URL.
Template: accept body + params to format text
Before: generate series of datetimes
Mailer: send email to addr, track bounces
![Page 33: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/33.jpg)
Minimal, generalized solution
RegistrationAt
3. Several calls to "At".Provide URLs for script
Script Engine
2. create new script, get URL
Before
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
![Page 34: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/34.jpg)
Issue identifiers
✤ Every service issues identifiers
✤ No restrictions on use
Catalog
Create
Add
Query
catalog ID
![Page 35: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/35.jpg)
Policy Proxy
ClientQuery
catalog ID
client ID
Catalog
Policy Proxy
F: client →
catalog
![Page 36: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/36.jpg)
Faceted identities
User
Ledger
Cart
Dept.
Address Book
Wish List
Concierge
Company
![Page 37: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/37.jpg)
Faceted identities
✤ IDs all issued by services
✤ Relationships externalized
Catalog
Company
Item
SKU
Microsite
Prize Pool
![Page 38: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/38.jpg)
Explicit context
Implicit Explicit
Bare identifiers URLs
State names State machines
Assumed channel Reply-to queue
![Page 39: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/39.jpg)
Self-defense
✤ Required for use without permission
✤ Protect from overload
✤ Allow cut off of maluser
✤ Important for operational safety and authorization
ClientQuery
Catalog
Policy Proxy
F: client →
catalog
client ID
catalog ID
gatewaytrusted
untrusted
![Page 40: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/40.jpg)
Self-defense 2
✤ Also applies to outcalls
Payment
Processor
gateway
The
Collectortrusted
untrusted
![Page 41: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/41.jpg)
Half-duplex testing
Wrong
1. Set up mock
2. Set up call
3. Make call
4. Assertions about result
5. Verify mock was called
![Page 42: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/42.jpg)
Half-duplex testing
Right - call side
1. Set up mock
2. Set up call
3. Make call
4. Verify mock was called correctly.
![Page 43: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/43.jpg)
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.
![Page 44: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/44.jpg)
Other techniques I’m not 100% sure about
✤ Continuation URL
✤ Separate query from action
✤ Never deploy together
✤ Tell, don’t ask
![Page 45: Manueverable architecture](https://reader031.vdocument.in/reader031/viewer/2022030307/58eba1201a28ab52538b45b3/html5/thumbnails/45.jpg)
Tempo and Maneuverability