picos, cloudos, and connecting things
TRANSCRIPT
Connecting EverythingPhillip J. Windley, PhD Enterprise Architecture, BYU CTO, Kynetx, Inc. @windley
Personal: Clients working on behalf of the user Real-time events and alerts Access to data through APIs Context
Event System Properties
Events are autonomous Event-driven system are more loosely coupled Downstream (receiver) driven flow control Near real-time propagation
"The car needs to become your friend. How does the car speak to me? How does the car integrate with the dealership and the factory? How does the car help me get to the service station? ... I want a relationship with the car in the same way I have a relationship with my friends. ... The car is going to become social. All our
products are going to become social."—Marc Benioff
Picos are online computersIdentity—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 APIs—they provide access to and access other online services
Picos Use an Event Query Model
pico
functions
rules
persistentstorage
or CancelDone
User Interface
name
phone
query API
event API
user makes change in UIresulting in an event
UI updates presentation using query API
rules validate and process event, often updating model
functions return results based on persistent data
Picos Support A Familiar Model
CloudOS
Kynetx Rules Engine
KernelSpace
Confi
gura
tion
Man
agem
ent
Clou
dOS
Serv
ice
Services &Libraries
UserSpace
Notifi
catio
nSe
rvice
Fore
vr.u
s(c
onta
ct)
Tim
elin
e(s
ocia
l)
To D
o &
Rem
inde
rs
Vehi
cle
Man
ange
men
t
Applications
Pers
onal
Dat
a Se
rvice
UI S
uppo
rt
OtherData
Sources
WebServices
APIs
Hom
e M
anag
emen
t
Inte
ntca
stin
g
File
Socia
l
Rulesets PersistentData
...
...AP
Is
Socia
l
Persistent Compute Object
Fuse
Libr
ary
Fuse
Gua
rd
Tour
Libr
ary
Gua
rd
Tour
Programming ModelProgram in any language you like
OAuth access to pico
Pico provides
user data
processing
API and inter-pico communications
MicroservicesOrganized 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
Healing Subscriptionsrule check_subscriptions {
select when fuse subscription_check
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;
}
}
Healing Subscriptionsrule check_subscriptions {
select when fuse subscription_check
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;
}
}
Healing Subscriptionsrule check_subscriptions {
select when fuse subscription_check
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;
}
}
Healing Subscriptionsrule check_subscriptions {
select when fuse subscription_check
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;
}
}
Healing Subscriptionsrule check_subscriptions {
select when fuse subscription_check
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;
}
}
KRL
Runs in picos Built for microservices Complex event expressions Persistent variables Side-effects are quarantined
This can get complex…
Institution
TourIndex Location
Index
ReportIndex
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
ToursToursToursTours
LocationsLocationsLocationsLocations
Why do this?Orthogonality and modularity are powerful: network effects! More flexible Can be less work More private
Recommended ReadingMirror Worlds, David Gelernter
Snowcrash, Neal Stevenson
Rainbow's End, Vernor Vinge
The Intention Economy, Doc Searls
Trillions, Peter Lucas, Joe Ballay & Mickey McManus