Lecture 3 S Distributed Systems MM
Lecture 3 S Distributed Systems MM
1
Models of distributed systems
Master/slave
Asynchronous Distributed Systems
Example : Message passing)
Peer to peer
Mobile Agent
Client-Server Model
Multiple
Single server Proxy server Mobile code
servers
4
Model View Control
5
Model View Control (MVC)in Java
• Model: Enterprise Beans with data in the DBMS
– JavaBean: a class that encapsulates objects and can be displayed graphically
–
• Control: Servlets create beans, decide which JSP to return
– Servlet object do the bulk of the processing
• View: The JSPs (Java Server Page) generates the presentation layer ( the browser)
6
Request
7
Model: Layer for storing data and support database functionalities.
View: UI(User Interface) layer. It provides the visualization of the data and keep a track of the
Presenter: accept the request from view and fetch the data from the model and applies the
8
Master-slave architectures
9
A traffic management system with a
master-slave architecture
10
Peer to peer systems
11
Peer-to-peer Systems
P eer 2
P eer 1
Application
Application
Sharable P eer 3
objects
Application
P eer 4
Application
P eers 5 .... N
12
Distributed component architectures
• There is no distinction in a distributed component
architecture between clients and servers.
system.
Distributed Object Architecture
o1 o2 o3 o4
Software bus
o5 o6
S (o5) S (o6)
14
Benefits of distributed component architecture
15
Models of distributed systems
Mobile Agent
Node Node
Host Host
Mobile agent
• Mobile agents refer to self-contained programs
(code and execution status) that can move over
the network and act on behalf of the user.
Encoding Decoding
Dispatch Receipt
Network
Agent transfer
Migrate
Node 1 Node 2
Mobile Agent
Agent Code Data Migrate
Agent
,and Context
Dispatch
Migrate
Home Node n
• Parallel computation.
The cloning features of the mobile agent allow tasks to be
processed in parallel using the required number of agents (e.g.
parallel search)
Bandwidth conservation
Text documents,
numerical data, etc.
Dataset Calculation
software
Client Server
Dataset
Host A Host B
• Dispatch: when an agent leaves its current host and travels to a new
host.
• Cloning: when a twin agent is born from an original agent and the
current state of the original is duplicated.
• Disposal: when an agent life time is terminated and its state is lost
forever.
37
• Data collection from many places.
MA
Server1
MA
Server 1
• Monitoring
Import aglet.*; // import aglet class features and properties e.g. (ibm.aglet.*;)
import aglet.*;
Public class MyFirstAglet extends Aglet
• dispatch(new URL(“http://some.host.com"));
• onDispatch( ) -- called before a dispatch
acts like an electronic librarian who cuts out the content pages of
every book of library in the world sorts them into a extremely large
master index.
• The basic principal is that the index is made from the actual content of
site.
• Crawling is the discovery process in which search engines send out a team of