Professional Documents
Culture Documents
Saswati Mukherjee
What Is Service?
• Definition :
• Web service is self-describing and stateless modules that perform discrete
units of work and are available over the network
• Web service providers offer APIs that enable developers to exploit
functionality over the Internet, rather than delivering full-blown applications
Service Oriented Architecture
• Definition
• Service Oriented Architecture (SOA) is essentially a
collection of services which communicate with each other
• Contain a flexible set of design principles used during the
phases of systems development and integration
• Provide a loosely-integrated suite of services that can be
used within multiple business domains
• Approach
• Usually implemented by Web Service model
Cloud: Client Server
Client Presentation layer • Client is any user or program that wants to perform an
operation over the system. Clients interact with the
system through a presentation layer
Application Logic Business rules
Client Client
• The resource manager deals with the organization
(storage, indexing, and retrieval) of the data necessary to
Server Business processes support the application logic. This is typically a database
but it can also be a text retrieval system or any other
data management system providing querying capabilities
Database Persistent storage and persistence.
Boxes and arrows
• Each box represents a part of the system.
• Each arrow represents a connection between two parts
of the system.
• The more boxes, the more modular the system: more
opportunities for distribution and parallelism. This allows
encapsulation, component based design, reuse.
• The more boxes, the more arrows: more sessions
(connections) need to be maintained, more coordination
is necessary. The system becomes more complex to
There is no problem in system monitor and manage.
design that cannot be solved • The more boxes, the greater the number of context
by adding a level of indirection. switches and intermediate steps to go through before
There is no performance one gets to the data. Performance suffers considerably.
problem that cannot be solved • System designers try to balance the flexibility of modular
by removing a level of design with the performance demands of real
applications. Once a layer is established, it tends to
indirection. migrate down and merge with lower layers.
Top down design
• The functionality of a system is divided among
several modules. Modules cannot act as a top-down architecture
separate component, their functionality
depends on the functionality of other modules.
PL-B
• Hardware is typically homogeneous and the PL-A
system is designed to be distributed from the
beginning.
PL-C
top-down design
D
L-
A
AL-B -C
D AL-A
L
L-
AL-A A
A
top-down design
information system
protocols
bottom-up architecture
PL-A PL-B
PL-C PL-C
AL-B
-C AL-B
D
L -C
L-
AL-A A AL
D
L-
wrapper wrapper wrapper
A
AL-A
bottom-up design
information system
3. wrap existing resources application logic
and integrate their functionality layer
into a consistent interface
server’s API
server
service service service service
resource management
layer
Thin Client
• There are clear technical advantages when going from one tier to two tier architectures:
• take advantage of client capacity to off-load work to the clients
• work within the server takes place within one scope (almost as in 1 tier),
• the server design is still tightly coupled and can be optimized by ignoring presentation issues
• still relatively easy to manage and control from a software engineering point of view
3-tier architecture
• In a 3 tier system, the three layers are
fully separated.
• The layers are also typically distributed
taking advantage of the complete
modularity of the design (in two tier
systems, the server is typically
centralized)
• A middleware based system is a 3 tier
architecture. This is a bit oversimplified
but conceptually correct since the
underlying systems can be treated as
black boxes. In fact, 3 tier makes only
sense in the context of middleware
systems (otherwise the client has the
same problems as in a 2 tier system).
Middleware
connecting logic
wrappers
2 tier systems
Resource
managers 2 tier system Resource
manager
N-tier: connecting to the Web
FIREWALL
internal
clients Web
server
LAN cluster
LAN
middleware
application LAN,
logic gateways
LAN
resource middleware
application
Wrappers
and
management logic gateways
LAN LAN
layer
database file application additional resource
server server management layers
Distributed System
• Definition
A distributed system is a collection of
autonomous computers linked by a
computer network that appear to the
users of the system as a single
computer.
Application Application
Network IP Network
Physical Link
Reliable Communication
• TCP: Reliable, connection oriented
• To satisfy the integrity property of reliable
communication,
– TCP uses checksums to detect and reject corrupt
packets and
– Uses sequence numbers to detect and reject duplicate
packets.
• For the sake of the validity property, TCP uses
timeouts and retransmissions to deal with lost
packets.
• Hence, messages are guaranteed to be delivered
even when some of the underlying packets are lost.
. • UDP, Unreliable and connectionless.
Distributed Communication
• Reliable communication
• Considerations
– Types of groups
– Types of communication in group
communication
Reliable Group Communication
• A group communication service is reliable if the
communication service is able to mask some of the
failures that would be injected by the unreliable
channel.
• Definition: A group communication is reliable if it
possesses validity, integrity and agreement:
(applicable for all distributed communication)
– Validity: A message sent by a sender is eventually
received by the receiver.
– Integrity: two assurances
• The message received is identical to one sent,
• No messages are delivered twice: implies at most once protocol.
– Agreement: If a sent message is delivered to one of the
processes in a group, it is delivered to all processes in
the group.
• Applicable only in a group communication.
Validity: Problem
• Essentially, in a group of
communicating nodes, a cooperative
agreement is difficult!
• Network failures.
Types of Groups
• Traditionally, information systems use blocking idle timecalls (the client sends a
ASYNCHRONOUS
ENHANCED SUPPORTINTERACTION
• Using
Client/Server
asynchronous
systemsinteraction,
and middleware
the caller
platforms
sends provide
a message
a number
that gets
of
mechanisms
stored somewhere
to dealuntil
withthe
thereceiver
problems reads
created
it andbysends
synchronous
a response.
interaction:
The response is sent in a similar manner
• Transactional interaction
• Asynchronous interaction: to enforce
can take exactly
place inonce
two execution
forms: semantics and
enable more complex interactions with some execution guarantees
• non-blocking invocation (a service invocation but the call returns immediately
• Service
withoutreplication
waiting forand load balancing:
a response, to batch
similar to prevent the service from becoming
jobs)
unavailable when there is a failure (however, the recovery at the client side is
• persistent queues (the call and the response are actually persistently stored
still a problem of the client)
until they are accessed by the client and the server)
Message queuing
*
Boradcasting
P1 P2
P3
Multicast
• What is correctness?
– All nodes of the group should receive
the sent message.
– The complete message should be
received by all
– Messages should be delivered in order
Correctness: All Nodes Receive
message m1 P3
P1
Multicasts
message m1 message m1
P4 message m1 P2
to a multicast
group having
7 members
message m1 P5
P7
• What is correctness?
– All nodes of the group should receive
the message
– The complete message should be
received by all
– Messages should be delivered in order
Correctness: Complete Message
message 64 P3
bit m1
P1
Multicasts 64
bit message message 32
P2 message 64 P4
m1 to a
bit m1 bit m1’
multicast
group having
7 members
message 64 P5
message 64 P7 bit m1
bit m1
• Why does it happen? message 32 P6
bit m1’
– M1may consist of
two packets
– Some packets are dropped
Multicasting
• What is correctness?
– All nodes of the group should receive
the message
– The complete message should be
received by all
– Messages should be delivered in order
Correctness: Delivered in Order
message m1,
then m2
Multicasts two
message m1 message m1,
message m2
and m2 to a then m2
then m 1
multicast
group having
7 members
message m1
message m1,
then m2
then m2
message m2,
then m1
Large
Medium Separate and heavyweight process
Programmer
Fine Function or procedure
Programmer
Very fine Loop or instruction block
Parallelizing compiler
Instruction
Processor
eed
Number processors versus speed.
Cost versus speed.
Parallel Computing
• The development of parallel computing, which encompasses techniques, architectures, and
systems for performing multiple activities in parallel are referred to as Parallel Computing.
• The term parallel computing has blurred its edges with the term distributed computing and
is often used in place of the latter term.
• Processing of multiple tasks simultaneously on multiple processors is called parallel
processing.
• The parallel program consists of multiple active processes (tasks) simultaneously solving a
given problem.
• A given task is divided into multiple subtasks using a divide-and-conquer technique, and
each subtask is processed on a different central processing unit (CPU).
• Programming on a multiprocessor system using the divide-and-conquer technique is called
parallel programming.
Parallel Computing
• Parallel Processing
• Parallel processing is a form of computation in which many
calculations are carried out simultaneously, operating on
the principle that large problems can often be divided into
smaller ones, which are then solved concurrently.