This paper is about reconciling the highly asynchronous untimed interactions that prevail on the Internet with time-sensitive operations of Things in the Internet of Things (IoT). Specifically, this paper addresses a design pattern that is widely used on the Internet called asynchronous atomic callbacks (AAC). We show that it is possible and practical to endow AACs with temporal semantics that can make system behaviors more repeatable and testable and can make the interactions between cyber services and physical Things safer. We show how a well-defined notion of logical time is compatible with AAC and can be used to endow applications with semantic notions of simultaneity, give them more control over the ordering of events, and enable the specification of real-time behaviors that nevertheless recognize the often long and highly variable latencies introduced in the Internet. We introduce labeled logical clock domains (LLCDs), which permit arbitrary mixtures of synchronized and unsynchronized behaviors and we show how LLCDs can be realized in the JavaScript language, which is widely used in Internet applications. We give a formal model for LLCDs and an execution algorithm that is compatible with standard JavaScript engines.




Download Full History