Model-Driven Development of Distributed Systems in Umple
Total Page:16
File Type:pdf, Size:1020Kb
Model-Driven Development of Distributed Systems in Umple Amid Zakariapour A thesis submitted in partial fulfillment of the requirements for the degree of Masters of Computer Science University of Ottawa Ottawa, Ontario, Canada January 2018 © Amid Zakariapour, Ottawa, Canada, 2018 Abstract Model-driven software development can help tackle complexity when developing large software systems. Model-driven development tools facilitate this. Such tools support multiple features and languages; some are multi-platform and support multi-language code generation from models. Umple is a full-featured open source language and modelling tool that we used as a basis for this thesis. Distribution concerns have become a critical part of modern software systems. In this thesis, we present how we extended Umple to support the development of model-driven synchronous or asynchronous distributed systems. Our contributions provide simple syntax, model analysis capabilities, and programming APIs, which allow users to change the configuration of systems both at development and deployment stages. We also demonstrate how a system can be modeled without distribution concerns and easily be transformed to a distributed system through our approach. The contributions of this thesis are: a) Creating a mechanism to distribute objects in Umple; b) Developing new semantics for modelling of distributed objects and providing supporting syntax for this in Umple; c) Investigating different patterns and technologies to implement code generation for distributed systems; d) Implementation, testing, and comparison of the distributed feature in Umple for executable Java code; and e) implementing a mechanism to dynamically modify the distribution plan at runtime. ii Acknowledgement Firstly, I would like to thank my supervisor Dr. Gregor Von Bochmann for his guidance, financial support and technical support throughout my Master’s studies. I would also want to express my sincere gratitude to my head supervisor Dr. Timothy C. Lethbridge. His support, and assistance and guidance during my M.Sc thesis shaped my view on software engineering and research. I would also like to thank my research team, Complexity Reduction Software Engineering (CRuiSE), and my colleagues, especially Dr. Vahdat Abdelzad. I also thank my family, specially my father and my mother for helping me both morally and financially during my studies. Their unconditional support and encouragement helped me be strong and endure all the challenges. iii Table of Contents Abstract ............................................................................................................................................... ii Acknowledgement ............................................................................................................................. iii Table of Contents .............................................................................................................................. iv Table of Figures ................................................................................................................................ vii Table of Tables .................................................................................................................................. ix Table of Snippets ................................................................................................................................ x 1 Introduction ................................................................................................................................ 1 1.1 Some definitions ............................................................................................................................. 2 Node ........................................................................................................................................ 2 Synchronous method call: ....................................................................................................... 2 Asynchronous method call: ..................................................................................................... 2 Real Object .............................................................................................................................. 3 Implementation class ............................................................................................................... 3 Proxy Object, Proxy Class ....................................................................................................... 3 Remote class, Remote Objects ................................................................................................ 3 1.2 Goals of the Thesis ......................................................................................................................... 3 1.3 Research Questions ........................................................................................................................ 4 1.4 Outline of the Thesis ...................................................................................................................... 4 2 Background................................................................................................................................. 6 2.1 Umple: A Model-Oriented Programming Language .................................................................. 6 Classes ..................................................................................................................................... 8 Interfaces ............................................................................................................................... 12 Active objects ........................................................................................................................ 13 State machines ....................................................................................................................... 14 Aspect Orientation ..................................................................................................................... 17 Traits .......................................................................................................................................... 19 Mixins ........................................................................................................................................ 20 Tracing ....................................................................................................................................... 21 Umple Grammar .................................................................................................................... 22 2.2 Tools for Creating Distributed Applications ............................................................................. 23 Direct Network Communication ........................................................................................... 24 Message Passing .................................................................................................................... 25 Remote Procedure Call (RPC)............................................................................................... 25 Distributed shared memory (DSM) ....................................................................................... 27 2.3 Model-driven Development Tools ............................................................................................... 27 2.4 Distributed Objects systems with Java code generation ........................................................... 28 Do! ......................................................................................................................................... 28 JavaParty ............................................................................................................................... 29 Fargo ...................................................................................................................................... 30 J-orchestra ............................................................................................................................. 31 Pangea ................................................................................................................................... 31 JavaSymphony ....................................................................................................................... 32 Java// ...................................................................................................................................... 33 2.5 Comparison to similar technologies ........................................................................................... 33 iv 3 Semantics and syntax of Distributed systems in Umple ....................................................... 36 3.1 Distributable objects .................................................................................................................... 39 Distributable Classes ............................................................................................................. 39 Distributable interfaces .......................................................................................................... 40 3.2 Object Placement ......................................................................................................................... 40 Runtime components ............................................................................................................. 41 Configuration File ................................................................................................................