beetle - sharing, flexibility and access control for ...meet esther.. 4/26. meet esther. 4/26. meet...
TRANSCRIPT
BeetleSharing, flexibility and access control for Bluetooth Low Energy
Amit Levy James Hong Laurynas RiliskisPhilip Levis Keith Winstein
Stanford University
June 24, 2016
1 / 26
Meet Grace
..
..
Strava
.
HrView
2 / 26
Meet Grace
...
.
Strava
.
HrView
2 / 26
Meet Grace
....
Strava
.
HrView
2 / 26
Meet Grace
....
Strava
.
HrView
2 / 26
Meet Grace
....
Strava
.
HrView
2 / 26
Meet Grace
....
Strava
.
HrView
2 / 26
Meet Grace
....
Strava
.
HrView
2 / 26
Meet Fabian
..
..
BatteryMon
.
3 / 26
Meet Fabian
...
.
BatteryMon
.
3 / 26
Meet Fabian
....
BatteryMon
.
3 / 26
Meet Fabian
....
BatteryMon
.
3 / 26
Meet Esther
..
..
4 / 26
Meet Esther
...
.
4 / 26
Meet Esther
....
4 / 26
Meet Esther
....
4 / 26
.......
Strava
...
OneTouch
...
Flux
No extensibility, no access control, limited communication
5 / 26
Limitations of Bluetooth Low Energy (BLE)
1. Applications must run on the gateway2. One application at a time3. All-or-nothing access
Peripherals need to be simple▶ Low cost▶ Low power▶ Hard to update
Gateway oblivious to peripheralfunctionality
▶ How to virtualize generally?▶ Who can access what?
6 / 26
The gateway should enableflexible and safe sharing
7 / 26
Beetle
SharingApplications can safely share access to peripherals without explicitcoordination.
Access ControlUsers can specify fine-graned access policies on peripherals andapplications.
Communication flexiblityMany-to-many communication between peripherals, gatewayapplications and cloud applications.
Backwards compatibleDoesn’t require changes to existing peripherals or applications.
8 / 26
Current Gateways: Explicit support
Dedicated drivers understand a class of peripherals:
▶ Printers▶ Keyboards▶ Disks
Pros▶ Safe virtualization▶ Access control
Cons▶ Need a trusted module for
each device class▶ Has worked OK for
desktops, but does is scale?
9 / 26
Current Gateways: Explicit support
Dedicated drivers understand a class of peripherals:
▶ Printers▶ Keyboards▶ Disks
Pros▶ Safe virtualization▶ Access control
Cons▶ Need a trusted module for
each device class▶ Has worked OK for
desktops, but does is scale?
9 / 26
Current Gateways: Exclusive access from one application
For special case peripherals, gateway provides an exclusive, rawchannel:
▶ Oscilloscope, hardware debugger▶ USB breathalyzer, USB blood pressure monitor▶ Most IoT peripherals (door locks, lights, fitness bands)
Pros▶ Don’t need explicit support
for each new device class
Cons▶ Can’t allow multiple apps to
use peripheral▶ App gets complete control
over peripheral
10 / 26
Current Gateways: Exclusive access from one application
For special case peripherals, gateway provides an exclusive, rawchannel:
▶ Oscilloscope, hardware debugger▶ USB breathalyzer, USB blood pressure monitor▶ Most IoT peripherals (door locks, lights, fitness bands)
Pros▶ Don’t need explicit support
for each new device class
Cons▶ Can’t allow multiple apps to
use peripheral▶ App gets complete control
over peripheral
10 / 26
Current Gateway Systems
OS Explicit Driver Exclusive Access
HomeOS ✓Linux ✓ ✓(BLE sockets)Android ✓(Google Health) ✓iOS ✓(Health/HomeKit) ✓
Explicit supportImpractical for operatingsystems to anticipate newdevice functionality
vs. Exclusive accessNo sharing, no access control,inflexible communication
11 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
...
.
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
...
.
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristics
Example, heart rate monitor
...
.
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
...
.
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
....
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
....
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
....
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
....
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
....
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4
.157BPM
12 / 26
Bluetooth Low Energy application protocol
Attribute Protocol (ATT):▶ Key-type-value store▶ Transactional flow-control▶ READ, WRITE, NOTIFY,
FIND-BY-TYPE…
Generic Attribute Profile(GATT):
▶ Structure over attributes▶ Characteristic: Groups
attributes for a value▶ Services: Groups related
characteristicsExample, heart rate monitor
....
Find Char with UUID HRM
.
Char at handle 2
.
Read handle 2
.Char value at handle 4
. Read handle 4.157BPM
12 / 26
Beetle: Key insight
BLE application protocol (GATT) is amenable to multiplexing:
▶ Unified data model▶ Standardized data types▶ Transactions are meaningful to applications
13 / 26
Beetle Architecture
.....
Kernel Bluetooth Driver
.....
Local apps
..Beetle
..Gateway
..
Peripherals
...
Virtual Devices
.
iForgotTheLights
14 / 26
Beetle Architecture
.....
Kernel Bluetooth Driver
.....
Local apps
..Beetle
..Gateway
..
Peripherals
..
.
Virtual Devices
.
iForgotTheLights
14 / 26
Beetle Architecture
.....
Kernel Bluetooth Driver
.....
Local apps
..Beetle
..Gateway
..
Peripherals
..
.
Virtual Devices
.
iForgotTheLights
14 / 26
Beetle Architecture
.....
Kernel Bluetooth Driver
.....
Local apps
..Beetle
..Gateway
..
Peripherals
..
.
Virtual Devices
.
iForgotTheLights
14 / 26
Beetle Architecture
.....
Kernel Bluetooth Driver
.....
Local apps
..Beetle
..Gateway
..
Peripherals
..
.
Virtual Devices
.
iForgotTheLights
14 / 26
Virtual Devices: Just speak GATT
Look like a peripheral to applications.
Look like a gateway to peripherals.
Provide:
▶ Sharing by multiplexing transactions from different clients▶ Access control by mapping handle space▶ Flexible communication by allowing transactions over any link
15 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Sharing
....
Strava
.
HrView
.
READ REQ: 1
.READ REQ: 2
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.READ REQ: 2
.READ RESP: 2
.
READ RESP: 2
16 / 26
Virtual Devices: Access Control
...
..2 ..Glucose Char
..3 ..Glucose value
..6 ..Battery Char
..7 ..Battery value
.
.
..6 ..Battery Char
..7 ..Battery value
..
BatteryMon
.
READ REQ: 7
.
READ REQ: 7
.
READ REQ: 2
.
ERR
17 / 26
Virtual Devices: Access Control
...
..2 ..Glucose Char
..3 ..Glucose value
..6 ..Battery Char
..7 ..Battery value
.
.
..6 ..Battery Char
..7 ..Battery value
..
BatteryMon
.
READ REQ: 7
.
READ REQ: 7
.
READ REQ: 2
.
ERR
17 / 26
Virtual Devices: Access Control
...
..2 ..Glucose Char
..3 ..Glucose value
..6 ..Battery Char
..7 ..Battery value
.
.
..6 ..Battery Char
..7 ..Battery value
..
BatteryMon
.
READ REQ: 7
.
READ REQ: 7
.
READ REQ: 2
.
ERR
17 / 26
Virtual Devices: Access Control
...
..2 ..Glucose Char
..3 ..Glucose value
..6 ..Battery Char
..7 ..Battery value
.
.
..6 ..Battery Char
..7 ..Battery value
..
BatteryMon
.
READ REQ: 7
.
READ REQ: 7
.
READ REQ: 2
.
ERR
17 / 26
Virtual Devices: Access Control
...
..2 ..Glucose Char
..3 ..Glucose value
..6 ..Battery Char
..7 ..Battery value
.
.
..6 ..Battery Char
..7 ..Battery value
..
BatteryMon
.
READ REQ: 7
.
READ REQ: 7
.
READ REQ: 2
.
ERR
17 / 26
Virtual Devices: Access Control
...
..2 ..Glucose Char
..3 ..Glucose value
..6 ..Battery Char
..7 ..Battery value
.
.
..6 ..Battery Char
..7 ..Battery value
..
BatteryMon
.
READ REQ: 7
.
READ REQ: 7
.
READ REQ: 2
.
ERR
17 / 26
Implementation
Linux
▶ User-space daemon (C++)▶ Applications connect via UNIX domain or TCP sockets▶ Access control via database + browser interface
Android
▶ Modified Android’s Bluetooth Service app▶ Applications connect over Intents (IPC)▶ Access control via normal user control flow
18 / 26
Applications
▶ Multi-app Heart Rate Monitor▶ Battery Monitor▶ Generic Home Gateway ...
19 / 26
Performance
0
500
1000
1500
2000
10 100 1000
Late
ncy (
ms)
Connection Interval (ms)
Without Beetle
With Beetle
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10 100 1000
Late
ncy (
ms)
Connection Interval (ms)
Direct
Through Proxy
▶ One app to one peripheral – no significant overhead▶ 1.7x connection interval with/without Beetle
▶ Multi-client throughput depends on workload▶ Reads are linearly scalable via caching
▶ Peripheral-to-peripheral ~2-3x due to extra hop▶ Could be improved with better coordination by gateway
20 / 26
Limitations
▶ Bluetooth Low Energy specific▶ Relies on properties of the application layer protocol
▶ Peripherals must conform to GATT transactional semantics▶ But peripheral-specific virtual devices could mask violations
▶ Access control does not solve secure naming▶ Does not offer a management solution
▶ Complimentary to systems, like HomeOS
21 / 26
DiscussionSafe and flexible peripheral sharingCan and should be provided first-class by the gateway
Lessons for protocol design
▶ Data model at the right abstraction level▶ Standardized data types▶ Global namespace
Lessons for BLE peripheral builders
▶ Don’t rely on exclusive access for semantics▶ One GATT transaction per application transaction
https://github.com/helena-project/beetle
22 / 26
DiscussionSafe and flexible peripheral sharingCan and should be provided first-class by the gateway
Lessons for protocol design
▶ Data model at the right abstraction level▶ Standardized data types▶ Global namespace
Lessons for BLE peripheral builders
▶ Don’t rely on exclusive access for semantics▶ One GATT transaction per application transaction
https://github.com/helena-project/beetle
22 / 26
DiscussionSafe and flexible peripheral sharingCan and should be provided first-class by the gateway
Lessons for protocol design
▶ Data model at the right abstraction level▶ Standardized data types▶ Global namespace
Lessons for BLE peripheral builders
▶ Don’t rely on exclusive access for semantics▶ One GATT transaction per application transaction
https://github.com/helena-project/beetle
22 / 26
DiscussionSafe and flexible peripheral sharingCan and should be provided first-class by the gateway
Lessons for protocol design
▶ Data model at the right abstraction level▶ Standardized data types▶ Global namespace
Lessons for BLE peripheral builders
▶ Don’t rely on exclusive access for semantics▶ One GATT transaction per application transaction
https://github.com/helena-project/beetle22 / 26
Are corporations just evil?
..
..
23 / 26
Are corporations just evil?
...
.
23 / 26
Are corporations just evil?
....
23 / 26
Attribute Caching
....
app1
.
app2
.
READ REQ: 1
.READ REQ: 1
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.
READ RESP: 1
.
READ RESP: 1
24 / 26
Attribute Caching
....
app1
.
app2
.
READ REQ: 1
.READ REQ: 1
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.
READ RESP: 1
.
READ RESP: 1
24 / 26
Attribute Caching
....
app1
.
app2
.
READ REQ: 1
.READ REQ: 1
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.
READ RESP: 1
.
READ RESP: 1
24 / 26
Attribute Caching
....
app1
.
app2
.
READ REQ: 1
.READ REQ: 1
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.
READ RESP: 1
.
READ RESP: 1
24 / 26
Attribute Caching
....
app1
.
app2
.
READ REQ: 1
.READ REQ: 1
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.
READ RESP: 1
.
READ RESP: 1
24 / 26
Attribute Caching
....
app1
.
app2
.
READ REQ: 1
.READ REQ: 1
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.
READ RESP: 1
.
READ RESP: 1
24 / 26
Attribute Caching
....
app1
.
app2
.
READ REQ: 1
.READ REQ: 1
.READ REQ: 1
.READ RESP: 1
. READ RESP: 1
.
READ RESP: 1
.
READ RESP: 1
24 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Handling Subscriptions
....
app1
.
app2
.
Subscriptions:
.
∅
.
SUBSCRIBE
.
app1
.SUBSCRIBE
.NOTIFY
. NOTIFY
.SUBSCRIBE
.
app2
.NOTIFY
. NOTIFY
.
NOTIFY
.UNSUBSCRIBE
.
UNSUBSCRIBE
.UNSUBSCRIBE
25 / 26
Performance: Caching
100
1000
10000
20 40 60 80 100 120 140 160 180
99th
%tile
late
ncy p
er
req
uest
# concurrent requests
Without Caching
With Caching
26 / 26