skip to main content
research-article

Transactuations: Where Transactions Meet the Physical World

Published:30 May 2020Publication History
Skip Abstract Section

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.

References

  1. Amazon AWS Lambda. [n.d.]. Retrieved from https://aws.amazon.com/lambda/.Google ScholarGoogle Scholar
  2. Arrow functions. [n.d.]. Retrieved from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions.Google ScholarGoogle Scholar
  3. AWS Lambda Retry Behavior. [n.d.]. Retrieved from https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html.Google ScholarGoogle Scholar
  4. 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 ScholarGoogle Scholar
  5. Bluetooth Low Energy. [n.d.]. Retrieved from https://www.bluetooth.com.Google ScholarGoogle Scholar
  6. CO2 Vent. [n.d.]. Retrieved from https://github.com/SmartThingsCommunity/SmartThingsPublic/tree/master/smartapps/dianoga/co2-vent.src.Google ScholarGoogle Scholar
  7. Count Lines of Code. [n.d.]. Retrieved from http://cloc.sourceforge.net.Google ScholarGoogle Scholar
  8. Expressions. [n.d.]. Retrieved from https://docs.python.org/2/reference/expressions.html.Google ScholarGoogle Scholar
  9. 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 ScholarGoogle Scholar
  10. Inconsistent Behavior. [n.d.]. Retrieved from https://community.smartthings.com/t/inconsistent-behavior/35284.Google ScholarGoogle Scholar
  11. IoTBench-test-suite. [n.d.]. Retrieved from https://github.com/IoTBench/IoTBench-test-suite/tree/master/openHAB.Google ScholarGoogle Scholar
  12. Lambda Expressions. [n.d.]. Retrieved from https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html.Google ScholarGoogle Scholar
  13. OpenHAB: Empowering the Smart Home. [n.d.]. Retrieved from https://www.openhab.org.Google ScholarGoogle Scholar
  14. Raspberry Pi 3 Model B. [n.d.]. Retrieved from https://www.raspberrypi.org/products/raspberry-pi-3-model-b/.Google ScholarGoogle Scholar
  15. SmartThings. [n.d.]. Retrieved from http://www.smartthings.com/.Google ScholarGoogle Scholar
  16. 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 ScholarGoogle Scholar
  17. 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 ScholarGoogle Scholar
  18. Z-Wave Alliance. [n.d.]. Retrieved from http://www.z-wavealliance.org.Google ScholarGoogle Scholar
  19. ZigBee Alliance. [n.d.]. Retrieved from http://www.zigbee.org/.Google ScholarGoogle Scholar
  20. 2018. Web Services SmartThings. Retrieved from https://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/index.html.Google ScholarGoogle Scholar
  21. 2019. SmartThings Smart Apps. Retrieved from https://github.com/SmartThingsCommunity/SmartThingsPublic/tree/master/smartapps.Google ScholarGoogle Scholar
  22. 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 ScholarGoogle Scholar
  23. 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 ScholarGoogle Scholar
  24. 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 ScholarGoogle Scholar
  25. Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy. 2001. A simple, fast dominance algorithm. CS Technical Report 06-33870, Rice University.Google ScholarGoogle Scholar
  26. 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 ScholarGoogle Scholar
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle Scholar
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle Scholar
  32. 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 ScholarGoogle Scholar
  33. Pat Helland and Dave Cambell. 2009. Building on quicksand. In Proceedings of the 4th Conference on Innovative Data Systems Research (CIDR’09).Google ScholarGoogle Scholar
  34. 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 ScholarGoogle Scholar
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle Scholar
  37. 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 ScholarGoogle Scholar
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle Scholar
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. 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 ScholarGoogle Scholar
  45. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  46. 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 ScholarGoogle Scholar
  47. 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 ScholarGoogle Scholar
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  49. 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 ScholarGoogle Scholar
  50. 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 ScholarGoogle Scholar
  51. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  52. Pamela Zave, Eric Cheung, and Svetlana Yarosh. 2015. Toward user-centric feature composition for the Internet of Things. CoRR abs/1510.06714 (2015).Google ScholarGoogle Scholar

Index Terms

  1. Transactuations: Where Transactions Meet the Physical World

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM Transactions on Computer Systems
          ACM Transactions on Computer Systems  Volume 36, Issue 4
          Section: Best of ATC 2019 and Regular Paper
          November 2018
          115 pages
          ISSN:0734-2071
          EISSN:1557-7333
          DOI:10.1145/3394910
          Issue’s Table of Contents

          Copyright © 2020 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 30 May 2020
          • Online AM: 7 May 2020
          • Accepted: 1 January 2020
          • Received: 1 October 2019
          Published in tocs Volume 36, Issue 4

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
          • Research
          • Refereed

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        HTML Format

        View this article in HTML Format .

        View HTML Format