Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Designing Distributed Applications with Mobile Code Paradigms Antonio Carzaniga Gian Pietro Picco Giovanni Vigna Politecnico di Milano Politecnico di Torino Politecnico di Milano http://www.elet.polimi.it/~carzaniga http://www.polito.it/~picco http://www.elet.polimi.it/~vigna 1 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 2 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 3 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 4 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 5 Architectural Abstractions • Components – Resource components (Data, devices, code) – Computational components X • Execution state • Private data • Bindings to other components (e.g., code) • Interactions • Sites – Support execution – Support cheap interaction Site Y 6 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 X Site Y 7 A chocolate cake 8 Client-Server PLEASE, MAKE ME A CHOCOLATE CAKE A Request B Reply Site A Site B 9 Remote Evaluation PLEASE, MAKE ME A CHOCOLATE CAKE. HERE IS THE RECIPE: TAKE TWO EGGS... A Request B Reply Site A Site B 10 Code On Demand PLEASE, TELL ME THE RECIPE A Request B Reply Site A Site B 11 Mobile Agent HERE I AM! CAN I USE YOUR OVEN? A Site A Move Site B 12 Why to Use Code Mobility? • Deployment and upgrade of distributed applications • Customization of services • Support for disconnected operations • Improved fault tolerance 13 How to Use Code Mobility? • There is no “universally best” paradigm: clientserver may still be the right answer • Trade-offs have to be analyzed on a case-by-case basis • How to evaluate the best solution? 14 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 15 Client-Server r h r b avg. # of docs. per node request size avg. size of a doc. body TCS = (Dr + iDr + Dh + iDb) N network traffic density of relevant info avg. size of a doc. header number of nodes 16 Remote Evaluation CREV r iDb request size avg. # of docs per node avg. size of a doc. body TREV = ((r + CREV+ iDb) N network traffic size of code sent density of relevant info number of nodes 17 Mobile Agent state CMA request size density of relevant info r avg. size of a doc. body TMA = (r + CMA + s + ½iDbN) (N+1) network traffic size of code sent size of “internal”state avg. # of docs per node number of nodes 18 Findings • Traffic Overhead: O = T - iDbN OCS = (r + ir + h)DN OREV = (r + CREV)N OMA = (r + CMA + s)(N+1) + ½(N-1)I • MA is the worst (at least in this example and as far as network traffic is concerned) • Trade-off between CS and REV: If r << CREV (r + ir + h) D > CREV 19 Conclusions • Mobile code languages support new design paradigms for developing distributed applications • Characterization of the paradigms • Case-by-case evaluation of tradeoffs 20 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 21 Acknowledgments Artwork by Maria Grazia Galliani 22