Distributed Application Architecture
Total Page:16
File Type:pdf, Size:1020Kb
Mobile Agents as a Distributed Application Architecture Remco Slotboom Master thesis for completion of a degree in Business Informatics at the Erasmus University Rotterdam. Supervision by Dr. Ir. Jan van den Berg and Drs. Mark Polman. Supported by Cambridge Technology Partners. Copyright statement Copyright © 2000 Remco Slotboom. All rights reserved. This document is provided “as is”, without warranty of any kind. Company and product names mentioned in this document may be claimed as trademarks by their respective companies. Contact information Remco Slotboom Ellemare 193 3085 JR Rotterdam, The Netherlands. Email: [email protected] Student number: 126801 Table of Contents Preface................................................................................VII How this thesis came to be...................................................... VII A word of thanks.................................................................... VIII CHAPTER 1 Introduction............................................................1 1.1 Executive summary .................................................... 1 1.2 Motivation.................................................................. 2 1.3 Goals......................................................................... 3 1.4 Chapter outline........................................................... 3 CHAPTER 2 Agents.....................................................................5 2.1 Agent according to the dictionary................................. 5 2.2 Why agents are important ........................................... 7 2.3 Software agents ......................................................... 7 2.4 The importance of autonomy....................................... 8 2.5 Roles for agents......................................................... 8 2.5.1 Agent as an autonomous entity............................................................. 8 2.5.2 Agent monitoring input........................................................................ 9 2.5.3 Agent controlling something................................................................. 9 2.5.4 Agent providing a service ..................................................................... 9 2.5.5 Agent helping a user ........................................................................... 10 2.5.6 Agent representing someone or something ......................................... 10 2.6 Agents in depth.........................................................10 2.6.1 An agent and its environment............................................................. 10 2.6.2 State................................................................................................... 12 2.6.3 Reactive and proactive........................................................................ 12 Table of Contents I 2.6.4 Inside an agent.................................................................................... 12 2.6.5 Agent cycle......................................................................................... 14 2.6.6 Multi-agent systems............................................................................ 15 2.6.7 The lifetime of an agent...................................................................... 15 2.7 Agents: a different model of computing .......................15 2.8 Types of agents ........................................................16 2.8.1 Intelligent agents................................................................................ 16 2.8.2 Mobile agents..................................................................................... 17 2.8.3 Social agents....................................................................................... 17 2.9 Inter-agent communication.........................................18 2.10 Sample agent applications .........................................19 2.11 Conclusion................................................................22 CHAPTER 3 Intelligent agents.................................................25 3.1 Rationality.................................................................26 3.2 Beliefs, desires, intentions..........................................26 3.2.1 A rational BDI agent .......................................................................... 32 3.2.2 Stacking BDI layers ............................................................................ 32 3.3 Emotional agents ......................................................33 3.4 Adaptive agents ........................................................34 3.5 Conclusion................................................................36 CHAPTER 4 Modelling and agents .........................................37 4.1 UML .........................................................................38 4.2 A crash course in OO terminology ..............................39 4.2.1 State and behaviour............................................................................ 39 4.2.2 Class ................................................................................................... 39 4.2.3 Methods and attributes....................................................................... 39 4.2.4 Abstraction......................................................................................... 40 4.2.5 Encapsulation..................................................................................... 40 4.2.6 Inheritance ......................................................................................... 40 4.2.7 Polymorphism .................................................................................... 41 4.2.8 Association......................................................................................... 41 4.3 Use cases.................................................................41 4.3.1 Use case diagram ................................................................................ 42 4.3.2 Conditional statements and inclusion ................................................. 43 4.4 Class Diagram...........................................................45 4.4.1 Inheritance and aggregation................................................................ 47 4.4.2 Stereotypes......................................................................................... 47 4.5 Sequence diagram ....................................................48 4.5.1 Message types ..................................................................................... 50 4.5.2 Object construction and destruction................................................... 52 II Mobile Agents as a Distributed Application Architecture 4.6 State Diagram ...........................................................53 4.7 Other diagrams .........................................................55 4.8 Object oriented programming.....................................55 4.9 Using agents in modelling..........................................56 4.9.1 The system actor................................................................................. 56 4.9.2 Agents as actors.................................................................................. 57 4.9.3 Different system types........................................................................ 59 4.10 Animate objects ........................................................59 4.10.1 Introducing animate objects............................................................... 59 4.10.2 Class diagrams and animate objects.................................................... 61 4.10.3 Sequence diagrams and animate objects.............................................. 61 4.10.4 Objects in different environments...................................................... 68 4.10.5 Animate objects in software ............................................................... 69 4.10.6 Agents as animate objects................................................................... 72 4.10.7 Agents and state................................................................................. 73 4.11 Conclusion................................................................73 CHAPTER 5 Mobile agent paradigm.......................................77 5.1 Distributed Computing ...............................................77 5.1.1 Advantages of distributed computing ................................................. 78 5.1.2 Issues with distributed computing ...................................................... 79 5.1.3 Network communication.................................................................... 80 5.1.4 Distributing a computation................................................................. 80 5.1.5 Security.............................................................................................. 81 5.1.6 Guidelines for building distributed applications.................................. 82 5.2 Modelling a distributed application ..............................83 5.3 Paradigms for distributed computing...........................84 5.3.1 Distributed objects............................................................................. 84 5.3.2 Agents................................................................................................ 86 5.3.3 Mobile code........................................................................................ 88 5.3.4 Mobile objects.................................................................................... 90 5.4 The mobile agent paradigm........................................91 5.4.1 Interaction model..............................................................................