Workshop on Mechatronic Multiagent Systems

Size: px
Start display at page:

Download "Workshop on Mechatronic Multiagent Systems"

Transcription

1 Workshop on Mechatronic Multiagent Systems UNINOVA, Caparica 15th Feb 2011 Luis Ribeiro José Barata André Cavalcante Rogério Rosa

2 Agenda for today Morning - Theoretical Background 9h00-10h30 Advanced JADE Aspects JADE complex behaviours 10h30 - Break 11h00-11h30 JADE communication behaviours 12h30 - Lunch Afternoon - Practical Exercises 2h00-3h30 Implementation of FIPA communication Protocols Implementation of Complex Behaviours 3h30 - Break 4h00-6h30 Implementation of Complex Behaviours Implementation of Agents in the COMBO controllers (control of a mechatronic setup) 6h30 - End of the Second Day

3 Advanced JADE Aspects

4 The force and the dark side of JADE All currently supported Platforms are JAVA based Cross platform interoperability. Performance JADE normally outperforms other platforms. The Source has endured years of optimization. Support JADE is extensively documented. JADE has a hyperactive mailing list. Ease of Use The API is well documented and easy to use There are several extensions for JADE that foster interoperability and integration with other platforms and technologies.

5 Yesterday... We have seen how we can write and execute behaviours: Behaviour Simple Behaviour OneShot Behaviour Waker Behaviour Cyclice Behaviour Ticker Behaviour And how to explore simple behaviours to establish more complex and rich response. Stepped behaviours (kind of a FSM) Behaviours inside behaviours

6 Yet... How does exactly this execution happens? How are the behaviours scheduled? Why can t we have blocking code inside a behaviour?

7 Some NOTES ON BEHAVIOUR SCHEDULING

8 Agent Thread Path Of Execution From the JADE documentation.

9 Agent Scheduler JADE provides " Support to the execution of multiple, parallel and concurrent agent activities via the behaviour model. JADE schedules the agent behaviours in a nonpreemptive fashion. From the JADE documentation. JADE never shifts contextually from one process to another, instead each behaviour is scheduled for execution in a round-robin fashion.

10 Behaviours Revisited

11 A little bit more complicated in fact Behaviours can be blocked. JADE uses two queues to manage behaviours the ready behaviours queue and the blocked behaviours queue. The scheduler operates in the ready behaviours queue The addbehaviour method puts it on the ready behaviours queue. Blocked behaviours are executed again if: a message is received, the behaviour is manualy restarted, block times out...

12 The problem of Blocking Code Remember Round-Robin non-preemptive The next scheduled behaviour can only execute after the done function in the current behaviour returns anything... While(true) here or While(true) here Block the Agent Forever

13 Some performance issues too Sometimes is better to use smaller and more behaviours that a few complicated behaviours. If we can break-up a task into smaller pieces it may allow the agent to switch faster between the behaviours (processing more parallely ).

14 COMPLEX BEHAVIOURS

15 Some Revision Work First... From: Developing Multiagent System With JADE, Willey, 2007

16 Composite Behaviours Are complex behaviours that execute subbehaviours according to some specific scheduling policy. The scheduling policy normally dictates when the composite behaviour ends. The composite behaviour controls whether some of its sub-behaviours are blocked or running.

17 Sequential Behaviour Is a composite behaviour that schedules the execution of its sub-behaviours sequentially. The first child is executed. Once its done method returns true the second child is executed...until the last. One can add a child behaviour using the method addsubbehaviour. Once the last child returns TRUE the Sequential Behaviour ends (Done function returns TRUE)

18 Sequential Behaviour Normally one does not extend a sequential behaviour. Typicall usage is as follows: public class Agent extends jade.core.agent protected void setup() { SequentialBehaviour sb = new SequentialBehaviour(this); sb.addsubbehaviour(new BasicSimpleBehaviour()); protected void takedown() { super.takedown(); We cannot obviously add Cyclic Behaviours as childs

19 FSM Behaviour Is a composite behaviour that schedules the execution of its sub-behaviours as a finite state machine where the states are the subbehaviours One can add child behaviours and state transitions The FSM behaviour checks the transition table to verify when it should end (after the execution of the last state)

20 FSM Behaviour Normally one does not extend a FSM behaviour. Typicall usage is as follows: protected void setup() { FSMBehaviour fsm = new FSMBehaviour(this); fsm.registerfirststate(new BasicSimpleBehaviour(), "A"); fsm.registerstate(new BasicSimpleBehaviour(), "B"); fsm.registerlaststate(new BasicSimpleBehaviour(), "C"); fsm.registerdefaulttransition("a", "B"); fsm.registertransition("b", "C", 1); We cannot obviously add Cyclic Behaviours as childs

21 Parallel Behaviour Is a composite behaviour that schedules the execution of its sub-behaviours in parallel. Remember that parallel in JADE = Cooperative non preemptive The ending condition can be when all the child-behaviours have finished the execution or one any finishes.

22 Parallel Behaviour Normally one does not extend a Parallel behaviour. Typicall usage is as follows: protected void setup() { ParallelBehaviour pb = new ParallelBehaviour(ParallelBehaviour.WHEN_ANY); pb.addsubbehaviour(new BasicSimpleBehaviour()); pb.addsubbehaviour(new BasicSimpleBehaviour()); There is a subtle but very relevant difference between a Parallel Behaviour and a Sequential Behaviour

23 Threaded Behaviour Any behaviour can be wrapped as a threaded behaviour and evade the non-preemptive logic of JADE. However special attention needs to be directed to thread behaviours as they evade as well most JADE standard termination procedures. Very often context switching is slower than the cooperative switching. Threaded behaviours should be used carefully and their potential performance gain (if any) properly assessed. Also proper synchronization must be used.

24 About Behaviours in general We can make any composition of behaviours so as to achieved the desired level of functionality in the system This of course means that we are free to combine composite with simple behaviours or/and any extension of those. Composite behaviours however are not, normally, to be extended.

25 Leaving the Agent Scope... INTERACTION WITH THE PLATFORM

26 How does an Agent know... About the available services in the Platform? How it can update its services offer? About the status of other agents in the platform with which it may be interacting?

27 Yellow Pages Service (Directory Facilitator) From: Developing Multiagent System With JADE, Willey, 2007

28 DF Service Registration static public void RegisterInDF(Agent agenttobereguistered, Skill[] skills) { DFAgentDescription dfd = new DFAgentDescription(); dfd.setname(agenttobereguistered.getaid()); for (int i = 0; i < skills.length; i++) { ServiceDescription sd = new ServiceDescription(); sd.settype(skills[i].gettype()); sd.setname(skills[i].getname()); sd.addproperties(new Property(skills[i].getName(), skills[i].tostring())); dfd.addservices(sd); try { DFService.register(agentToBeRegistered, dfd); catch (FIPAException fe) { fe.printstacktrace(); Registration of the type and Name of a Service

29 DF Finding About Services static public DFAgentDescription[] FindAgents(Agent agentowner, String servicename, String servicetype) { DFAgentDescription[] agents = null; DFAgentDescription ad = new DFAgentDescription(); ServiceDescription sd = new ServiceDescription(); sd.settype(servicetype); sd.setname(servicename); ad.addservices(sd); try { agents = DFService.search(agentOwner, ad); catch (FIPAException ex) { agents = null; Logger.getLogger(Agent.class.getName()).log(Level.SEVERE, null, ex); return agents; The sort of service the agent is looking for

30 Agent Management System AMSSubscriber myamssubscriber = new AMSSubscriber() { protected void installhandlers(map handlers) { // Associate an handler to born-agent events EventHandler creationshandler = new EventHandler() { public void handle(event ev) { BornAgent ba = (BornAgent) ev; System.out.println("Born agent " + ba.getagent().getname()); ; handlers.put(introspectionvocabulary.bornagent, creationshandler); // Associate an handler to dead-agent events EventHandler terminationshandler = new EventHandler() { ; public void handle(event ev) { DeadAgent da = (DeadAgent) ev; System.out.println("Dead agent " + da.getagent().getname()); agenttoskillmappingcontrol.removeskillsby(da.getagent()); ; handlers.put(introspectionvocabulary.deadagent, terminationshandler); Event Fired when a new agent is plugged on the Platform Event Fired when a new agent is taken from the Platform

31 Summing Up... So far we know how to: Define an agent behaviour (from the very simple to the very complex) Interact with the platform to address changes of state (loss and addition of functionalities in the System) NEXT STEP Have the agents communicating to explore the potential of group interaction

32 BREAK

33 Communication Concepts and Behaviours

34 Yesterday... ACL - FIPA From An Introduction to MultiAgent Systems by Michael Wooldridge, John Wiley & Sons, 2002

35 FIPA Request Interaction Protocol

36 FIPA Contract Net Interaction Protocol

37 Exceptions to both Protocols

38 Auctionning Interactions

39 The JADE Packages we will be interested in... JADE implements most of the FIPA interaction protocols in jade.proto package. Each side of the communication is assigned a behaviour (Initiator and Receiver) These behaviours automatically implement the communication protocol therefore we only have to decide how to handle the message handlers...

40 JADE only implements the following: AchieveREInitiator This is a single homogeneous and effective implementation of all the FIPA-Request-like interaction protocols defined by FIPA, that is all those protocols where the initiator sends a single message (i.e. it performs a single communicative act) within the scope of an interaction protocol in order to verify if the RE (Rational Effect) of the communicative act has been achieved or not. AchieveREResponder This is a single homogeneous and effective implementation of all the FIPA-Request-like interaction protocols defined by FIPA, that is all those protocols where the initiator sends a single message (i.e. it performs a single communicative act) within the scope of an interaction protocol in order to verify if the RE (Rational Effect) of the communicative act has been achieved or not. ContractNetInitiator ContractNetResponder IteratedAchieveREInitiator ProposeInitiator ProposeResponder SimpleAchieveREInitiator SimpleAchieveREResponder This class implements the Fipa-Contract-Net interaction protocol with an API similar and homogeneous to AchieveREInitiator. Behaviour class for fipa-contract-net Responder role. This class implements the initiator role in the iterated version of fipa-request like interaction protocols. This class implements the Fipa-Propose interaction protocol with an API similar and homogeneous to AchieveREInitiator. Behaviour class for fipa-propose Responder role. This is simple implementation of the AchieveREInitiator. This is a single homogeneous and effective implementation of all the FIPA-Request-like interaction protocols defined by FIPA, that is all those protocols where the initiator sends a single message (i.e. it performs a single communicative act) within the scope of an interaction protocol in order to verify if the RE (Rational Effect) of the communicative act has been achieved or not. SSContractNetResponder SSIteratedAchieveREResponder SSIteratedContractNetResponder SSResponderDispatcher SubscriptionInitiator SubscriptionResponder SubscriptionResponder.Subscriptio n Single Session version of the Responder role in the Fipa-Contract-Net protocol. Single Session version of the Responder role in the Iterated-Fipa-Request protocol. This behaviour is designed to be used together with the Single-Session responder protocol classes. This is a single homogeneous and effective implementation of the initiator role in all the FIPA-Subscribe-like interaction protocols defined by FIPA, that is all those protocols where the initiator sends a single "subscription" message and receives notifications each time a given condition becomes true. This is a single homogeneous and effective implementation of the responder role in all the FIPA-Subscribe-like interaction protocols defined by FIPA, that is all those protocols where the initiator sends a single "subscription" message and receives notifications each time a given condition becomes true. Inner calss Subscription This class represents a subscription.

41 Lets go for some examples... private class InitiatorBehaviour extends AchieveREInitiator { public InitiatorBehaviour(Agent ag, ACLMessage msg) { super(ag, protected void handleagree(aclmessage agreemsg) { System.out.println("HANDLING AGREE MESSAGE ###################################"); Initiator side of the REQUEST protected void handleinform(aclmessage informmsg) { System.out.println("HANDLING INFORM MESSAGE ###################################"); String result = protected void handlerefuse(aclmessage refusemsg) { System.out.println("HANDLING REFUSE MESSAGE ###################################");

42 Now the Responder Side private class ResponderBehaviour extends AchieveREResponder { public ResponderBehaviour(Agent agent, MessageTemplate template) { super(agent, protected ACLMessage handlerequest(aclmessage requestmsg) { System.out.println("HANDLING REQUEST MESSAGE ###################################"); ACLMessage response = requestmsg.createreply(); response.setperformative(aclmessage.agree); response.setcontent("i know the operation therefore I agree to compute it"); return protected ACLMessage prepareresultnotification(aclmessage requestmsg, ACLMessage response) { ACLMessage inform = requestmsg.createreply(); inform.setperformative(aclmessage.inform); inform.setcontent("done"); return inform;

43 public class CNETInit extends ContractNetInitiator { public CNETInit(Agent a, ACLMessage cfp) { super(a, protected void handleallresponses(vector responses, Vector acceptances) { super.handleallresponses(responses, protected void handleallresultnotifications(vector resultnotifications) { protected void handleinform(aclmessage inform) { protected void handlepropose(aclmessage propose, Vector acceptances) { super.handlepropose(propose, protected void handlerefuse(aclmessage refuse) { super.handlerefuse(refuse); Contract Net Initiator

44 public class CNETResponder extends ContractNetResponder { public CNETResponder(Agent a, MessageTemplate mt) { super(a, protected ACLMessage handleacceptproposal(aclmessage cfp, ACLMessage propose, ACLMessage accept) throws FailureException { return super.handleacceptproposal(cfp, propose, protected ACLMessage handlecfp(aclmessage cfp) throws RefuseException, FailureException, NotUnderstoodException { return protected ACLMessage prepareresultnotification(aclmessage cfp, ACLMessage propose, ACLMessage accept) throws FailureException { return super.prepareresultnotification(cfp, propose, accept); Contract Net Responder

45 Important Note... The contract Net Responder and the Request Responder are composite Behaviours. In particular FSM behaviours (FSM scheduling applies). This also means that other behaviours can execute between each communication step.

46 About Agent Messages Receiving a Message is an important event for an Agent. For instance receiving a message causes an agent to execute blocked behaviours. The Agent Message queue is not Unlimted by default

47 Some more Advanced NOTES ON WAKER AND TICKER BEHAVIOURS

48 Recurring Actions If we need a recurring action every n miliseconds we can solve a problem with a Ticker Behaviour. What if we need to have two actions one x miliseconds after the other?

49 Recurring Actions We may feel inclined to do the following: SequentialBehaviour seq = new SequentialBehaviour(); seq.addsubbehaviour( new WakerBehaviour( 250 ms)...); seq.addsubbehaviour( <... OneShot to Print Msg 1...> ); seq.addsubbehaviour( new WakerBehaviour( 500 ms)...); seq.addsubbehaviour( <... OneShot to Print Msg 2...> ); addbehaviour( seq ); Which will not work because the waking time is computed from the moment a behaviour is created and not from the moment it is set for execution. From:

50 Also... The same result would be achieved with the following simplified code: From:

51 What we need is to... Make sure the second waker behaviour is created precisely after the first executes: From:

52 Some NOTES on DEBUGGING

53 Remote Monitoring Agent

54 Sniffer Agent

55 Introspection Agent

56 DF Gui

57 Some bad news... Some of these tools do not work properly when we consider the interaction between the PC and COMBO. Also the CDC JAVA profile does not implement the List interface which among other things implies that we cannot use: LinkedLists, ArrayLists,... Object creation ia also relatively performance expensive in CDC so be carefull about printouts

58 What s next... Lunch And Hands on Exercises (After lunch)

Programming Agents with JADE for Multi-Agent Systems

Programming Agents with JADE for Multi-Agent Systems Programming Agents with JADE for Multi-Agent Systems Ass.Lecturer Noor Thamer Based on Jade, Java and Eclipse documentation Ass.Lecturer Noor Thamer 1 Content Briefly about components JADE overview Setting

More information

The protocols are governed by the FIPA organization and their precise definitions are available at

The protocols are governed by the FIPA organization and their precise definitions are available at 2. Communication Protocols Communication protocols were created to allow the agents to communicate regardless of their implementation, including the environment and the programming language. The protocols

More information

Agents & Multi-Agent Systems with Jade

Agents & Multi-Agent Systems with Jade Agents & Multi-Agent Systems with Jade Distributed Systems / Technologies Sistemi Distribuiti / Tecnologie Stefano Mariani Andrea Omicini s.mariani@unibo.it andrea.omicini@unibo.it Dipartimento di Informatica

More information

Yellow pages and Interaction Protocols

Yellow pages and Interaction Protocols Yellow pages and Interaction Protocols Fabiano Dalpiaz Agent-Oriented Software Engineering (AOSE) 2009-10 Yellow pages How do you look for someone providing a service? Either you know a service provider......or

More information

Agent and Object Technology Lab Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma. Multi-Agent Systems

Agent and Object Technology Lab Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma. Multi-Agent Systems Agent and Object Technology Lab Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma Multi-Agent Systems JADE Prof. Agostino Poggi What is FIPA? Foundation for Intelligent Physical

More information

Jade: Java Agent DEvelopment Framework Overview

Jade: Java Agent DEvelopment Framework Overview Jade: Java Agent DEvelopment Framework Overview Multiagent Systems LM Sistemi Multiagente LM Stefano Mariani revised by Andrea Omicini s.mariani@unibo.it, andrea.omicini@unibo.it Dipartimento di Informatica:

More information

Jade: Java Agent DEvelopment Framework Overview

Jade: Java Agent DEvelopment Framework Overview Jade: Java Agent DEvelopment Framework Overview Stefano Mariani s.mariani@unibo.it Dipartimento di Informatica Scienza e Ingegneria (DISI) Alma Mater Studiorum Università di Bologna a Cesena Academic Year

More information

JADE PROGRAMMER S GUIDE

JADE PROGRAMMER S GUIDE JADE PROGRAMMER S GUIDE USAGE RESTRICTED ACCORDING TO LICENSE AGREEMENT. last update:22-november-2005. JADE 3.3 Authors: Fabio Bellifemine, Giovanni Caire, Tiziana Trucco (TILAB, formerly CSELT) Giovanni

More information

FIPA specification and JADE. Tomáš Poch

FIPA specification and JADE. Tomáš Poch FIPA specification and JADE Tomáš Poch Agents System that is situated in some environment, and that is capable of autonomous action in this environment in order to meet its design objectives [Wooldridge

More information

JADE Multi-Agent System Holonic Control Implementation for a Manufacturing Cell

JADE Multi-Agent System Holonic Control Implementation for a Manufacturing Cell JADE Multi-Agent System Holonic Control Implementation for a Manufacturing Cell Karel Kruger a,* and Anton Basson a a Dept of Mechanical and Mechatronic Eng, Stellenbosch Univ, Stellenbosch 7600, South

More information

Introduction to Multi-Agent Programming

Introduction to Multi-Agent Programming Introduction to Multi-Agent Programming 1. Agent Communication Speech Acts, KIF, KQML, FIPA, JADE, IPC Alexander Kleiner, Bernhard Nebel Contents Introduction Speech Acts Agent Communication Languages

More information

Software Agent Computing. Agent Mobility

Software Agent Computing. Agent Mobility Software Agent Computing Agent Mobility Planning mobility roadmap Agent mobility = to migrate or to make a copy (clone) itself across one or multiple network hosts Support for mobility in JADE: a set of

More information

Introduction to Multi-Agent Programming

Introduction to Multi-Agent Programming Introduction to Multi-Agent Programming 5. Agent Communication Speech Acts, KIF, KQML, FIPA, JADE, IPC Alexander Kleiner, Bernhard Nebel Contents Introduction Speech Acts Agent Communication Languages

More information

From Simulation to Development in MAS A JADE-based Approach

From Simulation to Development in MAS A JADE-based Approach From Simulation to Development in MAS A JADE-based Approach João P. C. Lopes 1 and Henrique Lopes Cardoso 1,2 1 DEI/FEUP, Faculdade de Engenharia, Universidade do Porto, Portugal 2 LIACC Laboratório de

More information

Information Collection and Survey Infrastructure, APIs, and Software Tools for Agent-based Systems (An Overview of JADE)

Information Collection and Survey Infrastructure, APIs, and Software Tools for Agent-based Systems (An Overview of JADE) Course Number: SENG 609.22 Session: Fall, 2003 Document Name: Infrastructure, APIs, and Software tools for agent-based system (An Overview of JADE) Course Name: Agent-based Software Engineering Department:

More information

JADE: the new kernel and last developments. Giovanni Caire JADE Board Technical Leader

JADE: the new kernel and last developments. Giovanni Caire JADE Board Technical Leader JADE: the new kernel and last developments Giovanni Caire JADE Board Technical Leader giovanni.caire@tilab.com Pisa 2004 Summary JADE The JADE Board The new Kernel Ideas and motivations Main elements An

More information

Ch 9: Control flow. Sequencers. Jumps. Jumps

Ch 9: Control flow. Sequencers. Jumps. Jumps Ch 9: Control flow Sequencers We will study a number of alternatives traditional sequencers: sequential conditional iterative jumps, low-level sequencers to transfer control escapes, sequencers to transfer

More information

JADE development for CDC on COMBO Setting up the tool chain

JADE development for CDC on COMBO Setting up the tool chain 1 Setting up the tool chain UNINOVA JADE development for CDC on COMBO Setting up the tool chain Luis Ribeiro José Barata Rogério Rosa André Cavalcante 2/14/2011 This document guides through the complete

More information

Introduction - GAMA. Gis & Agent-based Modeling Architecture. Agent-based, spatially explicit, modeling and simulation platform.

Introduction - GAMA. Gis & Agent-based Modeling Architecture. Agent-based, spatially explicit, modeling and simulation platform. Econofisica / Econophysics, Prof. Terna Anno accademico 2016/2017 GAMA Gis & Agent-based Modeling Architecture JADE JAVA Agent DEvelopment Framework Dr. Jacopo Pellegrino - http://personalpages.to.infn.it/~japelleg/

More information

Modular JADE Agents Design and Implementation using ASEME

Modular JADE Agents Design and Implementation using ASEME 2010 IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology Modular JADE Agents Design and Implementation using ASEME Nikolaos Spanoudakis Technical University of Crete,

More information

CIS233J Java Programming II. Threads

CIS233J Java Programming II. Threads CIS233J Java Programming II Threads Introduction The purpose of this document is to introduce the basic concepts about threads (also know as concurrency.) Definition of a Thread A thread is a single sequential

More information

JADE PROGRAMMER S GUIDE

JADE PROGRAMMER S GUIDE JADE PROGRAMMER S GUIDE USAGE RESTRICTED ACCORDING TO LICENSE AGREEMENT. last update: 4-September-2001. JADE 2.4 Authors: Fabio Bellifemine, Giovanni Caire, Tiziana Trucco (ex CSELT Giovanni Rimassa (University

More information

An adaptive agent architecture for automated negotiation

An adaptive agent architecture for automated negotiation An adaptive agent architecture for automated negotiation Yong Yuan Yong-quan Liang College of Information Science and Engineering, Shandong University of Science and Technology, Qingdao, 266510, China

More information

JVA-103. Java Programming

JVA-103. Java Programming JVA-103. Java Programming Version 8.0 This course teaches programming in the Java language -- i.e. the Java Standard Edition platform. It is intended for programmers with experience in languages other

More information

FIPA Agent Software Integration Specification

FIPA Agent Software Integration Specification FOUNDATION FOR INTELLIGENT PHYSICAL AGENTS FIPA Agent Software Integration Specification Document title FIPA Agent Software Integration Specification Document number XC00079A Document source FIPA Architecture

More information

An Automatic Code Generation Tool for JADE Agents

An Automatic Code Generation Tool for JADE Agents Proc. of the 8th WSEAS Int. Conf. on Mathematical Methods and Computational Techniques in Electrical Engineering, Bucharest, October 16-17, 2006 21 An Automatic Code Generation Tool for JADE Agents FLORIN

More information

Fun facts about recursion

Fun facts about recursion Outline examples of recursion principles of recursion review: recursive linked list methods binary search more examples of recursion problem solving using recursion 1 Fun facts about recursion every loop

More information

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler Software Engineering 2 A practical course in software engineering Quality Management Main Message Planning phase Definition phase Design phase Implem. phase Acceptance phase Mainten. phase 3 1. Overview

More information

CS61B, Spring 2003 Discussion #17 Amir Kamil UC Berkeley 5/12/03

CS61B, Spring 2003 Discussion #17 Amir Kamil UC Berkeley 5/12/03 CS61B, Spring 2003 Discussion #17 Amir Kamil UC Berkeley 5/12/03 Topics: Threading, Synchronization 1 Threading Suppose we want to create an automated program that hacks into a server. Many encryption

More information

Engineering CORBA-based Distributed Systems

Engineering CORBA-based Distributed Systems Engineering CORBA-based Distributed Systems Ramón Juanes +, Fernando Bellas *, Nieves Rodríguez * and Ángel Viña * + Departamento de Electrónica y Sistemas, Universidad Alfonso X El Sabio, Madrid, CP/

More information

SMD149 - Operating Systems

SMD149 - Operating Systems SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program

More information

Course Hours

Course Hours Programming the.net Framework 4.0/4.5 with C# 5.0 Course 70240 40 Hours Microsoft's.NET Framework presents developers with unprecedented opportunities. From 'geoscalable' web applications to desktop and

More information

Integrating Web Services into Agentcities Recommendation

Integrating Web Services into Agentcities Recommendation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 AGENTCITIES TECHNICAL RECOMMENDATION Recommendation Agentcities Technical Recommendation

More information

Towards developing multi-agent systems in Ada G. Aranda, J. Palanca, A. Espinosa, A. Terrasa, and A. García-Fornes {garanda,jpalanca,aespinos,aterrasa,agarcia}@dsic.upv.es Information Systems and Computation

More information

Multitasking Multitasking allows several activities to occur concurrently on the computer. A distinction is usually made between: Process-based multit

Multitasking Multitasking allows several activities to occur concurrently on the computer. A distinction is usually made between: Process-based multit Threads Multitasking Multitasking allows several activities to occur concurrently on the computer. A distinction is usually made between: Process-based multitasking Thread-based multitasking Multitasking

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

CHAPTER 7 JAVA AGENT DEVELOPMENT ENVIRONMENT

CHAPTER 7 JAVA AGENT DEVELOPMENT ENVIRONMENT CHAPTER 7 JAVA AGENT DEVELOPMENT ENVIRONMENT 159 Chapter 7 Java Agent Development Environment For more enhanced information resources it requires that the information system is distributed in a network

More information

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS Chapter 1 : Chapter-wise Java Multiple Choice Questions and Answers Interview MCQs Java Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully

More information

SCXML State Chart XML

SCXML State Chart XML SCXML State Chart XML Previously, in this course... Previously, in this course... Running Example all actions omitted wasn t it supposed to help? Previously, in this course... Running Example all actions

More information

Item 18: Implement the Standard Dispose Pattern

Item 18: Implement the Standard Dispose Pattern Item 18: Implement the Standard Dispose Pattern 1 Item 18: Implement the Standard Dispose Pattern We ve discussed the importance of disposing of objects that hold unmanaged resources. Now it s time to

More information

COL106: Data Structures and Algorithms. Ragesh Jaiswal, IIT Delhi

COL106: Data Structures and Algorithms. Ragesh Jaiswal, IIT Delhi Stack and Queue How do we implement a Queue using Array? : A collection of nodes with linear ordering defined on them. Each node holds an element and points to the next node in the order. The first node

More information

Embedded System Design and Modeling EE382V, Fall 2008

Embedded System Design and Modeling EE382V, Fall 2008 Embedded System Design and Modeling EE382V, Fall 2008 Lecture Notes 3 The SpecC System-Level Design Language Dates: Sep 9&11, 2008 Scribe: Mahesh Prabhu Languages: Any language would have characters, words

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 8 Threads and Scheduling Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ How many threads

More information

CS 221 Review. Mason Vail

CS 221 Review. Mason Vail CS 221 Review Mason Vail Inheritance (1) Every class - except the Object class - directly inherits from one parent class. Object is the only class with no parent. If a class does not declare a parent using

More information

Java s Implementation of Concurrency, and how to use it in our applications.

Java s Implementation of Concurrency, and how to use it in our applications. Java s Implementation of Concurrency, and how to use it in our applications. 1 An application running on a single CPU often appears to perform many tasks at the same time. For example, a streaming audio/video

More information

CSE332: Data Abstractions Lecture 22: Shared-Memory Concurrency and Mutual Exclusion. Tyler Robison Summer 2010

CSE332: Data Abstractions Lecture 22: Shared-Memory Concurrency and Mutual Exclusion. Tyler Robison Summer 2010 CSE332: Data Abstractions Lecture 22: Shared-Memory Concurrency and Mutual Exclusion Tyler Robison Summer 2010 1 Toward sharing resources (memory) So far we ve looked at parallel algorithms using fork-join

More information

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Processes and Non-Preemptive Scheduling. Otto J. Anshus Processes and Non-Preemptive Scheduling Otto J. Anshus Threads Processes Processes Kernel An aside on concurrency Timing and sequence of events are key concurrency issues We will study classical OS concurrency

More information

ebus Programmer s Manual

ebus Programmer s Manual ebus Programmer s Manual Version: 4.5.2 Released: January 7, 2017 ebus Programmer s Manual Copyright 2018. Charles W. Rapp All Rights Reserved. 2 of 130 Welcome to ebus! Welcome to ebus! 7 Overview 8 Merrily,

More information

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

BEAAquaLogic. Service Bus. Interoperability With EJB Transport BEAAquaLogic Service Bus Interoperability With EJB Transport Version 3.0 Revised: February 2008 Contents EJB Transport Introduction...........................................................1-1 Invoking

More information

The American University at Cairo. The Computer Science Department. Csci485-Intelligent Agents. Spring 2006 Dr Rafea. JADE Tutorial

The American University at Cairo. The Computer Science Department. Csci485-Intelligent Agents. Spring 2006 Dr Rafea. JADE Tutorial The American University at Cairo The Computer Science Department Csci485-Intelligent Agents Spring 2006 Dr Rafea JADE Tutorial 1. Introduction Intelligent Agents have been extensively used in different

More information

Introduction to Asynchronous Programming Fall 2014

Introduction to Asynchronous Programming Fall 2014 CS168 Computer Networks Fonseca Introduction to Asynchronous Programming Fall 2014 Contents 1 Introduction 1 2 The Models 1 3 The Motivation 3 4 Event-Driven Programming 4 5 select() to the rescue 5 1

More information

CS 351 Design of Large Programs Threads and Concurrency

CS 351 Design of Large Programs Threads and Concurrency CS 351 Design of Large Programs Threads and Concurrency Brooke Chenoweth University of New Mexico Spring 2018 Concurrency in Java Java has basic concurrency support built into the language. Also has high-level

More information

An Architecture and System for Support of Cooperation in Multi-Agent Software Development

An Architecture and System for Support of Cooperation in Multi-Agent Software Development 296 Conf. on Software Eng. Research and Practice SERP'07 An Architecture and System for Support of Cooperation in Multi-Agent Software Development Xuetao Niu, School of Information and Communication Technology

More information

Outline. iterator review iterator implementation the Java foreach statement testing

Outline. iterator review iterator implementation the Java foreach statement testing Outline iterator review iterator implementation the Java foreach statement testing review: Iterator methods a Java iterator only provides two or three operations: E next(), which returns the next element,

More information

List ADT. Announcements. The List interface. Implementing the List ADT

List ADT. Announcements. The List interface. Implementing the List ADT Announcements Tutoring schedule revised Today s topic: ArrayList implementation Reading: Section 7.2 Break around 11:45am List ADT A list is defined as a finite ordered sequence of data items known as

More information

MultiThreading. Object Orientated Programming in Java. Benjamin Kenwright

MultiThreading. Object Orientated Programming in Java. Benjamin Kenwright MultiThreading Object Orientated Programming in Java Benjamin Kenwright Outline Review Essential Java Multithreading Examples Today s Practical Review/Discussion Question Does the following code compile?

More information

Collections, Maps and Generics

Collections, Maps and Generics Collections API Collections, Maps and Generics You've already used ArrayList for exercises from the previous semester, but ArrayList is just one part of much larger Collections API that Java provides.

More information

Tirgul 1. Course Guidelines. Packages. Special requests. Inner classes. Inner classes - Example & Syntax

Tirgul 1. Course Guidelines. Packages. Special requests. Inner classes. Inner classes - Example & Syntax Tirgul 1 Today s topics: Course s details and guidelines. Java reminders and additions: Packages Inner classes Command Line rguments Primitive and Reference Data Types Guidelines and overview of exercise

More information

CSCI-142 Exam 2 Review September 25, 2016 Presented by the RIT Computer Science Community

CSCI-142 Exam 2 Review September 25, 2016 Presented by the RIT Computer Science Community CSCI-142 Exam 2 Review September 25, 2016 Presented by the RIT Computer Science Community http://csc.cs.rit.edu 1. Suppose we are talking about the depth-first search (DFS) algorithm. Nodes are added to

More information

Handling Multithreading Approach Using Java Nikita Goel, Vijaya Laxmi, Ankur Saxena Amity University Sector-125, Noida UP India

Handling Multithreading Approach Using Java Nikita Goel, Vijaya Laxmi, Ankur Saxena Amity University Sector-125, Noida UP India RESEARCH ARTICLE Handling Multithreading Approach Using Java Nikita Goel, Vijaya Laxmi, Ankur Saxena Amity University Sector-125, Noida UP-201303 - India OPEN ACCESS ABSTRACT This paper contains information

More information

and raw producer respectively, hold big role in market activities that can give impact to each other. Industries need the farmers to fulfill their raw

and raw producer respectively, hold big role in market activities that can give impact to each other. Industries need the farmers to fulfill their raw Design of Intelligent Agents Based System for Commodity Market Simulation with JADE Hendra Gunawan Department of Computer Science, Gunadarma University, West Java, Indonesia E-mail: hendrabiter@gmail.com

More information

the gamedesigninitiative at cornell university Lecture 12 Architecture Design

the gamedesigninitiative at cornell university Lecture 12 Architecture Design Lecture 12 Take Away for Today What should lead programmer do? How do CRC cards aid software design? What goes on each card? How do you lay m out? What properties should y have? How do activity diagrams

More information

Introduction to Intelligent Agents

Introduction to Intelligent Agents Introduction to Intelligent Agents Pınar Yolum p.yolum@uu.nl Utrecht University Course Information Jointly taught with Mehdi Dastani Topics Work Schedule Grading Resources Academic Integrity Spring 2018

More information

Page 1. Human-computer interaction. Lecture 1b: Design & Implementation. Building user interfaces. Mental & implementation models

Page 1. Human-computer interaction. Lecture 1b: Design & Implementation. Building user interfaces. Mental & implementation models Human-computer interaction Lecture 1b: Design & Implementation Human-computer interaction is a discipline concerned with the design, implementation, and evaluation of interactive systems for human use

More information

Programming with the Service Control Engine Subscriber Application Programming Interface

Programming with the Service Control Engine Subscriber Application Programming Interface CHAPTER 5 Programming with the Service Control Engine Subscriber Application Programming Interface Revised: July 28, 2009, Introduction This chapter provides a detailed description of the Application Programming

More information

DS2OS Hands-On. Part I: The Tickle Service. Stefan Liebald. Distributed Smart 2pace Orchestration System

DS2OS Hands-On. Part I: The Tickle Service. Stefan Liebald. Distributed Smart 2pace Orchestration System DS2OS Hands-On Stefan Liebald Part I: The Tickle Service 1 What can you find on the VM? Username: ds2os, Password: ds2os All required files are in the folder ~/ds2os (symlink on the desktop) ~/ds2os/models:

More information

Database Architectures

Database Architectures Database Architectures CPS352: Database Systems Simon Miner Gordon College Last Revised: 11/15/12 Agenda Check-in Centralized and Client-Server Models Parallelism Distributed Databases Homework 6 Check-in

More information

Today s Topics. u Thread implementation. l Non-preemptive versus preemptive threads. l Kernel vs. user threads

Today s Topics. u Thread implementation. l Non-preemptive versus preemptive threads. l Kernel vs. user threads Today s Topics COS 318: Operating Systems Implementing Threads u Thread implementation l Non-preemptive versus preemptive threads l Kernel vs. user threads Jaswinder Pal Singh and a Fabulous Course Staff

More information

Standard. Number of Correlations

Standard. Number of Correlations Computer Science 2016 This assessment contains 80 items, but only 80 are used at one time. Programming and Software Development Number of Correlations Standard Type Standard 2 Duty 1) CONTENT STANDARD

More information

Inside core.async Channels. Rich Hickey

Inside core.async Channels. Rich Hickey Inside core.async s Rich Hickey Warning! Implementation details Subject to change The Problems Single channel implementation For use from both dedicated threads and go threads simultaneously, on same channel

More information

Chapter 27 Cluster Work Queues

Chapter 27 Cluster Work Queues Chapter 27 Cluster Work Queues Part I. Preliminaries Part II. Tightly Coupled Multicore Part III. Loosely Coupled Cluster Chapter 18. Massively Parallel Chapter 19. Hybrid Parallel Chapter 20. Tuple Space

More information

Hands-On Lab. Worker Role Communication. Lab version: Last updated: 11/16/2010. Page 1

Hands-On Lab. Worker Role Communication. Lab version: Last updated: 11/16/2010. Page 1 Hands-On Lab Worker Role Communication Lab version: 2.0.0 Last updated: 11/16/2010 Page 1 CONTENTS OVERVIEW... 3 EXERCISE 1: USING WORKER ROLE EXTERNAL ENDPOINTS... 8 Task 1 Exploring the AzureTalk Solution...

More information

Java Programming. Price $ (inc GST)

Java Programming. Price $ (inc GST) 1800 ULEARN (853 276) www.ddls.com.au Java Programming Length 5 days Price $4235.00 (inc GST) Overview Intensive and hands-on, the course emphasizes becoming productive quickly as a Java application developer.

More information

Embedded Software TI2725 C. 5. Software architectures. Koen Langendoen. Embedded Software Group

Embedded Software TI2725 C. 5. Software architectures. Koen Langendoen. Embedded Software Group Embedded Software 5. Software architectures TI2725 C Koen Langendoen Embedded Software Group Lec.2: Interrupts & data sharing volatile static long int lsecondstoday; void interrupt vupdatetime() ++lsecondstoday;

More information

Lecture 9: Lists. MIT-AITI Kenya 2005

Lecture 9: Lists. MIT-AITI Kenya 2005 Lecture 9: Lists MIT-AITI Kenya 2005 1 In this lecture we will learn. ArrayList These are re-sizeable arrays LinkedList brief overview Differences between Arrays and ArrayLists Casting Iterator method

More information

Project. Threads. Plan for today. Before we begin. Thread. Thread. Minimum submission. Synchronization TSP. Thread synchronization. Any questions?

Project. Threads. Plan for today. Before we begin. Thread. Thread. Minimum submission. Synchronization TSP. Thread synchronization. Any questions? Project Threads Synchronization Minimum submission Deadline extended to tonight at midnight Early submitters 10 point bonus TSP Still due on Tuesday! Before we begin Plan for today Thread synchronization

More information

SCXML State Chart XML. Previously, in this course...

SCXML State Chart XML. Previously, in this course... SCXML State Chart XML Previously, in this course... Previously, in this course... Running Example all actions omitted wasn t it supposed to help? Previously, in this course... Running Example all actions

More information

Definition: A thread is a single sequential flow of control within a program.

Definition: A thread is a single sequential flow of control within a program. What Is a Thread? All programmers are familiar with writing sequential programs. You've probably written a program that displays "Hello World!" or sorts a list of names or computes a list of prime numbers.

More information

A Marriage of Web Services and Reflective Middleware to Solve the Problem of Mobile Client Interoperability

A Marriage of Web Services and Reflective Middleware to Solve the Problem of Mobile Client Interoperability A Marriage of Web Services and Reflective Middleware to Solve the Problem of Mobile Client Interoperability Abstract Paul Grace 1, Gordon Blair 1 and Sam Samuel 2 1 Computing Department, Lancaster University,

More information

Multithreading and Interactive Programs

Multithreading and Interactive Programs Multithreading and Interactive Programs CS160: User Interfaces John Canny. This time Multithreading for interactivity need and risks Some design patterns for multithreaded programs Debugging multithreaded

More information

CMPT 435/835 Tutorial 1 Actors Model & Akka. Ahmed Abdel Moamen PhD Candidate Agents Lab

CMPT 435/835 Tutorial 1 Actors Model & Akka. Ahmed Abdel Moamen PhD Candidate Agents Lab CMPT 435/835 Tutorial 1 Actors Model & Akka Ahmed Abdel Moamen PhD Candidate Agents Lab ama883@mail.usask.ca 1 Content Actors Model Akka (for Java) 2 Actors Model (1/7) Definition A general model of concurrent

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling COP 4610: Introduction to Operating Systems (Fall 2016) Chapter 5: CPU Scheduling Zhi Wang Florida State University Contents Basic concepts Scheduling criteria Scheduling algorithms Thread scheduling Multiple-processor

More information

Multiple Inheritance, Abstract Classes, Interfaces

Multiple Inheritance, Abstract Classes, Interfaces Multiple Inheritance, Abstract Classes, Interfaces Written by John Bell for CS 342, Spring 2018 Based on chapter 8 of The Object-Oriented Thought Process by Matt Weisfeld, and other sources. Frameworks

More information

Homework 2: Imperative Due: 5:00 PM, Feb 15, 2019

Homework 2: Imperative Due: 5:00 PM, Feb 15, 2019 CS18 Integrated Introduction to Computer Science Fisler Homework 2: Imperative Due: 5:00 PM, Feb 15, 2019 Contents 1 Overview of Generic/Parameterized Types 2 2 Double the Fun with Doubly-Linked Lists

More information

CPS221 Lecture: Threads

CPS221 Lecture: Threads Objectives CPS221 Lecture: Threads 1. To introduce threads in the context of processes 2. To introduce UML Activity Diagrams last revised 9/5/12 Materials: 1. Diagram showing state of memory for a process

More information

Agent Interaction SDK Java Developer Guide. Voice Interactions

Agent Interaction SDK Java Developer Guide. Voice Interactions Agent Interaction SDK Java Developer Guide Voice Interactions 11/22/2017 Contents 1 Voice Interactions 1.1 Voice Interaction Design 1.2 Six Steps to an AIL Client Application 1.3 SimplePlace 1.4 SimpleVoiceInteraction

More information

MaSMT: A Multi-agent System Development Framework for English-Sinhala Machine Translation

MaSMT: A Multi-agent System Development Framework for English-Sinhala Machine Translation MaSMT: A Multi-agent System Development Framework for English-Sinhala Machine Translation B. Hettige #1, A. S. Karunananda *2, G. Rzevski *3 # Department of Statistics and Computer Science, University

More information

J A D E Te s t S u i t e

J A D E Te s t S u i t e J A D E Te s t S u i t e USER GUIDE Last update: 12-January-2005 JADE3.4 Authors: Elisabetta Cortese (TILAB) Giovanni Caire (TILAB) Rosalba Bochicchio (TILAB) JADE - Java Agent DEvelopment Framework is

More information

Microprofile Fault Tolerance. Emily Jiang 1.0,

Microprofile Fault Tolerance. Emily Jiang 1.0, Microprofile Fault Tolerance Emily Jiang 1.0, 2017-09-13 Table of Contents 1. Architecture.............................................................................. 2 1.1. Rational..............................................................................

More information

Interaction Testing. Chapter 15

Interaction Testing. Chapter 15 Interaction Testing Chapter 15 Interaction faults and failures Subtle Difficult to detect with testing Usually seen after systems have been delivered In low probability threads Occur after a long time

More information

This is a talk given by me to the Northwest C++ Users Group on May 19, 2010.

This is a talk given by me to the Northwest C++ Users Group on May 19, 2010. This is a talk given by me to the Northwest C++ Users Group on May 19, 2010. 1 I like this picture because it clearly shows what is private and what is shared. In the message-passing system, threads operate

More information

Topics in Object-Oriented Design Patterns

Topics in Object-Oriented Design Patterns Software design Topics in Object-Oriented Design Patterns Material mainly from the book Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides; slides originally by Spiros Mancoridis;

More information

the gamedesigninitiative at cornell university Lecture 13 Architecture Design

the gamedesigninitiative at cornell university Lecture 13 Architecture Design Lecture 13 Take Away for Today What should lead programmer do? How do CRC cards aid software design? What goes on each card? How do you lay m out? What properties should y have? How do activity diagrams

More information

Java Concurrency in practice Chapter 9 GUI Applications

Java Concurrency in practice Chapter 9 GUI Applications Java Concurrency in practice Chapter 9 GUI Applications INF329 Spring 2007 Presented by Stian and Eirik 1 Chapter 9 GUI Applications GUI applications have their own peculiar threading issues To maintain

More information

CS/ENGRD2110: Final Exam

CS/ENGRD2110: Final Exam CS/ENGRD2110: Final Exam 11th of May, 2012 NAME : NETID: The exam is closed book and closed notes. Do not begin until instructed. You have 150 minutes. Start by writing your name and Cornell netid on top!

More information

Part V. Process Management. Sadeghi, Cubaleska RUB Course Operating System Security Memory Management and Protection

Part V. Process Management. Sadeghi, Cubaleska RUB Course Operating System Security Memory Management and Protection Part V Process Management Sadeghi, Cubaleska RUB 2008-09 Course Operating System Security Memory Management and Protection Roadmap of Chapter 5 Notion of Process and Thread Data Structures Used to Manage

More information

Java Review Outline. basics exceptions variables arrays modulo operator if statements, booleans, comparisons loops: while and for

Java Review Outline. basics exceptions variables arrays modulo operator if statements, booleans, comparisons loops: while and for Java Review Outline basics exceptions variables arrays modulo operator if statements, booleans, comparisons loops: while and for Java basics write a simple program, e.g. hello world http://www2.hawaii.edu/~esb/2017fall.ics211/helloworl

More information

Programming Without a Call Stack: Event-driven Architectures

Programming Without a Call Stack: Event-driven Architectures Programming Without a Call Stack: Event-driven Architectures Gregor Hohpe Google www.eaipatterns.com Gregor Hohpe Programming Without a Call Stack: Event-driven Architectures Slide 1 About Me Distributed

More information

Framework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming

Framework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming Frameworks 1 Framework Set of cooperating classes/interfaces Structure essential mechanisms of a problem domain Programmer can extend framework classes, creating new functionality Example: Swing package

More information

EINDHOVEN UNIVERSITY OF TECHNOLOGY

EINDHOVEN UNIVERSITY OF TECHNOLOGY EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics & Computer Science Exam Programming Methods, 2IP15, Wednesday 17 April 2013, 09:00 12:00 TU/e THIS IS THE EXAMINER S COPY WITH (POSSIBLY INCOMPLETE)

More information