Enabling Distributed Reconfiguration in an Actor Model

Total Page:16

File Type:pdf, Size:1020Kb

Enabling Distributed Reconfiguration in an Actor Model RICE UNIVERSITY Enabling Distributed Reconfiguration in an Actor Model by Arghya Chatterjee A Thesis Submitted in Partial Fulfillment of the Requirements for the Degree Master of Science Approved, Thesis Committee: Vivek Sarkar, Chair Professor of Computer Science E.D. Butcher Chair in Engineering Zoran Budimlić Senior Research Scientist Department of Computer Science Swarat Chaudhuri Associate Professor of Computer Science Lin Zhong Professor of Electrical and Computer Engineering Professor of Computer Science Houston, Texas April, 2017 ABSTRACT Enabling Distributed Reconfiguration in an Actor Model by Arghya Chatterjee The demand for portable mainstream programming models supporting scalable, reactive and versatile distributed computing is growing dramatically with the prolifer- ation of manycore/heterogeneous processors on portable devices and cloud computing clusters that can be elastically and dynamically allocated. With such changes, it’s be- coming extremely difficult for distributed software systems and applications to achieve scalability and programmability without complex coordination and synchronization patterns. In this dissertation, we address the dynamic reconfiguration challenges that arise in distributed implementations of the Selector Model. We focus on the Selector Model in this work because of its support for multiple guarded mailboxes, which enables the programmer to easily specify coordination patterns that are more general than those supported by the actor model. The contributions of this dissertation are demon- strated in two implementations of distributed selectors, one for distributed servers and another for distributed Android devices. Both implementations run on distributed JVMs and feature the automated bootstrap and global termination capabilities in- troduced in this dissertation. In addition, the distributed Android implementation supports dynamic joining and leaving of devices, which is also part of the dynamic reconfiguration capabilities introduced in this dissertation. To mom and dad, Debi and Jagannath Chatterjee. Acknowledgments Firstly, I would like to thank my thesis advisor, Prof. Vivek Sarkar, for his unwavering support and mentorship throughout this work. I owe him the greatest degree of appreciation for providing me the opportunity to be a part of the Habanero Extreme Scale Research group. I would also like to thank my thesis committee members; Vivek Sarkar, Zoran Budimlić, Swarat Chaudhuri and Lin Zhong, for their time, feedback and suggestions for improvements in my thesis. Zoran Budimlić, thank you for your continuous guidance throughout the last two years. It was a real pleasure working with you. I express my sincere gratitude to Prof. John Mellor-Crummey, Prof. Keith Cooper, and Prof. Linda Torczon. John’s Parallel Computing course (COMP 422), and, Keith and Linda’s Introduction to Compiler course (COMP 412), introduced me to the world of Parallel Programming and Compilers. I would like to thank all the members of the Habanero Extreme Scale Research Group for their feedback and support during the length of my time at Rice. I would especially like to thank my co-authors in the works presented in this thesis, Branko Gvoka, Shams Imam, Srđan Milaković and Bing Xue. I also thank the undergraduate researchers at Rice that I have been fortunate enough to mentor and work with, Ashok, Tom, Timothy, and Hunter. I would like to thank my friends for all the love and encouragement. Special thanks to Alexander, Alina, Ankush, Anwesha, Arvind, Belia, Deepak, Dragos, Jayvee, Kar- tik, Keliang, Kuldeep, Kumail, Lechen, Leo, Madhuparna, Melissa, Prasanth, Ra- bimba, Rishi, Rohan, Ryan Luna, Ryan Spring, Sarah, Simba, Srayan, Sriraj, Sugu- v man and Terry. I would also like to thank the administrative staff at the Computer Science De- partment at Rice University, who promptly helped me in various ways throughout the last three years. I am also thankful to the executive board members of the CS Graduate Student Association, and my role as the President of the CSGSA during 2015-2106 has been an incredible experience. Finally, I am indebted to my parents, Debi and Jagannath Chatterjee for their continuous support, unconditional love and encouragement. They stood by my side through all the difficult times. Love you both, and I hope I have made you proud. Thank you all !!! Contents Abstract ii Acknowledgments iv List of Illustrations viii 1 Introduction1 1.1 Motivation.................................1 1.2 Thesis Statement.............................5 1.3 Contributions...............................5 1.4 Organization...............................5 2 Background7 2.1 Habanero-Java Library (HJlib).....................7 2.2 Selector Model (SM)...........................7 2.2.1 Coordination and Synchronization patterns with the SM... 11 2.3 Distributed configuration in Akka and SALSA............. 18 2.4 Distributed Communication in Clusters and Mobile Platforms.... 23 3 Cluster Platform 27 3.1 HJDS Design............................... 27 3.2 Automatic Bootstrap........................... 32 3.3 Global Termination............................ 35 4 Android Platform 41 4.1 DAMMP Design............................. 41 vii 4.2 Dynamic Joining............................. 45 4.3 Dynamic Leaving............................. 48 5 Experimental Evaluation 53 5.1 Cluster based implementation (HJDS)................. 53 5.1.1 Hardware Setup.......................... 53 5.1.2 Benchmarks............................ 53 5.1.2.1 NQueens First K Solutions.............. 54 5.1.2.2 Pi Precision....................... 56 5.2 Android based implementation (DAMMP)............... 58 5.2.1 Hardware Setup.......................... 59 5.2.2 Benchmarks............................ 59 5.2.2.1 Trapezoidal Approximation.............. 59 5.2.2.2 Pi Precision....................... 61 6 Related Work 64 6.1 Akka.................................... 64 6.2 SALSA: Simple Actor Language, System and Architecture...... 65 6.3 AmbientTalk............................... 66 6.4 ActorDroid................................ 67 6.5 ActorNet.................................. 68 7 Conclusion & Future Work 70 7.1 Conclusion................................. 70 7.2 Future Work................................ 72 Bibliography 73 Illustrations 2.1 Sample HJlib program..........................8 2.2 Selector Model with multiple guarded mailboxes, local state and a message processing unit.........................9 2.3 Life cycle of a Selector instance..................... 11 2.4 Computation of a synchronous request-reply pattern using an Actor Model and a Selector Model....................... 13 2.5 Left: Complex implementation of the join pattern using the Actor Model. The Adder actor aggregates the data items from each of the three sources and sums them up. Right: Similar join pattern, using the Selector Model for the Adder. Each mailbox in the Adder corresponds to a sequence number. Sources send messages to the mailbox which matches the sequence number.............. 14 2.6 Using Selectors to solve the Join Pattern problem of Figure 2.5. The aggregator selector version: Adder Any Order maintains one mailbox for each source. For simplicity, we assume sources are identified by consecutive integers starting at 0.................... 16 2.7 Using Selectors to solve the Join Pattern problem of Figure 2.5. The aggregator selector version: Adder Round Robin maintains one mailbox for each source. For simplicity, we assume sources are identified by consecutive integers starting at 0............. 17 3.1 The Distributed Selector System..................... 28 ix 3.2 Proxy Actor forwarding messages to local selectors and remote selectors at each place. The underlying message forwarding protocol is transparent to the application programmer.............. 30 3.3 Sample configuration file, nodes are on Rice University’s DAVinCI cluster................................... 33 3.4 Bootstrap process of the Distributed Selector program......... 34 3.5 Stage 1: Termination process initiated when each of the remote nodes and the master node is in idle state.................... 36 3.6 Decomposition of the runtime and user-level view during the termination process. a) Before initiating the termination process(Stage 1) b) Places 1 and 2 are considered as ‘idle’ in this phase 37 3.7 Stage 2: Termination signal passed around the network in a conceptual place-ring fashion with the Master Place at the end of the sequence.................................. 38 3.8 Stage 3: Terminate all nodes. Send termination signal around the network in a conceptual place-ring fashion............... 40 4.1 Overview of the distributed selector system. On each hand-held device, we have a single selector system with the Mobile Communication Manager of each device exposed to the entire distributed network. All communications to external handheld devices are performed by the Mobile Communication Manager in the runtime................................... 43 4.2 Dynamic join protocol for new handheld devices............. 47 4.3 Showing the dynamic leaving of devices while calculating a trapezoidal approximation of the function. We start with one device, and join upto three devices. Each of the colors depict which device contributed to the computation of that trapezoid in the function... 51 x 5.1 NQueens : Shows strong scaling of computing the NQueens problem on a 17×17 board using the described algorithm. Workers compute solutions sequentially when given a partial solution with six placed queens. The number of workers per node
Recommended publications
  • Incorparating the Actor Model Into SCIVE on an Abstract Semantic Level
    Incorparating the Actor Model into SCIVE on an Abstract Semantic Level Christian Frohlich¨ ∗ Marc E. Latoschik† AI and VR Group, Bielefeld University AI and VR Group, Bielefeld University. ABSTRACT Since visual perception is very important for generating immer- sive environments, most VR applications focus on the graphical This paper illustrates the temporal synchronization and process flow simulation output. Tools like OpenGL Performer, Open Inven- facilities of a real-time simulation system which is based on the ac- tor [12], Open Scene Graph, OpenSG [11] or the VRML successor tor model. The requirements of such systems are compared against X3D [8] are based upon a hierarchical scene graph structure, which the actor model’s basic features and structures. The paper describes allows for complex rendering tasks. Extension mechanisms like how a modular architecture benefits from the actor model on the field routing or rapid prototyping via scipting interfaces allow for module level and points out how the actor model enhances paral- new customized node types and interconnected application graphs. lelism and concurrency even down to the entity level. The actor idea is incorporated into a novel simulation core for intelligent vir- Purpose-built VR application frameworks adopt and extend these mechanisms, by adding in- and output customization, see e.g. tual environments (SCIVE). SCIVE supports well-known and es- TM tablished Virtual Reality paradigms like the scene graph metaphor, Lightning [4], Avango [13], VR Juggler [3] or the CAVELib . field routing concepts etc. In addition, SCIVE provides an explicit Also network distribution paradigms are often integrated to enable semantic representation of its internals as well as of the specific distributed rendering on a cluster architecture, as can be seen in virtual environments’ contents.
    [Show full text]
  • Actor-Based Concurrency by Srinivas Panchapakesan
    Concurrency in Java and Actor- based concurrency using Scala By, Srinivas Panchapakesan Concurrency Concurrent computing is a form of computing in which programs are designed as collections of interacting computational processes that may be executed in parallel. Concurrent programs can be executed sequentially on a single processor by interleaving the execution steps of each computational process, or executed in parallel by assigning each computational process to one of a set of processors that may be close or distributed across a network. The main challenges in designing concurrent programs are ensuring the correct sequencing of the interactions or communications between different computational processes, and coordinating access to resources that are shared among processes. Advantages of Concurrency Almost every computer nowadays has several CPU's or several cores within one CPU. The ability to leverage theses multi-cores can be the key for a successful high-volume application. Increased application throughput - parallel execution of a concurrent program allows the number of tasks completed in certain time period to increase. High responsiveness for input/output-intensive applications mostly wait for input or output operations to complete. Concurrent programming allows the time that would be spent waiting to be used for another task. More appropriate program structure - some problems and problem domains are well-suited to representation as concurrent tasks or processes. Process vs Threads Process: A process runs independently and isolated of other processes. It cannot directly access shared data in other processes. The resources of the process are allocated to it via the operating system, e.g. memory and CPU time. Threads: Threads are so called lightweight processes which have their own call stack but an access shared data.
    [Show full text]
  • Liam: an Actor Based Programming Model for Hdls
    Liam: An Actor Based Programming Model for HDLs Haven Skinner Rafael Trapani Possignolo Jose Renau Dept. of Computer Engineering Dept. of Computer Engineering Dept. of Computer Engineering [email protected] [email protected] [email protected] ABSTRACT frequency being locked down early in the development process, The traditional model for developing synthesizable digital architec- and adds a high cost in effort and man-hours, to make high-level tures is a clock-synchronous pipeline. Latency-insensitive systems changes to the system. Although these challenges can be managed, are an alternative, where communication between blocks is viewed they represent fundamental obstacles to developing large-scale as message passing. In hardware this is generally managed by con- systems. trol bits such as valid/stop signals or token credit mechanisms. An alternative is a latency-insensitive design, where the system Although prior work has shown that there are numerous benefits is abstractly seen as being comprised of nodes, which communicate to building latency-insensitive digital hardware, a major factor dis- via messages. Synchronous hardware systems can be automatically couraging its use is the difficulty of managing the additional logic transformed to latency-insensitive designs, which we refer to as and infrastructure required to implement it. elastic systems [1–3]. Alternately, the designer can manually con- We propose a new programming paradigm for Hardware Descrip- trol the latency-insensitive backend [4, 5], we call such systems tion Languages, built on the Actor Model, to implicitly implement Fluid Pipelines. The advantage of exposing the elasticity to the latency-insensitive hardware designs. We call this model Liam, for designer is an increase in performance and flexibility in transforma- Latency-Insensitive Actor-based programming Model.
    [Show full text]
  • Ambient-Oriented Programming in Fractal
    Ambient-Oriented Programming in Fractal AleˇsPlˇsek, Philippe Merle and Lionel Seinturier Project ADAM LIFL, INRIA-Futurs, Universit´edes Sciences et Technologies de Lille (USTL), FRANCE, { plsek | merle | seinturi }@lifl.fr Abstract. Ambient-Oriented Programming (AmOP) comprises a suite of challenges that are hard to meet by current software development techniques. Although Component-Oriented Programming (COP) repre- sents promising approach, the state-of-the-art component models do not provide sufficient adaptability towards specific constraints of the Ambi- ent field. In this position paper we argue that merging AmOP and COP can be achieved by introducing the Fractal component model and its new feature : Component-Based Controlling Membranes. The proposed solution allows dynamical adaptation of component systems towards the challenges of the Ambient world. 1 Introduction Ambient-Oriented Programming (AmOP) [1] as a new trend in software devel- opment comprises a suite of challenges which are yet to be addressed fully. So far, only a few solutions facing the obstacles of ambient programming have been developed. In this paper we focus on AmbientTalk [1] since in our opinion it represents one of the most sophisticated solutions. Although AmbientTalk conceptually proposes a way to implement applica- tions for the ambient environment, this is achieved by defining a new program- ming language. Consequently, AmbientTalk potentially introduces a steep learn- ing curve for the developers. From this point of view, it is reasonable to search for an approach which uses well-known techniques and is powerful enough to face the obstacles of ambient programming. We believe that these requirements can be met by the introduction of Component-Based Software Engineering techniques.
    [Show full text]
  • Ambient-Oriented Programming in Ambienttalk
    Ambient-Oriented Programming in AmbientTalk Jessie Dedecker?, Tom Van Cutsem?, Stijn Mostinckx??, Theo D’Hondt, and Wolfgang De Meuter jededeck | tvcutsem | smostinc | tjdhondt | [email protected] Programming Technology Laboratory Vrije Universiteit Brussel, Belgium Abstract. A new field in distributed computing, called Ambient Intel- ligence, has emerged as a consequence of the increasing availability of wireless devices and the mobile networks they induce. Developing soft- ware for mobile networks is extremely hard in conventional programming languages because the network is dynamically demarcated. This leads us to postulate a suite of characteristics of future Ambient-Oriented Pro- gramming languages. A simple reflective programming language, called AmbientTalk, that meets the characteristics is presented. It is validated by implementing a collection of high level language features that are used in the implementation of an ambient messenger application . 1 Introduction Software development for mobile devices is given a new impetus with the advent of mobile networks. Mobile networks surround a mobile device equipped with wireless technology and are demarcated dynamically as users move about. Mo- bile networks turn isolated applications into cooperative ones that interact with their environment. This vision of ubiquitous computing, originally described by Weiser [38], has recently been termed Ambient Intelligence (AmI for short) by the European Council’s IST Advisory Group [12]. Mobile networks that surround a device have several properties that distin- guish them from other types of networks. The most important ones are that connections are volatile (because the communication range of wireless technol- ogy is limited) and that the network is open (because devices can appear and disappear unheraldedly).
    [Show full text]
  • Massachusetts Institute of Technology Artificial Intelligence Laboratory
    MASSACHUSETTS INSTITUTE OF TECHNOLOGY ARTIFICIAL INTELLIGENCE LABORATORY Working Paper 190 June 1979 A FAIR POWER DOMAIN FOR ACTOR COMPUTATIONS Will Clinger AI Laboratory Working Papers are produced for internal circulation, and may contain information that is, for example, too preliminary or too detailed for formal publication. Although some will be given a limited external distribution, it is not intended that they should be considered papers to which reference can be made in the literature. This report describes research conducted at the Artificial Intelligence Laboratory of the Massachusetts Institute of Technology. Support for this research was provided in part by the Office of Naval Research of the Department of Defense under Contract N00014-75-C-0522. O MASSAnuTsms INSTTUTE OF TECMGoOry FM DRAFT 1 June 1979 -1- A fair power domain A FAIR POWER DOMAIN FOR ACTOR COMPUTATIONS Will Clingerl 1. Abstract Actor-based languages feature extreme concurrency, allow side effects, and specify a form of fairness which permits unbounded nondeterminism. This makes it difficult to provide a satisfactory mathematical foundation for their semantics. Due to the high degree of parallelism, an oracle semantics would be intractable. A weakest precondition semantics is out of the question because of the possibility of unbounded nondeterminism. The most attractive approach, fixed point semantics using power domains, has not been helpful because the available power domain constructions, although very general, seemed to deal inadequately with fairness. By taking advantage of the relatively complex structure of the actor computation domain C, however, a power domain P(C) can be defined which is similar to Smyth's weak power domain but richer.
    [Show full text]
  • Actor Model of Computation
    Published in ArXiv http://arxiv.org/abs/1008.1459 Actor Model of Computation Carl Hewitt http://carlhewitt.info This paper is dedicated to Alonzo Church and Dana Scott. The Actor model is a mathematical theory that treats “Actors” as the universal primitives of concurrent digital computation. The model has been used both as a framework for a theoretical understanding of concurrency, and as the theoretical basis for several practical implementations of concurrent systems. Unlike previous models of computation, the Actor model was inspired by physical laws. It was also influenced by the programming languages Lisp, Simula 67 and Smalltalk-72, as well as ideas for Petri Nets, capability-based systems and packet switching. The advent of massive concurrency through client- cloud computing and many-core computer architectures has galvanized interest in the Actor model. An Actor is a computational entity that, in response to a message it receives, can concurrently: send a finite number of messages to other Actors; create a finite number of new Actors; designate the behavior to be used for the next message it receives. There is no assumed order to the above actions and they could be carried out concurrently. In addition two messages sent concurrently can arrive in either order. Decoupling the sender from communications sent was a fundamental advance of the Actor model enabling asynchronous communication and control structures as patterns of passing messages. November 7, 2010 Page 1 of 25 Contents Introduction ............................................................ 3 Fundamental concepts ............................................ 3 Illustrations ............................................................ 3 Modularity thru Direct communication and asynchrony ............................................................. 3 Indeterminacy and Quasi-commutativity ............... 4 Locality and Security ............................................
    [Show full text]
  • Computer Science (COM S) 1
    Computer Science (COM S) 1 COM S 105B: Short Course in Computer Programming: MATLAB COMPUTER SCIENCE (COM S) (2-0) Cr. 2. Any experimental courses offered by COM S can be found at: Prereq: Com S 104 registrar.iastate.edu/faculty-staff/courses/explistings/ (http:// 8-week course in programming using MATLAB. www.registrar.iastate.edu/faculty-staff/courses/explistings/) COM S 106: Introduction to Web Programming Courses primarily for undergraduates: (3-0) Cr. 3. F.S. Introduction to web programming basics. Fundamentals of developing COM S 101: Orientation web pages using a comprehensive web development life cycle. Learn Cr. R. F.S. to design and code practical real-world homepage programs and earn Introduction to the computer science discipline and code of ethics, Com adequate experience with current web design techniques such as HTML5 S courses, research and networking opportunities, procedures, policies, and cascading style sheets. Students also learn additional programming help and computing resources, extra-curricular activities offered by the languages including JavaScript, jQuery, PHP, SQL, and MySQL. Strategies Department of Computer Science and Iowa State University. Discussion for accessibility, usability and search engine optimization. No prior of issues relevant to student adjustment to college life. Offered on a computer programming experience necessary. satisfactory-fail basis only. Offered on a satisfactory-fail basis only. COM S 107: Windows Application Programming COM S 103: Computer Literacy and Applications (3-0) Cr. 3. F.S. Cr. 4. F.S.SS. Introduction to computer programming for non-majors using a language Introduction to computer literacy and applications. Literacy: Impact of such as the Visual Basic language.
    [Show full text]
  • A Model Based Realisation of Actor Model to Conceptualise an Aid for Complex Dynamic Decision-Making
    A Model based Realisation of Actor Model to Conceptualise an Aid for Complex Dynamic Decision-making Souvik Barat1, Vinay Kulkarni1, Tony Clark2 and Balbir Barn3 1Tata Consultancy Services Research, Pune, India 2Sheffield Hallam University, Sheffield, U.K. 3Middlesex University, London, U.K. {souvik.barat, vinay.vkulkarni}@tcs.com, [email protected], [email protected] Keywords: Organisational Decision Making, Simulation, Actor Model of Computation, Actor based Simulation. Abstract: Effective decision-making of modern organisation requires deep understanding of various aspects of organisation such as its goals, structure, business-as-usual operational processes etc. The large size and complex structure of organisations, socio-technical characteristics, and fast business dynamics make this decision-making a challenging endeavour. The state-of-practice of decision-making that relies heavily on human experts is often reported as ineffective, imprecise and lacking in agility. This paper evaluates a set of candidate technologies and makes a case for using actor based simulation techniques as an aid for complex dynamic decision-making. The approach is justified by enumeration of basic requirements of complex dynamic decision-making and the conducting a suitability of analysis of state-of-the-art enterprise modelling techniques. The research contributes a conceptual meta-model that represents necessary aspects of organisation for complex dynamic decision-making together with a realisation in terms of a meta model that extends Actor model of computation. The proposed approach is illustrated using a real life case study from business process outsourcing industry. 1 INTRODUCTION reports from leading consulting organisations such as McKinsey and Harvard Business Review (Kahneman Modern organisations constantly attempt to meet et al., 2011, Meissner et al.
    [Show full text]
  • CV Tom Van Cutsem (September 2019) 1 / 3 Jan
    Tom Van Cutsem Curriculum Vitae Personal Residence E-mail: [email protected] Leuven, Belgium Web: tvcutsem.github.io Linked-in: be.linkedin.com/in/tomvc Languages: Dutch (Mother Tongue), Twitter: @tvcutsem English (Fluent), French (Elementary) Education Oct. 2004 - May 2008: PhD in Computer Science, Vrije Universiteit Brussel, Greatest Distinction. • Doctoral dissertation: “Ambient references: object designation in mobile ad hoc networks”. Promotors: Prof. Dr. Wolfgang De Meuter, Prof. Dr. Theo D’Hondt. • My PhD contribution focused on mobile computing platforms (long before iOS and Android appeared). Our AmbientTalk language was featured in MIT Technology Review (http:// goo.gl/n0TGA), at droidcon.be 2011 in Brussels and covered in the Belgian techzine Datanews (http://goo.gl/B35V4x). Oct. 2000 - June 2004: Master of Science (MSc) in Computer Science, Vrije Universiteit Brussel, Greatest Distinction (GPA 18.76 / 20 or 93.8%). Valedictorian. Professional Experience Nov. 2016 - present: Department Head at Nokia Bell Labs Antwerp, Belgium • Led the transformation of a networks-focused research team into an AI research focused team, with breakthrough research in applying AI to software engineering. Built and open sourced an AI-based search engine for software libraries named Code Compass. • Thought leader on Nokia’s strategy to embrace Artificial Intelligence in research. Visibility at the level of Nokia CEO, CTO and Board of Directors. Feb. 2014 - Nov. 2016: Senior Researcher at Nokia Bell Labs Antwerp, Belgium • Architected and co-authored a distributed IoT stream processing platform ( world- widestreams.io ). Academic impact (ACM DEBS 2017 Best demo award) as well as business impact (successful transfer to business group with customer delivery).
    [Show full text]
  • Loosely-Coupled Distributed Reactive Programming in Mobile Ad Hoc Networks
    Loosely-Coupled Distributed Reactive Programming in Mobile Ad Hoc Networks Andoni Lombide Carreton, Stijn Mostinckx, Tom Van Cutsem, and Wolfgang De Meuter Software Languages Lab Vrije Universiteit Brussel, Pleinlaan 2 1050 Brussel, Belgium {alombide,smostinc,tvcutsem,wdmeuter}@vub.ac.be Abstract. Pervasive applications running on mobile ad hoc networks have to be conceived as loosely-coupled event-driven architectures be- cause of the dynamic nature of both the underlying network and the applications running on top of them. Such architectures can become te- dious to develop and understand when the number of events and event handlers increases. The reason is that the control flow of the application is driven by event handlers or callbacks which are triggered indepen- dently and are scattered throughout the application code. In this paper, we propose a number of language constructs that reconcile the elegant processing of events of a reactive programming system with the loose coupling of a publish/subscribe system that is required to cope with the dynamic nature of mobile ad hoc networks. Keywords: reactive programming, publish/subscribe, event-driven pro- gramming, mobile ad hoc networks. 1 Introduction Pervasive applications running in mobile ad hoc networks cannot be structured as monolithic programs which accept a fixed input and compute it into some output. Instead, to allow responsiveness to changes in the dynamically changing mobile ad hoc network, programming paradigms targeting pervasive applications propose the adoption of event-driven architectures [1,2,3,4]. The traditional way of conceiving an event-driven system in a setting where producers and consumers change at runtime is by adopting a publish/subscribe architecture, where event producers publish events and event consumers sub- scribe and react to events, either using a topic-based or content-based subscrip- tion [5,6].
    [Show full text]
  • An Evaluation of Interaction Paradigms for Active Objects
    An Evaluation of Interaction Paradigms for Active Objects Farzane Karami, Olaf Owe, Toktam Ramezanifarkhani Department of Informatics, University of Oslo, Norway Abstract Distributed systems are challenging to design properly and prove correctly due to their heterogeneous and distributed nature. These challenges depend on the programming paradigms used and their semantics. The actor paradigm has the advantage of offering a modular semantics, which is useful for composi- tional design and analysis. Shared variable concurrency and race conditions are avoided by means of asynchronous message passing. The object-oriented paradigm is popular due to its facilities for program structuring and reuse of code. These paradigms have been combined by means of concurrent objects where remote method calls are transmitted by message passing and where low- level synchronization primitives are avoided. Such kinds of objects may exhibit active behavior and are often called active objects. In this setting the concept of futures is central and is used by a number of languages. Futures offer a flexible way of communicating and sharing computation results. However, futures come with a cost, for instance with respect to the underlying implementation support, including garbage collection. In particular this raises a problem for IoT systems. The purpose of this paper is to reconsider and discuss the future mechanism and compare this mechanism to other alternatives, evaluating factors such as expressiveness, efficiency, as well as syntactic and semantic complexity including ease of reasoning. We limit the discussion to the setting of imperative, active objects and explore the various mechanisms and their weaknesses and advan- tages. A surprising result (at least to the authors) is that the need of futures in this setting seems to be overrated.
    [Show full text]