220 likes | 247 Views
Designing Distributed Applications with Mobile Code Paradigms. Gian Pietro Picco Politecnico di Torino http://www.polito.it/~picco. Giovanni Vigna Politecnico di Milano http://www.elet.polimi.it/~vigna. Antonio Carzaniga Politecnico di Milano http://www.elet.polimi.it/~carzaniga.
E N D
Designing Distributed Applications with Mobile Code Paradigms Gian Pietro Picco Politecnico di Torino http://www.polito.it/~picco Giovanni Vigna Politecnico di Milano http://www.elet.polimi.it/~vigna Antonio Carzaniga Politecnico di Milano http://www.elet.polimi.it/~carzaniga
Internet • The largest distributed system ever built • Communication infrastructure is evolving at a fast pace • Computational infrastructure is primitive and characterized by slow evolution • A new research effort: distributed applications in an Internet scale
A World-Wide Middleware • Hides components’ location • Provides homogeneous access primitives • Supports client-server computing paradigm • Main problem: • Local and remote interaction have different semantics in terms of latency, access to memory, partial failure and concurrency
Mobile Code Technology • Location is a pervasive abstraction • Local interaction is different from remote interaction • Local interaction is less expensive • Applications can dynamically change • the code they are executing • their location • Strongly and weakly mobile systems
From Technology to Design Paradigms • Abstract away from mobile code technology • Location, and mobility of both code and components should be taken into account at the design level • “Architectural styles” that employ some form of code mobility • Code On Demand • Remote Evaluation • Mobile Agent
Architectural Abstractions • Components • Resource components (Data, devices, code) • Computational components • Execution state • Private data • Bindings to other components (e.g., code) • Interactions • Sites • Support execution • Support cheap interaction X Site Y
X Site Y Mobile Code Design Paradigms • Interaction patterns that define the coordination and relocation of components needed to perform a service • Service can be carried out when: • resources • know-how • computational component responsible for execution are at the same location
Client-Server PLEASE, MAKE ME A CHOCOLATE CAKE A Request B Reply Site A Site B
Remote Evaluation PLEASE, MAKE ME A CHOCOLATE CAKE. HERE IS THE RECIPE: TAKE TWO EGGS... A Request B Reply Site A Site B
Code On Demand PLEASE, TELLME THE RECIPE A Request B Reply Site A Site B
Mobile Agent HERE I AM! CAN I USE YOUR OVEN? Move A Site A Site B
Why to Use Code Mobility? • Deployment and upgrade of distributed applications • Customization of services • Support for disconnected operations • Improved fault tolerance
How to Use Code Mobility? • There is no “universally best” paradigm: client-server may still be the right answer • Trade-offs have to be analyzed on a case-by-case basis • How to evaluate the best solution?
A Data Mining Example • It is often claimed that data mining is the “perfect” application for code mobility • Evaluation of three different architectures • Goal: to optimize network traffic • Identification of the relevant parameters
Client-Server r h r b request size avg. # of docs. per node avg. size of a doc. body TCS = (Dr + iDr + Dh + iDb) N number of nodes density of relevant info network traffic avg. size of a doc. header
CREV r iDb Remote Evaluation avg. # of docs per node request size avg. size of a doc. body TREV = ((r + CREV+ iDb) N number of nodes size of code sent network traffic density of relevant info
Mobile Agent CMA r state request size density of relevant info avg. size of a doc. body TMA = (r + CMA + s + ½iDbN) (N+1) number of nodes size of code sent avg. # of docs per node network traffic size of “internal”state
Findings • Traffic Overhead: O = T - iDbN • MA is the worst (at least in this example and as far as network traffic is concerned) • Trade-off between CS and REV: OCS = (r + ir + h)DN OREV = (r + CREV)N OMA = (r + CMA + s)(N+1) + ½(N-1)I If r << CREV (r + ir + h) D > CREV
Conclusions • Mobile code languages support new design paradigms for developing distributed applications • Characterization of the paradigms • Case-by-case evaluation of tradeoffs
Parallel and Future Work • Evaluation of the independence of the paradigms from the technology • Formalization of the paradigms • Application to a real application domain (network management) • Implementation of technology directly supporting the paradigms • Security issues
Acknowledgments Artwork by Maria Grazia Galliani