+ All Categories
Home > Documents > and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf ·...

and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf ·...

Date post: 01-Oct-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
22
Reflections about Mobile Agents Reflections about Mobile Agents and Software Engineering and Software Engineering Gian Pietro Picco Dipartimento di Elettronica e Informazione Politecnico di Milano, Italy [email protected] http://www.elet.polimi.it/~picco
Transcript
Page 1: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

Reflections about Mobile Agents Reflections about Mobile Agents and Software Engineering and Software Engineering

Gian Pietro PiccoDipartimento di Elettronica e Informazione

Politecnico di Milano, [email protected]

http://www.elet.polimi.it/~picco

Page 2: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 2

Politecnico di Milano

Motivation and DisclaimerMotivation and Disclaimer

• Mobile agents: “nice solution in search of a problem”– “To talk about software engineering, you should find some

application to engineer, first”– No “common sense” application, like Web applets– So far, we did not manage to convince people that mobile

agents are a good idea; at most we convinced them it is not necessarily a bad idea

• Software engineering: still struggling with the “software crisis”

• Still, both fields have lessons to learn from each other

Page 3: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 3

Politecnico di Milano

Classic Software EngineeringClassic Software Engineering

Feasibility studyFeasibility study

Requirement analysis

and specification

Requirement analysis

and specification

Implementationand unit test

Implementationand unit test

Integration andsystem test

Integration andsystem test

DesignDesign

Operation and maintenance

Operation and maintenance

Preliminar evaluation of costs and benefits

The desired properties of the final system

are determined

The architecture of the application and the

data format is defined

Components are developed and tested individually

Components are integratedand the final system

is tested

Evolution is not proceedingin one direction!!!

Page 4: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 4

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplicationsFeasibility StudyFeasibility Study• Usually, a specific, non-conventional technical

solution is motivated by a specific problem• In the context of civil engineering:

– Problem: a bridge is placed in an area where earthquakes occur frequently

– Solution: use dynamic control techniques• In the context of computer science:

– Problem: search in a huge amount of unstructured data– Solution: data mining

• In the context of mobile agents:– Problem: somehow, the use of mobile agents is mentioned

in the Technical Annex– Solution: use mobile agents, no matter what

Page 5: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 5

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

Qualitative ArgumentsQualitative Arguments• A lot are documented in the literature

– Mobile agents: Are They a Good Idea? (Harrison, Chess, Kershenbaum, 1995)

– Understanding Code Mobility (Fuggetta, Picco, Vigna, 1998)

• Main advantages:– Better use of communication resources– Enhanced flexibility– Improved fault tolerance– Support for disconnected operations– Protocol encapsulation

• Very few are verified on the field by analyzing real applications

Page 6: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 6

Politecnico di Milano

9

75

257

1225

57

1128

53

5 1022

0

50

100

150

200

250

300

LAN (10 Mb/s) Dial-up (28,800 b/s) Cellular (9,600 b/s)

Sec

onds

AppletSingle mobile agentMobile agent/DMBS-agentMessages/DMBS-agent

Mobile Agents for WWW Database Access (Papastravrou, Samaras, Pitoura, ICDE 99)

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

Quantitative ArgumentsQuantitative Arguments• They constitute only a small fraction of the literature

– and studies of good quality constitute an even smaller fraction

Page 7: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 7

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

Requirement SpecificationRequirement Specification• The key question on the table is “how to model

mobility”?• Are traditional languages sufficient?

– Is there anything really new that mobility brings in?– Location vs. context

• Are current proposals suited for the specification of real-world applications? – Do you really want to model your application using

Ambients?• Can we model logical and physical mobility using

the same language?

Page 8: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 8

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

DesignDesign• This is where mobile code and mobile agents bring

one (and possibly the only) fundamental revolution: location is no longer a deployment detail, rather it becomes a first-class design concept

• Logical mobility is essentially a new design tool (as opposed to physical mobility, which essentially defines new requirements)

• Some fundamental questions:– What are the fundamental architectural paradigms for

mobile agents and, more in general, mobile code?– How to choose among design paradigms? – When would you use mobile code as opposed to mobile

agents?

Page 9: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 9

Politecnico di Milano

PLEASE, MAKE ME A CHOCOLATE CAKE

A B

Client-Server

PLEASE, MAKE ME A CHOCOLATE CAKE.

HERE IS THE RECIPE:TAKE TWO EGGS...

A B

Remote EvaluationPLEASE, TELL

ME THE RECIPE

A B

Code on Demand

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

Design ParadigmsDesign Paradigms

HERE I AM!CAN I USE YOUR

OVEN?

A

Mobile Agent

Page 10: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 10

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

Design ParadigmsDesign Paradigms• Are these paradigms enough? • What is the role of data relocation in combination to code

relocation?• Transient interactions are key in mobility

A A B

A A B

A A B

A AB B

Binding Removal

by Copy

Network Reference

Re-binding

A A B

by Move

Page 11: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 11

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

More on Quantitative ArgumentsMore on Quantitative Arguments• Design paradigms help in

distinguishing between different forms of mobility, and identifying pros and cons

• They help in formulating general guidelines about when a given style of code relocation should be used

• After all, this is a big fraction of what engineering is all about

0

200

400

600

800

1000

1200

1400

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Number of managed nodes

Traf

fic in

Kby

tes

CS REVCOD MA, mgmMA, mgm, glob

Evaluating the Tradeoffs of Mobile Code Design Paradigms in Network Management Applications

(Baldi and Picco, ICSE 98)

Page 12: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 12

Politecnico di Milano

Mobile Code or Mobile Agents?Mobile Code or Mobile Agents?

• Research currently focuses on mobile agent systems, theories, and applications

• Mobile agents are claimed to provide a powerful and unifying abstraction for the development of highly autonomous and decentralized software– A hypothesis that largely remains to be demonstrated

• Expressive power comes as a tradeoff for efficiency– In many circumstances mobile code appears to be

expressive enough, often providing also a more efficient solution

Page 13: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 13

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

ImplementationImplementation• How do we develop applications exploiting code

mobility? – What are the common pitfalls? What are good

technologies to exploit? What is a “good design”? What are the clever tricks you can play?

• For instance… – Do we really and deeply understand how class loading

and serialization work in Java? • And … should we need to?

– Do we really have a good understanding about the techniques that are necessary to handle a roaming mobile agent? • Do we have the right abstractions and mechanisms to do so?

• Is really the field mature for design patterns?

Page 14: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 14

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

Validation and TestingValidation and Testing• We really do not know how to test an application that

involves mobile code– What are the fundamental problems? – Is it any different from open systems?

• What new kinds of run-time errors should we look for? – Class not found– Resource not available

• Is there any way to check their absence statically? • What techniques and methods can we reuse from

software engineering?

Page 15: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 15

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent ApplicationsApplications

Operation and MaintenanceOperation and Maintenance• This is where non-functional requirements strike in• Performance and scalability

– Not really addressed by current systems– Scalability of mobile agent systems or mobile agent

systems for scalability?• Fault-tolerance

– Some systems provide “local” fault-tolerance, e.g., through checkpointing

– Very few provide address the problem of transferring code and state in a fault-tolerant way

– Fault-tolerant mobile agent systems or mobile agent systems for fault-tolerance?

Page 16: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 16

Politecnico di Milano

Software Engineering Software Engineering of Mobile Agent of Mobile Agent SystemsSystems

• Thus far, we discussed the software engineering of applications based on mobile agents

• Nevertheless, mobile agent systems are software themselves: thus, can software engineering help construct better mobile agent systems?

Feasibility studyFeasibility study

Requirement analysis

and specification

Requirement analysis

and specification

Implementationand unit test

Implementationand unit test

Integration andsystem test

Integration andsystem test

DesignDesign

Operation and maintenance

Operation and maintenance

Page 17: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 17

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent SystemsSystemsRequirementsRequirements• What are the requirements for a new mobile agent

system? – Requirements are rarely stated in the documentation

• A general requirement should be to maximize the benefits potentially achievable with mobile agents– Unfortunately many systems seem to be designed the

other way round– Example: plenty of systems require permanent

connectivity (e.g., by providing remote class loading as the only code relocation strategy), hence cutting off support for disconnected operations

Page 18: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 18

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent SystemsSystemsDesignDesign• Mobile agent systems are, by and large, naively designed

– Little attention to software engineering principles like modularization, separation of concerns, incrementality, …

• Not only they do not match requirements, but they are often monolithic, proof of concept tools, and it is often not easy to use them in conjunction with other distributed middleware– It makes a difference when you get to build real systems for real

platforms…• They are often cluttered with functionality, and provide very

little orthogonality– What is the core of a mobile agent system? It makes a difference when

you get to use them in PDAs or want to maximize efficiency…• Formal theories of mobility may help identify the essential

constructs, and lead to novel language proposals– What is the role of coordination?

Page 19: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 19

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent SystemsSystemsImplementationImplementation• Software engineering teaches us that programming languages

are just tools: different languages are appropriate for different tasks

• So, why everybody is developing mobile agents in Java? • “Old” vs. “new” systems:

Telescript (1994)– Strong mobility – Instance-level member

protection– Resource control– Ownership ties together

security and resources

Aglets—Java-based, so– Weak mobility– No instance-level member

protection– No resource control– No real novel construct

besides mobile agents

Page 20: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 20

Politecnico di Milano

SW Engineering for Mobile Agent SW Engineering for Mobile Agent SystemsSystems

The Language Matters The Language Matters

• What about scripting languages, or functional languages?• The power of mobile code is in the architecture, notnot in the

technology!

0

500

1000

1500

2000

2500

3000

3500

4000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Number of managed nodes

CS REVCOD MA, mgmMA, glob MA, mgm, glob

SNMP vs. ATP SNMP vs. TCP

0

500

1000

1500

2000

2500

3000

3500

4000

4500

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Number of managed nodes

Tra

ffic

in K

byte

s

CS REVCOD MA, mgmMA, glob MA, mgm, glob

Page 21: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 21

Politecnico di Milano

Some (Bitter)Some (Bitter) ConsiderationsConsiderations(from DWTA’99)(from DWTA’99)

• Many systems embody design criteria that conflict with or hamper the exploitation of mobile code, e.g.:– Heavy application-level network protocols– Centralized code servers– Assumption of permanent connection– Migration policy hard-wired in the mechanism

•• Key open issues:Key open issues:– Lack of validation of abstractions and mechanisms against real

world applications– Lack of quantitative characterization and comparison of

mobile code technologies•• The above issues are hampering acceptance and The above issues are hampering acceptance and

credibility of mobile code research as a wholecredibility of mobile code research as a whole

Page 22: and Software Engineering Reflections about Mobile Agentsdisi.unitn.it/~picco/talks/prague01.pdf · Research on mobile agents is characterized by a disproportionate emphasis on the

© 2001 - Gian Pietro Picco 22

Politecnico di Milano

Summing upSumming up• Research on mobile agents is characterized by a disproportionate

emphasis on the implementation of mobile agent systems, and by a lack of mobile agent applications

• This has at least two negative effects: – The lack of applications (and of serious studies evaluating them) impairs

the whole scientific process of advancing the field; – Disregarding the other phases of the software process leads to systems

that are often unreliable implementations of a poor design satisfying bad requirements

• Software engineering does not mean just to use UML!It provides a general methodological framework, and a corpus of theories, techniques, and methods that can and should be: – Applied to the development of mobile agent systems– Adapted to encompass the specific requirements posed by mobility

• This holds for other disciplines as well, e.g., distributed systems


Recommended