Upload
a71barletta
View
223
Download
4
Tags:
Embed Size (px)
Citation preview
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 -
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”.
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
Traditional Computing System
Code Component
Resources Component
Service
Computation Component
(CPU,memory,VM)
Interaction
Main design paradigm
• Client/Server (pure)• Remote Evaluation• Code on Demand• Mobile Agent• 3 tier architecture (N-tier architecture)
Measure parameters
• number of interactions• CPU costs• generated network traffic• security• performance & semplicity• scalability• latency • push & pull capabilities
Server(Provider)
Clients(Users)
Client/Server (pure)
Service
Computation Environment
(CPU,memory,VM)
message
Client Server
Es: RPC, HTTP, FTP, Xwindow
data
data
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]
Remote Evaluation & Execution
Service
Computation Environment
(CPU,memory,VM)
message
Client Server
Es: Remote Unix shell (rsh),Scripting, SQL,PostScript
code
message
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
Code on Demand
Service Computation Environment
(CPU,memory,VM)
message
Client Server
Es: ActiveX/IE4.0, Applet, Web services
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]
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
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 !!
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
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 !!!!
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
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
code mobilitydata mobility
data+codeonly datacode + data state
code+data+exec state
Remote Execution
Codeon
Demand
Weak Migration Strong Migration
Client/Server
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
Reference
[1] “Understand Code Mobility”(A.Fuggetta, G.P.Picco, G.Vigna)
[IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 24]
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
Computational Environment
Execution Units
code
stack/registers
data space
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
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 ?
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
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