Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Events, Picos, and
Microservices
Phillip J. Windley, PhD
Enterprise Architecture, BYU
CTO, Kynetx, Inc.
@windley
This APIs in this
talk aren’t
RESTful
Internet of Things
The Internet of Things will
lead to a computing
experience that is immersive
& pervasive.
Ambient Computing
vs
The Current #IoT Model
Won’t Scale
Me
GE
Internet 

of

My Things
Me
GE
The Internet of My Things
The Internet of My Things
	 leads to
The API of Me
Events vs Requests
“this happened” vs “do this”
Event System Properties
Events are autonomous
Event-driven system are more loosely coupled
Downstream (receiver) driven flo...
Fuse is Three Things
http://joinfuse.com
picos
Picos are online computers
Identity—they represent a specific entity
Storage—they persistently encapsulate both structured
...
Owner
Pico
Fleet Pico
Vehicle
Pico
Vehicle
Pico
Vehicle
Pico
Web
Application
Application
Data
Browser
Web
Application
Application
Data
Browser
Vehicle's
Pico
iCalendar
Web
Mobile
Rather than a model where a system
presents an API for a collection of
resources….
Rather than a model where a system
presents an API for a collection of
resources….
Picos present a model wherein each
pico...
Phil's Pico
owner
Phil's Pico
owner
Lynne's Pico
owner
Phil's Pico Tom's Pico
owner
Lynne's Pico
owner
Phil's Pico Tom's Pico
owner
Lynne's Pico
owner
Phil's Pico Tom's Pico
owner
Lynne's Pico
owner
Phil's Pico Tom's Pico
owner
Lynne's Pico
owner borrower
Phil's Pico
Phil's Pico
Picos Support A Familiar Model
Kynetx Rules Engine
Other
Data
Sources
Web
Services
APIs
Rulesets
Persistent
Data
APIs
cont...
Picos Support A Familiar Model
Kynetx Rules Engine
Other
Data
Sources
Web
Services
APIs
Rulesets
Persistent
Data
APIs
cont...
Picos Support A Familiar Model
Kynetx Rules Engine
Other
Data
Sources
Web
Services
APIs
Rulesets
Persistent
Data
APIs
cont...
Picos Support A Familiar Model
Kynetx Rules Engine
Other
Data
Sources
Web
Services
APIs
Rulesets
Persistent
Data
APIs
cont...
Picos Are Decentralized & Networked
pico
pico
Hosting
Space
Pico
Space
Hosting
Company A
Hosting
Company B
Self
Hosted
pic...
Built on open standards
Built on open source
But it’s not just about
manufactured things...
This can get complex…
Institution
Tour
Index
Location
Index
Report
Index
Tour
"LUFX"
Tour
"KUFF"
Location
"R7RK"
Report
"1...
Picos Use an Event Query API
pico
functions
rules
persistent
storage
or CancelDone
User Interface
name
email
phone
query A...
Programming Model
Program in any language you like
OAuth access to pico
Pico provides
user data
processing
API and inter-p...
Microservices
Organized around a single business
capability
Small, generally less than 1000 lines and
code and usually muc...
carvoyant:
numeric_data_key
vehicle event bus
carvoyant:
numeric_data_key
vehicle event bus
fuel level
low
carvoyant:
numeric_data_key
fuse:
update_fuel_level
vehicle event bus
fuel level
low
carvoyant:
numeric_data_key
fuse:
update_fuel_level
vehicle event bus
fuel level
low
create
alert
fuse:
new_alert
carvoyant:
numeric_data_key
fuse:
update_fuel_level
vehicle event bus
fuel level
low
create
alert
fuse:
new_alert
send
not...
carvoyant:
numeric_data_key
fuse:
update_fuel_level
vehicle event bus
fuel level
low
create
alert
fuse:
new_alert
record
n...
carvoyant:
numeric_data_key
fuse:
update_fuel_level
vehicle event bus
fuel level
low
create
alert
fuse:
new_alert
record
n...
carvoyant:
numeric_data_key
fuse:
update_fuel_level
vehicle event bus
fuel level
low
create
alert
fuse:
new_alert
record
n...
carvoyant:
numeric_data_key
fuse:
update_fuel_level
vehicle event bus
fuel level
low
create
alert
fuse:
new_alert
record
n...
Healing Subscriptions
rule check_subscriptions {
select when pds profile_updated
pre {
vid = carvoyant:vehicle_id();
my_su...
Healing Subscriptions
rule check_subscriptions {
select when pds profile_updated
pre {
vid = carvoyant:vehicle_id();
my_su...
Healing Subscriptions
rule check_subscriptions {
select when pds profile_updated
pre {
vid = carvoyant:vehicle_id();
my_su...
Healing Subscriptions
rule check_subscriptions {
select when pds profile_updated
pre {
vid = carvoyant:vehicle_id();
my_su...
Healing Subscriptions
rule check_subscriptions {
select when pds profile_updated
pre {
vid = carvoyant:vehicle_id();
my_su...
KRL
Rules
Runs in picos
Built for microservices
Complex event expressions
Persistent variables
Side-effects are quarantined
Developer Tools
Self Healing
f(f(x)) = f(x)
Idempotent
Asynchrony
Accretive
Systems
Why do this?
Orthogonality and modularity are
powerful: network effects!
Loose coupling
Simple services are easier to get ...
My book on
event
programming
http://joinfuse.com
Internet Identity
Workshop
Contact info:
Phil Windley
pjw@kynetx.com
www.windley.com
@windley
Events, Picos, and
Microservices
Events, Picos, and Microservices
Events, Picos, and Microservices
Events, Picos, and Microservices
Events, Picos, and Microservices
Events, Picos, and Microservices
Events, Picos, and Microservices
Upcoming SlideShare
Loading in …5
×

Events, Picos, and Microservices

791 views

Published on

The Internet of Things will require a different programming model than the one we've used to build Web 2.0. This presentation discusses a proposed architecture for connecting everything based on persistent compute objects, or picos. Picos naturally supporting building microservices. The presentation makes use of a connected-car platform called Fuse (http://joinfuse.com) to illustrate the use of microservices in picos and evented systems.

Published in: Internet
  • Be the first to comment

Events, Picos, and Microservices

  1. 1. Events, Picos, and Microservices Phillip J. Windley, PhD Enterprise Architecture, BYU CTO, Kynetx, Inc. @windley
  2. 2. This APIs in this talk aren’t RESTful
  3. 3. Internet of Things
  4. 4. The Internet of Things will lead to a computing experience that is immersive & pervasive.
  5. 5. Ambient Computing
  6. 6. vs
  7. 7. The Current #IoT Model Won’t Scale
  8. 8. Me
  9. 9. GE
  10. 10. Internet of My Things Me GE
  11. 11. The Internet of My Things
  12. 12. The Internet of My Things leads to The API of Me
  13. 13. Events vs Requests
  14. 14. “this happened” vs “do this”
  15. 15. Event System Properties Events are autonomous Event-driven system are more loosely coupled Downstream (receiver) driven flow control Near real-time propagation
  16. 16. Fuse is Three Things http://joinfuse.com
  17. 17. picos
  18. 18. Picos are online computers Identity—they represent a specific entity Storage—they persistently encapsulate both structured and unstructured data Open event network—they respond to events Processing—they run applications autonomously Event Channels—they have connections to other picos Services—The provide a consistent set of services APIs—they provide access to and access other online services
  19. 19. Owner Pico Fleet Pico Vehicle Pico Vehicle Pico Vehicle Pico
  20. 20. Web Application Application Data Browser
  21. 21. Web Application Application Data Browser
  22. 22. Vehicle's Pico iCalendar Web Mobile
  23. 23. Rather than a model where a system presents an API for a collection of resources….
  24. 24. Rather than a model where a system presents an API for a collection of resources…. Picos present a model wherein each pico presents it’s own, customizable API
  25. 25. Phil's Pico owner
  26. 26. Phil's Pico owner Lynne's Pico owner
  27. 27. Phil's Pico Tom's Pico owner Lynne's Pico owner
  28. 28. Phil's Pico Tom's Pico owner Lynne's Pico owner
  29. 29. Phil's Pico Tom's Pico owner Lynne's Pico owner
  30. 30. Phil's Pico Tom's Pico owner Lynne's Pico owner borrower
  31. 31. Phil's Pico
  32. 32. Phil's Pico
  33. 33. Picos Support A Familiar Model Kynetx Rules Engine Other Data Sources Web Services APIs Rulesets Persistent Data APIs container
  34. 34. Picos Support A Familiar Model Kynetx Rules Engine Other Data Sources Web Services APIs Rulesets Persistent Data APIs container Persistent Compute Object object
  35. 35. Picos Support A Familiar Model Kynetx Rules Engine Other Data Sources Web Services APIs Rulesets Persistent Data APIs container Persistent Compute Object object CloudOS Configuration Management CloudOS Service Notification Service PersonalData Service UISupport File Social Social Fuse Library Guard Tour Library libraries
  36. 36. Picos Support A Familiar Model Kynetx Rules Engine Other Data Sources Web Services APIs Rulesets Persistent Data APIs container Persistent Compute Object object Forevr.us (contact) Timeline (social) ToDo& Reminders Vehicle Manangement Home Management Intentcasting Fuse Guard Tour applications CloudOS Configuration Management CloudOS Service Notification Service PersonalData Service UISupport File Social Social Fuse Library Guard Tour Library libraries
  37. 37. Picos Are Decentralized & Networked pico pico Hosting Space Pico Space Hosting Company A Hosting Company B Self Hosted pico pico pico pico pico pico pico KRE KRE KRE Pico Containers
  38. 38. Built on open standards Built on open source
  39. 39. But it’s not just about manufactured things...
  40. 40. This can get complex… Institution Tour Index Location Index Report Index Tour "LUFX" Tour "KUFF" Location "R7RK" Report "1" Location "G5YH" Report "current" Location "T67G" Managers Guards Guard "Frank" Subscriptions permanent temporary Report "2"Report "2"Report "2"Reports Tours Tours Tours Tours Locations Locations Locations Locations
  41. 41. Picos Use an Event Query API pico functions rules persistent storage or CancelDone User Interface name email phone query API event API user makes change in UI resulting in an event UI updates presentation using query API rules validate and process event, often updating model functions return results based on persistent data
  42. 42. Programming Model Program in any language you like OAuth access to pico Pico provides user data processing API and inter-pico communications
  43. 43. Microservices Organized around a single business capability Small, generally less than 1000 lines and code and usually much smaller Event-based and asynchronous Run in their own process Independently deployable Decentralized data storage
  44. 44. carvoyant: numeric_data_key vehicle event bus
  45. 45. carvoyant: numeric_data_key vehicle event bus fuel level low
  46. 46. carvoyant: numeric_data_key fuse: update_fuel_level vehicle event bus fuel level low
  47. 47. carvoyant: numeric_data_key fuse: update_fuel_level vehicle event bus fuel level low create alert fuse: new_alert
  48. 48. carvoyant: numeric_data_key fuse: update_fuel_level vehicle event bus fuel level low create alert fuse: new_alert send notification notification: status
  49. 49. carvoyant: numeric_data_key fuse: update_fuel_level vehicle event bus fuel level low create alert fuse: new_alert record new fuel send notification notification: status
  50. 50. carvoyant: numeric_data_key fuse: update_fuel_level vehicle event bus fuel level low create alert fuse: new_alert record new fuel IFTTT send notification notification: status
  51. 51. carvoyant: numeric_data_key fuse: update_fuel_level vehicle event bus fuel level low create alert fuse: new_alert record new fuel save trip IFTTT send notification notification: status
  52. 52. carvoyant: numeric_data_key fuse: update_fuel_level vehicle event bus fuel level low create alert fuse: new_alert record new fuel save trip IFTTT send notification notification: status record brand data
  53. 53. Healing Subscriptions rule check_subscriptions { select when pds profile_updated pre { vid = carvoyant:vehicle_id(); my_subs = carvoyant:getSubscription(vid); should_have = required_subscription_list.length(); } if(my_subs.length() < should_have) then send_directive("not enough subscriptions") fired { log ">>>> vehicle #{vid} needs subscription check"; raise fuse event need_initial_carvoyant_subscriptions; } }
  54. 54. Healing Subscriptions rule check_subscriptions { select when pds profile_updated pre { vid = carvoyant:vehicle_id(); my_subs = carvoyant:getSubscription(vid); should_have = required_subscription_list.length(); } if(my_subs.length() < should_have) then send_directive("not enough subscriptions") fired { log ">>>> vehicle #{vid} needs subscription check"; raise fuse event need_initial_carvoyant_subscriptions; } }
  55. 55. Healing Subscriptions rule check_subscriptions { select when pds profile_updated pre { vid = carvoyant:vehicle_id(); my_subs = carvoyant:getSubscription(vid); should_have = required_subscription_list.length(); } if(my_subs.length() < should_have) then send_directive("not enough subscriptions") fired { log ">>>> vehicle #{vid} needs subscription check"; raise fuse event need_initial_carvoyant_subscriptions; } }
  56. 56. Healing Subscriptions rule check_subscriptions { select when pds profile_updated pre { vid = carvoyant:vehicle_id(); my_subs = carvoyant:getSubscription(vid); should_have = required_subscription_list.length(); } if(my_subs.length() < should_have) then send_directive("not enough subscriptions") fired { log ">>>> vehicle #{vid} needs subscription check"; raise fuse event need_initial_carvoyant_subscriptions; } }
  57. 57. Healing Subscriptions rule check_subscriptions { select when pds profile_updated pre { vid = carvoyant:vehicle_id(); my_subs = carvoyant:getSubscription(vid); should_have = required_subscription_list.length(); } if(my_subs.length() < should_have) then send_directive("not enough subscriptions") fired { log ">>>> vehicle #{vid} needs subscription check"; raise fuse event need_initial_carvoyant_subscriptions; } }
  58. 58. KRL Rules Runs in picos Built for microservices Complex event expressions Persistent variables Side-effects are quarantined
  59. 59. Developer Tools
  60. 60. Self Healing
  61. 61. f(f(x)) = f(x) Idempotent
  62. 62. Asynchrony
  63. 63. Accretive Systems
  64. 64. Why do this? Orthogonality and modularity are powerful: network effects! Loose coupling Simple services are easier to get right More private
  65. 65. My book on event programming
  66. 66. http://joinfuse.com Internet Identity Workshop
  67. 67. Contact info: Phil Windley pjw@kynetx.com www.windley.com @windley Events, Picos, and Microservices

×