network paradigms and mobile code

28
Design Paradigm Code Mobility (A.Barletta - DAB Group) “Independence of the design paradigm from the underlying technology is a major point in general software engineering practice” “Designing Distributed applications with Mobile Code Paradigms” - A. Carzaniga, G.P. Picco, G. Vigna -

Upload: a71barletta

Post on 09-Jul-2015

223 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Network Paradigms And Mobile Code

Design Paradigm

Code Mobility

(A.Barletta - DAB Group)

“Independence of the design paradigm from the underlying technology is a major point in general software engineering practice”

“Designing Distributed applications with Mobile Code Paradigms”- A. Carzaniga, G.P. Picco, G. Vigna -

Page 2: Network Paradigms And Mobile Code

Introduction

• Open Software Foundation defines distributed computing as ”computing that involves the cooperation of two or more machines communicating over a network. The machines participating in the system can range from personal computers to supercomputers; the network can connect machines in one building or on different continents”.

Page 3: Network Paradigms And Mobile Code

Basic Components• components

• code: they encapsulated the know-how to perform a particular computation;

• resource (data): data & device used during the computation (files);

• computational: active executor of the code (CPU, memory, Virtual Machine);

• service: the result of a request, the action.

• interactions: events that involve two or more components;

• sites: hosts component, location;

Code

Data

Service

Computation Environment

(CPU,memory,VM)

message

optional link

necessary link

Page 4: Network Paradigms And Mobile Code

Traditional Computing System

Code Component

Resources Component

Service

Computation Component

(CPU,memory,VM)

Interaction

Page 5: Network Paradigms And Mobile Code

Main design paradigm

• Client/Server (pure)• Remote Evaluation• Code on Demand• Mobile Agent• 3 tier architecture (N-tier architecture)

Page 6: Network Paradigms And Mobile Code

Measure parameters

• number of interactions• CPU costs• generated network traffic• security• performance & semplicity• scalability• latency • push & pull capabilities

Page 7: Network Paradigms And Mobile Code

Server(Provider)

Clients(Users)

Page 8: Network Paradigms And Mobile Code

Client/Server (pure)

Service

Computation Environment

(CPU,memory,VM)

message

Client Server

Es: RPC, HTTP, FTP, Xwindow

data

data

Code

Page 9: Network Paradigms And Mobile Code

Client/Server (pure)• Secure• Low transfer rate• Big server, little client• centric control (security !!!)• high computational capabilities of Server• only data&msg move on the connection• “a priori fixed set of services accessible through a

statically defined interface”[1]

Page 10: Network Paradigms And Mobile Code

Remote Evaluation & Execution

Service

Computation Environment

(CPU,memory,VM)

message

Client Server

Es: Remote Unix shell (rsh),Scripting, SQL,PostScript

code

message

Page 11: Network Paradigms And Mobile Code

Remote Evaluation&Execution• remote ..

evaluation: we trasfer code&data to a remote site that performs the service; after the result cames back to the initial site (Ex: SQL Script)

execution: we transfer code&data but there is not a reply (Ex: Postscript)

• customizable service (not fixed number of functionalities like the Client/Server paradigm)

• we offers (server) a service that is programmable with a computationally complete language

Page 12: Network Paradigms And Mobile Code

Code on Demand

Service Computation Environment

(CPU,memory,VM)

message

Client Server

Es: ActiveX/IE4.0, Applet, Web services

code

Page 13: Network Paradigms And Mobile Code

Code on Demand

• many upcoming Internet applications are based on this paradigm

• the terminal must have capabilities to• download & run• link• execute (on the fly) code from the net[VIRTUAL MACHINE]

Page 14: Network Paradigms And Mobile Code

Mobile Agent

Service

code code

Service Service

Computation Environment

(CPU,memory,VM)

Computation Environment

(CPU,memory,VM)

Computation Environment

(CPU,memory,VM)

Es: Aglet,Obliq

Page 15: Network Paradigms And Mobile Code

Mobile Agent

• strong & weak code mobility• improve fault tolerance• reduction of communication costs• better support for asynchronous interactions• enhanced flexibility in the process of

software distribution• advanced system ... too early !!

Page 16: Network Paradigms And Mobile Code

3 tier architecture

Service

Computation Environment

(CPU,memory,VM)

message

Client

Server

Es: HTTP/CGI code

Server/ClientComputation Environment

(CPU,memory,VM) code

Service

message

presentation processing data access

Page 17: Network Paradigms And Mobile Code

3 tier architecture

• 3 logical parts can be distinguished in most business applications:

• presentation• processing• data access

…. making these three parts separate programs, yields the most flexible and scalable architecture !!!!

Page 18: Network Paradigms And Mobile Code

3 tier architecture

• hard/software layering to balance computing

• more network performance• reusable code (DCOM, CORBA)• improve fault tolerance• the logic of an application is distributed

across multiple nodes within a network ... N tier architecture

Page 19: Network Paradigms And Mobile Code

3 tier architecture

Service

Computation Environment

(CPU,memory,VM)

message

Client

Server

Es: HTTP/CGI code

Server/ClientComputation Environment

(CPU,memory,VM) code

Service

message

presentation processing data access

Mobile Agent

Service

code code

Service Service

Computation Environment

(CPU,memory,VM)

Computation Environment

(CPU,memory,VM)

Computation Environment

(CPU,memory,VM)

Es: Aglet,Obliq

Code on Demand

Service Computation Environment

(CPU,memory,VM)

message

Client Server

Es: ActiveX/IE4.0, Applet, Web services

code

Remote Evaluation & Execution

Service

Computation Environment

(CPU,memory,VM)

message

Client Server

Es: Remote Unix shell (rsh),Scripting, SQL,PostScript

code

message

Client/Server (pure)

Service

Computation Environment

(CPU,memory,VM)

message

Client Server

Es: RPC, HTTP, FTP, Xwindow

data

data

Code

Page 20: Network Paradigms And Mobile Code

code mobilitydata mobility

data+codeonly datacode + data state

code+data+exec state

Remote Execution

Codeon

Demand

Weak Migration Strong Migration

Client/Server

Page 21: Network Paradigms And Mobile Code

Application Domains for Mobile Code

• Distributed Information Retrieval• Active Documents• Advanced Telecommunication Services• Remote Device Control and Configuration• Workflow Management and Cooperation• Active Networks• Electronic Commerce

Page 22: Network Paradigms And Mobile Code

Reference

[1] “Understand Code Mobility”(A.Fuggetta, G.P.Picco, G.Vigna)

[IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 24]

Page 23: Network Paradigms And Mobile Code

Languages Level

Abstract Machine Level

Library Levela Graphics supporta Networka Encryptiona Hierarchical Class Support

a Interpreted or Compileda Strongly Typed or Typelessa Programming Paradigm

a Concurrencya Security Modela Memory Managementa Memory Architecturea Platform Architecturea Mobility Mechanisma Shipping or Fetching

An Architecture for Mobile Code

Page 24: Network Paradigms And Mobile Code

Computational Environment

Execution Units

code

stack/registers

data space

Page 25: Network Paradigms And Mobile Code

COS COS COS

COS Core Operating System

HostHostHost

True Distributed System

Network Apps Components

COS COS COS

COS Core Operating System

HostHostHost

CE Computational Environment

CE CE CE

Network Apps Components

NOS Network Operating System NOS Network Operating System

NOS NOS NOS NOS NOS NOS

Hardw

are

Hardw

are

Page 26: Network Paradigms And Mobile Code

Technologies: Inferno by LucentApplication Layer

Kernel Layer

Hardware LayerStyx communication

HostOS

Device drivers network

Secu

rity

Nam

espa

ces

Proc

ess

Man

agem

ent

Mem

ory

Man

agem

ent

Gra

phic

s lib

rary

Dis Virtual Machine

Applications

Assembler C language

Limbo

Java ?

Page 27: Network Paradigms And Mobile Code

Java Architecture

Interrupt

Java Application

DeviceManagement Memory Graphics

Native Operating System

Java class

java.awtjava.netjava.io java.math

I/O TCP/IPnativeMath

GraphicPeerclass

Java VMClass

LoaderLinker thread

mgmt.

Java API

OS API

HD API

byte

code

C /

byte

code

asse

mbl

er /

C

Page 28: Network Paradigms And Mobile Code

Java (Kaffe)

Native Core Library Native AWT Libraries

Execution Engine

SystemCall

SubsystemThread

SubsystemHeap (GC)Subsystem

Native Int.Subsystem

Code Verifier Class Management

java/lang/io/net/util .. packages

java/awt .. packages

CLASSLIBRARIES

Java 1.1Virtual Machine

static/dynamiclinkednative libraries