Embedded Actors — Towards Distributed Programming in the IoT
Raphael Hiesgen, Dominik Charousset, Thomas C. Schmidt HAW Hamburg raphael.hiesgen@haw-hamburg.de
Embedded Actors Towards Distributed Programming in the IoT Raphael - - PowerPoint PPT Presentation
Embedded Actors Towards Distributed Programming in the IoT Raphael Hiesgen, Dominik Charousset, Thomas C. Schmidt HAW Hamburg raphael.hiesgen@haw-hamburg.de September 2014, ICCE-Berlin Agenda 1 The Internet of Things (IoT) 2 The Actor
Raphael Hiesgen, Dominik Charousset, Thomas C. Schmidt HAW Hamburg raphael.hiesgen@haw-hamburg.de
1 The Internet of Things (IoT) 2 The Actor Model 3 Communication in the IoT 4 Messaging Architecture 5 Evaluation 6 Conclusion & Outlook
Raphael Hiesgen iNET – HAW Hamburg 2
Cooperatively process complex duties Dependent on machine-to-machine communication Connected to the Internet Implemented with networking standards Often constrained environment
Fall back to low-level programming Hand-crafted network code Barely portable code
Raphael Hiesgen iNET – HAW Hamburg 3
1 The Internet of Things (IoT) 2 The Actor Model 3 Communication in the IoT 4 Messaging Architecture 5 Evaluation 6 Conclusion & Outlook
Raphael Hiesgen iNET – HAW Hamburg 4
Raphael Hiesgen iNET – HAW Hamburg 5
Need to broaden range of applications Deploy actors in performance-critical systems
Why not model the “Internet of Things” as network of actors? HW platform should not dictate programming model
Raphael Hiesgen iNET – HAW Hamburg 6
Low memory footprint Fast, lock-free mailbox implementation
Multi-core & many-node systems Embedded HW, e.g., running
1
1http://www.riot-os.org Raphael Hiesgen iNET – HAW Hamburg 7
CAF scala erlang 500 1000 1500 2000 2500 3000 3500 Resident Set Size [MB]
x
99th percentile 1st percentile 95th percentile 5th percentile
x
Median 75th percentile 25th percentile Mean
Raphael Hiesgen iNET – HAW Hamburg 8
1 The Internet of Things (IoT) 2 The Actor Model 3 Communication in the IoT 4 Messaging Architecture 5 Evaluation 6 Conclusion & Outlook
Raphael Hiesgen iNET – HAW Hamburg 9
Unreliable links Infrastructure failure
Error propagation for non-hierarchical systems Secure and authenticated connectivity
Raphael Hiesgen iNET – HAW Hamburg 10
Supported by all major OSs
WPAN for embedded devices 127 bytes frame size
IPv6 compatibility Header compression
Features of TLS with datagrams Reordering, retransmission and fragmentation for the handshake
Request-response model adapted from HTTP Works asynchronously over datagram protocols Offers reliability through Confirmable messages (CON)
Raphael Hiesgen iNET – HAW Hamburg 11
1 The Internet of Things (IoT) 2 The Actor Model 3 Communication in the IoT 4 Messaging Architecture 5 Evaluation 6 Conclusion & Outlook
Raphael Hiesgen iNET – HAW Hamburg 12
802.15.4 / Bluetooth LE 6LoWPAN UDP DTLS CoAP C++ Actor Framework Ethernet / WLAN IPv4 / IPv6 TCP
Raphael Hiesgen iNET – HAW Hamburg 13
Reliability (CON) → synchronous messages Unreliability (NON) → asynchronous messages
Compress meta-information to slim down headers Type-exchange & annotation introduces more state Fragmentation on the application layer (CoAP block messages)
No longer connection oriented Based on asynchronous transactions (CoAP) Take unreliable messages into account
Raphael Hiesgen iNET – HAW Hamburg 14
1 The Internet of Things (IoT) 2 The Actor Model 3 Communication in the IoT 4 Messaging Architecture 5 Evaluation 6 Conclusion & Outlook
Raphael Hiesgen iNET – HAW Hamburg 15
Network stack composed of Ethernet, UDP and CoAP Based on libcoap 2
Characteristic scenario for sensor nodes
2http://libcoap.sourceforge.net Raphael Hiesgen iNET – HAW Hamburg 16
500 1000 20k 40k 60k 80k 100k 120k
Bit rate (bit/s) Time (ms) CoAP + UDP TCP
Raphael Hiesgen iNET – HAW Hamburg 17
20 40 60 80 100 120 140 160 180 200 220 240 260 5 10 15 20
Count Packet Size (bytes)
CoAP + UDP TCP
Raphael Hiesgen iNET – HAW Hamburg 18
1 The Internet of Things (IoT) 2 The Actor Model 3 Communication in the IoT 4 Messaging Architecture 5 Evaluation 6 Conclusion & Outlook
Raphael Hiesgen iNET – HAW Hamburg 19
Network communication & synchronization Port software to different hardware
Concept for error-propagation Additional CoAP drafts (CoCoA, block messages, ...) Evaluation of packet loss, message sizes Adaption to RIOT
Raphael Hiesgen iNET – HAW Hamburg 20
Website: http://actor-framework.org Sources: https://github.com/actor-framework iNET working group: http://inet.cpt.haw-hamburg.de
Raphael Hiesgen iNET – HAW Hamburg 21