Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
MicroServices, IoT, and Agile…Seriously!Fred GeorgeFred George [email protected]
@fgeorge52
Fred George
Copyright © 2016 by Fred George. All rights reserved. 3
• Technologist
• Computer networks – 70’s
• Token Ring LAN – 80’s
• GUI’s – late 80’s
• OO – late 80’s
• Agile – late 90’s
• MicroServices – mid-2000’s
• Programmer• Since 1968 (Basic)
• 65,000 hours experience
• 70+ languages
• Computer Science Degree 1973
• Manager• 17 years IBM
• Business degree, MIT Sloan School 1986
• Product Owner, IBM
• VP, ThoughtWorks
• Co-founder, Outpace (Silicon Valley)
• Senior Advisor to 3 tech companies
Requirements Uncertainty
Copyright © 2017 by Fred George. All rights reserved. 6
CertaintyUncertainty
Y2k Agile
Fuzzy vs. Traditional Problems
Copyright © 2017 by Fred George. All rights reserved. 7
Simple
Complicated
ChaoticCause a Effect
Cause aaa Effect
Effect? Cause?
Cause ? Effect
Disorder
Complex
Cynefin (kun-ev-in)
Dave Snowden – HBR & YouTube
Chaotic
Copyright © 2017 by Fred George. All rights reserved. 8
Simple
ComplicatedComplex
Cynefin (kun-ev-in)
Dave Snowden – HBR & YouTube
Fuzzy vs. Traditional Problems
Requirements Uncertainty
Copyright © 2017 by Fred George. All rights reserved. 9
CertaintyUncertainty
,but viable
Age of Agents• Assistive technologies abound
• Google Home, Siri, Alexa, Cortana, …
• Real innovation not voice, but interaction of backing services
Copyright © 2017 by Fred George. All rights reserved. 10
Home IoT Demonstration
Copyright © 2017 by Fred George. All rights reserved. 11
Copyright © 2017 by Fred George. All rights reserved. 12
•What’s the business case?
•Why bother?
• High volume potential
• Bellwether for ease of use
• Fun!
Is Home IoT Interesting?
Copyright © 2017 by Fred George. All rights reserved. 13
Home IoT Hub Contenders
Copyright © 2017 by Fred George. All rights reserved. 14
Amazon Echo
Copyright © 2017 by Fred George. All rights reserved. 15
Google Home
Copyright © 2017 by Fred George. All rights reserved. 16
Xbox One
Copyright © 2017 by Fred George. All rights reserved. 17
Apple TV
Copyright © 2017 by Fred George. All rights reserved. 18
Phillips Hue Bridge
Copyright © 2017 by Fred George. All rights reserved. 19
Samsung Refrigerator
Copyright © 2017 by Fred George. All rights reserved. 20
Home IoT Morass
Copyright © 2017 by Fred George. All rights reserved. 21
MicroServices to the Rescue!
•Uncertainty, so Let’s Play!
•Isolate volatility; optimize replaceablity
•Changing devices
•Evolving protocols
•Layer functionality on functionality
Copyright © 2017 by Fred George. All rights reserved. 22
• Less common than Synchronous
• Consistent with Reactive and Agent-based
• Very, very…
• Small
• Loosely coupled
• Rapidly deployable
• RESTful with registration not required
• Compatible with experimentation
Asynchronous MicroServices
Copyright © 2017 by Fred George. All rights reserved. 23
Rapids, Rivers, and Ponds
Copyright © 2017 by Fred George. All rights reserved. 24
Need Pattern for Asynchronous
Copyright © 2017 by Fred George. All rights reserved. 25
Bus
ServiceService
Service
Need
Need
Need
Sol’n’sSol’n
•Variants easy
•Graceful degradation
Choose Sol’n
Incremental Applications
Copyright © 2017 by Fred George. All rights reserved. 26
Event Bus
Rental offers
Car rent
Legacy server
Brand offers
Location offers
Segmentation
Membership
CarRent.com Login
Sally
A B
• RabbitMQ for event bus (in pub-sub)
• Simpler than Kafka
• Good enough
• JSON
• XML < JSON < compact_binary
• Docker containers; Swarm hosts
• ToDo: Commodity Linux boxes
Technology Choices
Copyright © 2017 by Fred George. All rights reserved. 27
Architectural Principles
• Uncertainty => Just-in-Time Design
• Behavior-Oriented Services
• Services as small as possible with kick
• Publish conclusions
• If you do something interesting, publish!
• Reliability through:
• Idempotency – do it again!
• Redundancy – buses, messages, services, hosts
Copyright © 2017 by Fred George. All rights reserved. 28
Framework from MicroServices Workshop
Copyright © 2017 by Fred George. All rights reserved. 29
Framework from MicroServices Workshop
Copyright © 2017 by Fred George. All rights reserved. 30
Framework from MicroServices Workshop
Copyright © 2017 by Fred George. All rights reserved. 31
Framework from MicroServices Workshop
Copyright © 2017 by Fred George. All rights reserved. 32
Framework from MicroServices Workshop
Copyright © 2017 by Fred George. All rights reserved. 33
Framework from MicroServices Workshop
Copyright © 2017 by Fred George. All rights reserved. 34
Framework from MicroServices Workshop
Copyright © 2017 by Fred George. All rights reserved. 35
Architecture: Hardware
Copyright © 2017 by Fred George. All rights reserved. 36
IoT Hardware
Device API
Scene API
Add Event Bus
Copyright © 2017 by Fred George. All rights reserved. 37
Event Bus
IoT Hardware
Tier 1: Hardware Access
Copyright © 2017 by Fred George. All rights reserved. 38
Event Bus
IoT Hardware
Tie
r 1
Tier 2: Scenes
Copyright © 2017 by Fred George. All rights reserved. 39
Event Bus
IoT Hardware
Tie
r 1
Tie
r 2
Tier 3: Reactive Services
Copyright © 2017 by Fred George. All rights reserved. 40
Event Bus
IoT Hardware
Tie
r 1
Tie
r 2
Tie
r 3
e.g., ToD + Motion => Set Scene
MetaServices: Monitor
Copyright © 2017 by Fred George. All rights reserved. 41
Event Bus
IoT Hardware
Tie
r 1
Tie
r 2
Tie
r 3
Mo
nit
or
MetaServices: Detection
Copyright © 2017 by Fred George. All rights reserved. 42
Event Bus
IoT Hardware
Tie
r 1
Tie
r 2
Tie
r 3
Mo
nit
or
Erro
rD
etct
ion
MetaServices: Correction
Copyright © 2017 by Fred George. All rights reserved. 43
Event Bus
IoT Hardware
Tie
r 1
Tie
r 2
Tie
r 3
Mo
nit
or
Erro
rC
orr
ect
ion
Erro
rD
ete
ctio
n
Maintaining State
Copyright © 2017 by Fred George. All rights reserved. 44
Insistent Service
Choreography Sticky Colors
Copyright © 2017 by Fred George. All rights reserved. 45
BusHue HW
Choreography Sticky Colors
Copyright © 2017 by Fred George. All rights reserved. 46
BusHue HW hue_state
Choreography Sticky Colors
Copyright © 2017 by Fred George. All rights reserved. 47
BusHue HW hue_state
*
…
Choreography Sticky Colors
Copyright © 2017 by Fred George. All rights reserved. 48
BusHue HW hue_state
*
…
hue_be_state
Choreography Sticky Colors
Copyright © 2017 by Fred George. All rights reserved. 49
Switch Bus Light sceneHue HW hue_state hue_be_state
…
*
……
Choreography Sticky Colors
Copyright © 2017 by Fred George. All rights reserved. 50
Switch Bus Light scene DashboardHue HW hue_state hue_be_state
*
……
……
…
Observations
•Lots of messages
•No RESTful interfaces between services
•No constraints on multiple instances/versions
•Unit tests not required
•Fast-failing system rather than acceptance tests
Copyright © 2017 by Fred George. All rights reserved. 51
•Feedback
•Communication
•Simplicity
•Courage
•Respect
XP Values at Work
Copyright © 2017 by Fred George. All rights reserved. 52
Agile Practices and Roles
• Stand ups
• Story narratives
• Retrospectives
• Estimates
• Iterations
• Mandatory
pairing
Copyright © 2017 by Fred George. All rights reserved. 53
• Unit tests
• Acceptance tests
• Refactoring
• Patterns
• Continuous integration
• BA
• Developer
• Architect
• SCRUM master
• QA
• Manager
• Customer
• Stand ups
• Story narratives
• Retrospectives
• Estimates
• Iterations
• Mandatory
pairing
Agile Practices and Roles
Copyright © 2017 by Fred George. All rights reserved. 54
• Unit tests
• Acceptance tests
• Refactoring
• Patterns
• Continuous integration
• BA
• Developer
• Architect
• SCRUM master
• QA
• Manager
• Customer
,but viable
Requirements Uncertainty
Copyright © 2017 by Fred George. All rights reserved. 55
CertaintyUncertainty • Idea-focused features• Full-stack developers• Fast failure systems• MicroServices• Event-based architecture• Continuous deployment
• Stories• Specialists• TDD• Acceptance tests• Migration scripts
Future: More Devices
Copyright © 2017 by Fred George. All rights reserved. 57
Future: Excel for Home IoT:
Copyright © 2017 by Fred George. All rights reserved. 59
Future: Docker on Raspberry Pi
Copyright © 2017 by Fred George. All rights reserved. 63
MicroServices, IoT, and
Fred George
@fgeorge52
Copyright © 2017 by Fred George. All rights reserved. 64