Abstract
A large class of IoT applications read sensors, execute application logic, and actuate actuators. However, the lack of high-level programming abstractions compromises correctness, especially in the presence of failures and unwanted interleaving between applications. A key problem arises when operations on IoT devices or the application itself fails, which leads to inconsistencies between the physical state and application state, breaking application semantics and causing undesired consequences. Transactions are a well-established abstraction for correctness, but assume properties that are absent in an IoT context. In this article, we study one such environment, smart home, and establish inconsistencies manifesting out of failures. We propose an abstraction called transactuation that empowers developers to build reliable applications. Our runtime, Relacs, implements the abstraction atop a real smart-home platform. We evaluate programmability, performance, and effectiveness of transactuations to demonstrate its potential as a powerful abstraction and execution model.
- Amazon AWS Lambda. [n.d.]. Retrieved from https://aws.amazon.com/lambda/.Google Scholar
- Arrow functions. [n.d.]. Retrieved from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions.Google Scholar
- AWS Lambda Retry Behavior. [n.d.]. Retrieved from https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html.Google Scholar
- Azure Cosmos DB server-side programming: Stored procedures, database triggers, and UDFs. [n.d.]. Retrieved from https://docs.microsoft.com/en-us/azure/cosmos-db/programming.Google Scholar
- Bluetooth Low Energy. [n.d.]. Retrieved from https://www.bluetooth.com.Google Scholar
- CO2 Vent. [n.d.]. Retrieved from https://github.com/SmartThingsCommunity/SmartThingsPublic/tree/master/smartapps/dianoga/co2-vent.src.Google Scholar
- Count Lines of Code. [n.d.]. Retrieved from http://cloc.sourceforge.net.Google Scholar
- Expressions. [n.d.]. Retrieved from https://docs.python.org/2/reference/expressions.html.Google Scholar
- Groovy AST Interface. [n.d.]. Retrieved from http://docs.groovy-lang.org/docs/groovy-2.4.0/html/api/org/codehaus/groovy/ast/package-summary.html.Google Scholar
- Inconsistent Behavior. [n.d.]. Retrieved from https://community.smartthings.com/t/inconsistent-behavior/35284.Google Scholar
- IoTBench-test-suite. [n.d.]. Retrieved from https://github.com/IoTBench/IoTBench-test-suite/tree/master/openHAB.Google Scholar
- Lambda Expressions. [n.d.]. Retrieved from https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html.Google Scholar
- OpenHAB: Empowering the Smart Home. [n.d.]. Retrieved from https://www.openhab.org.Google Scholar
- Raspberry Pi 3 Model B. [n.d.]. Retrieved from https://www.raspberrypi.org/products/raspberry-pi-3-model-b/.Google Scholar
- SmartThings. [n.d.]. Retrieved from http://www.smartthings.com/.Google Scholar
- SSA1/SSA2 Instruction Manual. [n.d.]. Retrieved from https://support.smartthings.com/hc/en-us/article_attachments/200715310/ssa_manual_14may2011_-_new_address0.pdf.Google Scholar
- Your Lambda function might execute twice. Be prepared! [n.d.]. Retrieved from https://cloudonaut.io/your-lambda-function-might-execute-twice-deal-with-it/.Google Scholar
- Z-Wave Alliance. [n.d.]. Retrieved from http://www.z-wavealliance.org.Google Scholar
- ZigBee Alliance. [n.d.]. Retrieved from http://www.zigbee.org/.Google Scholar
- 2018. Web Services SmartThings. Retrieved from https://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/index.html.Google Scholar
- 2019. SmartThings Smart Apps. Retrieved from https://github.com/SmartThingsCommunity/SmartThingsPublic/tree/master/smartapps.Google Scholar
- Masoud Saeida Ardekani, Rayman Preet Singh, Nitin Agrawal, Douglas B. Terry, and Riza O. Suminto. 2017. Rivulet: A fault-tolerant platform for smart-home applications. In Proceedings of the 18th Doctoral Symposium of the 18th International Middleware Conference (MIDDLEWARE’17). 41--54.Google Scholar
- Masoud Saeida Ardekani and Douglas B. Terry. 2014. A self-configurable geo-replicated cloud storage system. In Proceedings of the 11th Symposium on Operating Systems Design and Implementation (OSDI’14). 367--381.Google Scholar
- Z. Berkay Celik, Patrick McDaniel, and Gang Tan. 2018. Soteria: Automated IoT safety and security analysis. In Proceedings of the USENIX Annual Technical Conference (ATC’18). 147--158.Google Scholar
- Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy. 2001. A simple, fast dominance algorithm. CS Technical Report 06-33870, Rice University.Google Scholar
- Jason Croft, Ratul Mahajan, Matthew Caesar, and Madan Musuvathi. 2015. Systematically exploring the behavior of control programs. In Proceedings of the USENIX Annual Technical Conference (ATC’15). 165--176.Google Scholar
- James Davis, Arun Thekumparampil, and Dongyoon Lee. 2017. Node.Fz: Fuzzing the server-side event-driven architecture. In Proceedings of the European Conference on Computer Systems (EuroSys’17). 145--160.Google ScholarDigital Library
- Colin Dixon, Ratul Mahajan, Sharad Agarwal, A. J. Brush, Bongshin Lee, Stefan Saroiu, and Paramvir Bahl. 2012. An operating system for the home. In Proceedings of the 9th Symposium on Networked Systems Design and Implementation (NSDI’12). 337--352.Google Scholar
- Jeanne Ferrante, Karl J. Ottenstein, and Joe D. Warren. 1987. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9, 3 (July 1987), 319--349.Google ScholarDigital Library
- Jayavardhana Gubbi, Rajkumar Buyya, Slaven Marusic, and Marimuthu Palaniswami. 2013. Internet of Things (IoT): A vision, architectural elements, and future directions. Future Gen. Comput. Syst. 29, 7 (Sep. 2013), 1645–1660.Google ScholarDigital Library
- Rachid Guerraoui, Matej Pavlovic, and Dragos-Adrian Seredinschi. 2016. Incremental consistency guarantees for replicated objects. In Proceedings of the 12th Symposium on Operating Systems Design and Implementation (OSDI’16). 169--184.Google Scholar
- Haryadi S. Gunawi, Mingzhe Hao, Tanakorn Leesatapornwongsa, Tiratat Patana-anake, Thanh Do, Jeffry Adityatama, Kurnia J. Eliazar, Agung Laksono, Jeffrey F. Lukman, Vincentius Martin, and Anang D. Satria. 2014. What bugs live in the cloud? A study of 3000+ issues in cloud systems. In Proceedings of the 5th ACM Symposium on Cloud Computing (SoCC’14). 7:1–7:14.Google Scholar
- Pat Helland and Dave Cambell. 2009. Building on quicksand. In Proceedings of the 4th Conference on Innovative Data Systems Research (CIDR’09).Google Scholar
- Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. 2016. Serverless computation with OpenLambda. In Proceedings of the 8th USENIX Workshop on Hot Topics in Cloud Computing (HotCloud’16).Google Scholar
- Timothy W. Hnat, Vijay Srinivasan, Jiakang Lu, Tamim I. Sookoor, Raymond Dawson, John Stankovic, and Kamin Whitehouse. 2011. The hitchhiker’s guide to successful residential sensing deployments. In Proceedings of the 9th ACM Conference on Embedded Networked Sensor Systems (SenSys’11). 232--245.Google ScholarDigital Library
- Manos Kapritsos, Yang Wang, Vivien Quéma, Allen Clement, Lorenzo Alvisi, and Mike Dahlin. 2012. All about eve: Execute-verify replication for multi-core servers. In Proceedings of the 10th USENIX Symposium on Operating Systems Design and Implementation (OSDI’12). 237--250.Google Scholar
- Mary Beth Kery, Claire Le Goues, and Brad A. Myers. 2016. Examining programmer practices for locally handling exceptions. In Proceedings of the 13th International Conference on Mining Software Repositories (MSR’16). 484–487.Google Scholar
- Tim Kraska, Gene Pang, Michael J. Franklin, Samuel Madden, and Alan Fekete. 2013. MDCC: Multi-data center consistency. In Proceedings of the European Conference on Computer Systems (EuroSys’13). 113--126.Google ScholarDigital Library
- Tanakorn Leesatapornwongsa, Mingzhe Hao, Pallavi Joshi, Jeffrey F. Lukman, and Haryadi S. Gunawi. 2014. SAMC: Semantic-aware model checking for fast discovery of deep bugs in cloud systems. In Proceedings of the 11th Symposium on Operating Systems Design and Implementation (OSDI’14). 399--414.Google Scholar
- Chieh-Jan Mike Liang, Börje F. Karlsson, Nicholas D. Lane, Feng Zhao, Junbei Zhang, Zheyi Pan, Zhao Li, and Yong Yu. 2015. SIFT: Building an Internet of safe things. In Proceedings of the 14th International Conference on Information Processing in Sensor Networks (IPSN’15). 298--309.Google ScholarDigital Library
- Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. 2008. Learning from mistakes—A comprehensive study on real world concurrency bug characteristics. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’08). 329--339.Google ScholarDigital Library
- Julie L. Newcomb, Satish Chandra, Jean-Baptiste Jeannin, Cole Schlesinger, and Manu Sridharan. 2017. IOTA: A calculus for Internet of Things automation. In Proceedings of the ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (ONWARD’17).Google ScholarDigital Library
- Edmund B. Nightingale, Peter M. Chen, and Jason Flinn. 2005. Speculative execution in a distributed file system. In Proceedings of the 20th ACM Symposium on Operating Systems Principles (SOSP’05). 191--205.Google ScholarDigital Library
- Edward Oakes, Leon Yang, Dennis Zhou, Kevin Houck, Tyler Harter, Andrea Arpaci-Dusseau, and Remzi Arpaci-Dusseau. 2018. SOCK: Rapid task provisioning with serverless-optimized containers. In Proceedings of the USENIX Annual Technical Conference (USENIXATC’18). 57--70.Google Scholar
- Gene Pang, Tim Kraska, Michael J. Franklin, and Alan Fekete. 2014. PLANET: Making progress with commit processing in unpredictable environments. In Proceedings of the ACM SIGMOD International Conference on Management of Data (SIGMOD’14). 3--14.Google ScholarDigital Library
- Aritra Sengupta, Tanakorn Leesatapornwongsa, Masoud Saeida Ardekani, and Cesar A. Stuardo. 2019. Transactuations: Where transactions meet the physical world. In Proceedings of the USENIX Annual Technical Conference (USENIXATC’19). 91--106.Google Scholar
- M. Shapiro, M. S. Ardekani, and G. Petri. 2016. Consistency in 3D. In Proceedings of the 27th International Conference on Concurrency Theory (CONCUR’16) (LIPIcs), Vol. 59. 3:1–3:14.Google Scholar
- Stefan Tilkov and Steve Vinoski. 2010. Node.js: Using JavaScript to build high-performance network programs. IEEE Internet Comput. 14, 6 (Nov. 2010), 80--83.Google ScholarDigital Library
- Blase Ur, Elyse McManus, Melwyn Pak Yong Ho, and Michael L. Littman. 2014. Practical trigger-action programming in the smart home. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI’14). 803--812.Google Scholar
- Qi Wang, Wajih Ul Hassan, Adam M. Bates, and Carl A. Gunter. 2018. Fear and logging in the Internet of Things. In Proceedings of the 25th Annual Network and Distributed System Security Symposium (NDSS’18).Google Scholar
- Benjamin Wester, James A. Cowling, Edmund B. Nightingale, Peter M. Chen, Jason Flinn, and Barbara Liskov. 2009. Tolerating latency in replicated state machines through client speculation. In Proceedings of the 6th USENIX Symposium on Networked Systems Design and Implementation (NSDI’09). 245--260.Google ScholarDigital Library
- Pamela Zave, Eric Cheung, and Svetlana Yarosh. 2015. Toward user-centric feature composition for the Internet of Things. CoRR abs/1510.06714 (2015).Google Scholar
Index Terms
- Transactuations: Where Transactions Meet the Physical World
Recommendations
Transactuations: where transactions meet the physical world
USENIX ATC '19: Proceedings of the 2019 USENIX Conference on Usenix Annual Technical ConferenceA large class of IoT applications read sensors, execute application logic, and actuate actuators. However, the lack of high-level programming abstractions compromises correctness especially in presence of failures and unwanted interleaving between ...
Versioned boxes as the basis for memory transactions
Special issue: Synchronization and concurrency in object-oriented languagesIn this paper, we propose the use of Versioned Boxes, which keep a history of values, as the basis for language-level memory transactions. Unlike previous work on software transactional memory, in our proposal read-only transactions never conflict with ...
A critique of snapshot isolation
EuroSys '12: Proceedings of the 7th ACM european conference on Computer SystemsThe support for transactions is an essential part of a database management system (DBMS). Without this support, the developers are burdened with ensuring atomic execution of a transaction despite failures as well as concurrent accesses to the database ...
Comments