Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Designing Distributed Applications with Mobile Code Paradigms Antonio Carzaniga Politecnico di Milano Gian Pietro.

Similar presentations


Presentation on theme: "1 Designing Distributed Applications with Mobile Code Paradigms Antonio Carzaniga Politecnico di Milano Gian Pietro."— Presentation transcript:

1 1 Designing Distributed Applications with Mobile Code Paradigms Antonio Carzaniga Politecnico di Milano http://www.elet.polimi.it/~carzaniga Gian Pietro Picco Politecnico di Torino http://www.polito.it/~picco Giovanni Vigna Politecnico di Milano http://www.elet.polimi.it/~vigna

2 2 Internet The largest distributed system ever builtThe largest distributed system ever built Communication infrastructure is evolving at a fast paceCommunication infrastructure is evolving at a fast pace Computational infrastructure is primitive and characterized by slow evolutionComputational infrastructure is primitive and characterized by slow evolution A new research effort: distributed applications in an Internet scaleA new research effort: distributed applications in an Internet scale

3 3 A World-Wide Middleware Hides components’ locationHides components’ location Provides homogeneous access primitivesProvides homogeneous access primitives Supports client-server computing paradigmSupports client-server computing paradigm Main problem:Main problem: –Local and remote interaction have different semantics in terms of latency, access to memory, partial failure and concurrency

4 4 Mobile Code Technology Location is a pervasive abstractionLocation is a pervasive abstraction –Local interaction is different from remote interaction –Local interaction is less expensive Applications can dynamically changeApplications can dynamically change –the code they are executing –their location Strongly and weakly mobile systemsStrongly and weakly mobile systems

5 5 From Technology to Design Paradigms Abstract away from mobile code technologyAbstract away from mobile code technology Location, and mobility of both code and components should be taken into account at the design levelLocation, 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“Architectural styles” that employ some form of code mobility –Code On Demand –Remote Evaluation –Mobile Agent

6 6 Architectural Abstractions ComponentsComponents –Resource components (Data, devices, code) –Computational components Execution stateExecution state Private dataPrivate data Bindings to other components (e.g., code)Bindings to other components (e.g., code) InteractionsInteractions SitesSites –Support execution –Support cheap interaction X Site Y

7 7 Mobile Code Design Paradigms Interaction patterns that define the coordination and relocation of components needed to perform a serviceInteraction patterns that define the coordination and relocation of components needed to perform a service Service can be carried out when:Service can be carried out when: –resources –know-how –computational component responsible for execution are at the same location X Site Y

8 8 A chocolate cake

9 9 Client-Server PLEASE, MAKE ME A CHOCOLATE CAKE Request A Site A B Site B Reply

10 10 Remote Evaluation PLEASE, MAKE ME A CHOCOLATE CAKE. HERE IS THE RECIPE: TAKE TWO EGGS... Request A Site A B Site B Reply

11 11 Code On Demand PLEASE, TELL ME THE RECIPE Request A Site A B Site B Reply

12 12 Mobile Agent HERE I AM! CAN I USE YOUR OVEN? Move Site ASite B A

13 13 Why to Use Code Mobility? Deployment and upgrade of distributed applicationsDeployment and upgrade of distributed applications Customization of servicesCustomization of services Support for disconnected operationsSupport for disconnected operations Improved fault toleranceImproved fault tolerance

14 14 How to Use Code Mobility? There is no “universally best” paradigm: client- server may still be the right answerThere is no “universally best” paradigm: client- server may still be the right answer Trade-offs have to be analyzed on a case-by-case basisTrade-offs have to be analyzed on a case-by-case basis How to evaluate the best solution?How to evaluate the best solution?

15 15 A Data Mining Example It is often claimed that data mining is the “perfect” application for code mobilityIt is often claimed that data mining is the “perfect” application for code mobility Evaluation of three different architecturesEvaluation of three different architectures –Goal: to optimize network traffic –Identification of the relevant parameters

16 16 Client-Server T CS = (Dr + iDr + Dh + iDb) N networktraffic avg. # of docs. per node requestsize avg. size of a doc. header avg. size of a doc. body number of nodes density of relevant info b r h r

17 17 Remote Evaluation T REV = ((r + C REV + iDb) N networktraffic avg. # of docs per node requestsize avg. size of a doc. body number of nodes density of relevant info size of code sent C REV r iDb

18 18 Mobile Agent T MA = (r + C MA + s + ½iDbN) (N+1) networktraffic avg. # of docs per node requestsize size of “internal”state avg. size of a doc. body number of nodes density of relevant info size of code sent C MA r state

19 19 Traffic Overhead: O = T - iDbNTraffic Overhead: O = T - iDbN MA is the worst (at least in this example and as far as network traffic is concerned)MA is the worst (at least in this example and as far as network traffic is concerned) Trade-off between CS and REV:Trade-off between CS and REV: O MA = (r + C MA + s)(N+1) + ½(N-1)I Findings O REV = (r + C REV )N O CS = (r + ir + h)DN If r C REV

20 20 Conclusions Mobile code languages support new design paradigms for developing distributed applicationsMobile code languages support new design paradigms for developing distributed applications Characterization of the paradigmsCharacterization of the paradigms Case-by-case evaluation of tradeoffsCase-by-case evaluation of tradeoffs

21 21 Parallel and Future Work Evaluation of the independence of the paradigms from the technologyEvaluation of the independence of the paradigms from the technology Formalization of the paradigmsFormalization of the paradigms Application to a real application domain (network management)Application to a real application domain (network management) Implementation of technology directly supporting the paradigmsImplementation of technology directly supporting the paradigms Security issuesSecurity issues

22 22 Acknowledgments Artwork by Maria Grazia Galliani


Download ppt "1 Designing Distributed Applications with Mobile Code Paradigms Antonio Carzaniga Politecnico di Milano Gian Pietro."

Similar presentations


Ads by Google