client and server

hedgebornabaloneΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 11 μήνες)

97 εμφανίσεις

Ertan Deniz

Ertan.deniz70@gmail.com

Instructor




Distributed Computing



Information System Architectures (One


Tier,
Client/Server,Middleware)



Internet Protocols



Messaging



Enterprise Application Integration (EAI)





Adapted from
Michael P.
Papazogl
o
u, Web Services, 1st


Edition, © Pearson Education Limited 2008
. (Book Slides)



Kenneth M.Anderson, CSCI 7818


Distributed Information
Systems Section
http://www.cs.colorado.edu/~kena/classes/7818/f06/lectures/0
2/index.html



Look at the references section for other resources.






A distributed system is characterized as a
collection of

heterogeneous networked computers,
which communicate

and coordinate their actions by
passing messages.

Distribution is transparent to the user so that the system

appears as a single integrated facility.



One important characteristic of a distributed
system is that

processes are not executed on a single
processor, but

rather span a number of processors.


This requires inter
-
process communication mechanisms.



Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





Web services
are a form of distributed
information system. Many of the problems that Web
services try to solve, as well as the design
constraints encountered along the way, can be
understood by considering how distributed information
systems evolved in the past
.

Gustavo Alonso, ETH Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin Heidelberg
, 2003




Distributed Computing



Information System Architectures (One


Tier,
Client/Server,Middleware)



Internet Protocols



Messaging



Enterprise Application Integration (EAI)





Clients interact with the system
through a presentation layer.



The application logic determines
what the system actually does.



It takes care of enforcing the
business rules and establishing the
business process. The application
logic can take many forms:
programs, constraints, workflows,
etc.



The resource manager deals with
the organization (storage, indexing,
and retrieval) of the data necessary
to 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 and
persistence.

Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)





The presentation layer, application
logic and resource manager are built
as a monolithic entity.



Users/programs access the system
through “dumb” terminals, whose
display is controlled by the
information system.



This was the typical architecture
of mainframes, offering several
advantages:



no forced context switches in
the control flow



everything is centralized;
managing and controlling resources
is easier



the design can be highly
optimized by blurring the
separation between layers

Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)





As computers became more powerful, it was
possible to move the presentation layer to the
client.



This has several advantages:



Clients are independent of each other: one
can have several presentation layers
depending on what each client needs to do.



One can take advantage of the computing
power at the client machine to have more
sophisticated presentation layers while also
saving computer resources on the server.



It introduces the concept of API
(Application Program Interface).
An interface
to invoke the system from the outside.



The resource manager only sees one client:
the application logic. This greatly helps with
performance since there are no client
connections/sessions to maintain.



Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)





Client/server systems introduced the
notion of service (the client invokes a
service implemented by the server)



Client Processes = Service
Consumers



Server Processes = Service
Providers



Client/server systems also introduced
the notion of
service interface
(how the
client can invoke a given service)




Taken together, the interfaces to all
the services provided by a server define
the server's API


Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)





Advantages



can off
-
load work from server to clients



work within a server takes place within one scope (similar to 1
tier systems)




server design is still tightly coupled and can be optimized by
ignoring presentation issues




relatively easy to manage from a software engineering point of
view



Disadvantages



A single server can only manage a limited number of clients



Clients are “tied” to the system since there is no standard
presentation layer. If one wants to connect to two systems, then
the client needs two presentation layers



There is no failure or load encapsulation. If a server fails, no
clients can work. Similarly, the load created by a client will
directly affect other clients since they are all competing for the
same resources.




Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)





In a 3 tier system, the three layers are
fully separated; they are also typically
distributed



Middleware introduces an additional layer
of business logic encompassing all underlying
systems



By doing this, a middleware system:



simplifies the design of clients by
reducing the number of interfaces it
needs to know
(Platform details)



provides transparent access to the
underlying systems



acts as a platform for inter
-
system
functionality and high level application
logic
(Closer to Application
Requirements.Reusable application
services; Authentication, Security,
Avaliability)



takes care of locating resources,
accessing them, and gathering results


Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)





Middleware systems also enable the integration of systems built using
other architectures


Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)





N
-
tier architectures result from
connecting several 3
-
tier systems to
each other and/or by adding an
additional layer to allow clients to
access the system via the Web



The Web layer was initially external
to the information system (a true
additional layer); today, it is being
incorporated into a presentation layer
that resides on the server side (part
of the middleware infrastructure in a
three tier system, or part of the
server directly in a two tier system)



The addition of the Web layer led to
the notion of “
application servers

which was used to refer to
middleware
platforms supporting Web access



Kenneth M.Anderson C7818 Lecture Slides . (Adapted from the book
Gustavo Alonso, ETH
Zürich
,

Web Services: Concepts, Architectures and Applications
,
Springer
-
Verlag

Berlin
Heidelberg
, 2003)




Distributed Computing



Information System Architectures (One


Tier,
Client/Server,Middleware)



Internet Protocols



Messaging



Enterprise Application Integration (EAI)





Internet protocols are essentially methods of data transport

across the Internet. They define the standards by which the

different components in a distributed system communicate

across the Internet with each other & with remote components.



The most prominent of the Internet protocols is transport
control

protocol over Internet protocol (or TCP/IP), which
provide for

the reliable delivery of streams of data from one
host to another

across the Internet



The Internet protocol (IP) enables the unreliable delivery
of

individual packets from one host to another.

(
Connectionless
)



IP makes no guarantees as to whether the packet will
be delivered,

how long it will take, or if multiple packets
will arrive in the order they

were sent.



The transport control protocol
(TCP) adds the notions of

connection and reliability
.

(
ConnectionOriented
)

Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





The data link layer provides

the
interface to the actual

network
hardware.



The inter
-
network layer is

responsible for routing

“blocks of
data” from one

host to another.



The transport layer provides

end
-
to
-
end data transfer by

delivering data between the

client
and server sides of an

application.



The application layer is

responsible for supporting

network
applications.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008




Distributed Computing



Information System Architectures (One


Tier,
Client/Server,Middleware)



Internet Protocols



Messaging



Enterprise Application Integration (EAI)





Distributed systems and applications communicate by

exchanging
messages.
Messaging enables high
-
speed,

asynchronous, program
-
to
-
program communication with reliable

delivery.



Message passing between a pair of processes is supported by

two
message communication operations: send and receive,

defined in terms
of destinations and messages.



Marshalling (serialization) is the process of taking any form of

structured data items and breaking up so that it can be

transmitted as
a stream of bytes over a communications network

in such a way that
the original structure can be reconstructed

easily on the receiving end.



Unmarshalling

(
deserialization
) is the process of converting the

assembled stream of bytes on arrival to produce an equivalent

form of
structured data at the destination point.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008



There are two basic modes of

message communication:



Synchronous communication


synchronized between two

communicating application
systems,

which must both be
up and running.



Execution flow at the
client’s side is

interrupted
to execute the call.



Asynchronous communication


the

caller employs a send and
forget

approach that allows it
to continue to

execute after it
sends the message.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





RPC is a basic
mechanism

for inter
-
program

communication,
where the

application
elements use a

request/wait
-
for
-
reply

(synchronous) model of

communication.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





Using procedure call as a model for distributed (remote)
communications.



Some issues



How do we make this invisible to the programmer?



What are the semantics of parameter passing?



How do we bind (locate, connect to) servers?



How do we support heterogeneity (OS,
A
rch
itecture
,
L
anguage
)?



How do we make it perform well?




Geoffrey

M. Voelker, CSE 120


Principles of Operating Systems Lecture,2000





A server defines the server’s interface using an interface
definition language (IDL)



The IDL specifies the names, parameters, and types for all

client
-
callable server procedures



A stub compiler reads the IDL and produces two stub

procedures
for each server procedure (client and server)



The server programmer implements the server procedures and
links them with the server
-
side stubs



The client programmer implements the client program and links it
with the client
-
side stubs



The stubs are responsible for managing all details of the remote
communication between client and server




Geoffrey

M. Voelker, CSE 120


Principles of Operating Systems Lecture,2000





A client
-
side stub is a procedure that looks to the client

as if it
were a callable server procedure



A server
-
side stub looks to the server as if a client called it



The client program thinks it is calling the server



In fact, it’s calling the client stub



The server program thinks it is called by the client



In fact, it’s called by the server stub



The stubs send messages to each other to make the

RPC happen
“transparently”



Geoffrey

M. Voelker, CSE 120


Principles of Operating Systems Lecture,2000



Geoffrey

M. Voelker, CSE 120


Principles of Operating Systems Lecture,2000




Returning parameters” takes place in reverse order





RPC
-
style programming leads to
tight coupling of interfaces

and

applications.

(
Synchronous

communication
)



In an RPC environment each application needs to know the

intimate
details of the interface of every other application


the

number of
methods it exposes and the details of each method

signature it
exposes.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008



Geoffrey

M. Voelker, CSE 120


Principles of Operating Systems Lecture,2000



RPC is the most common model for communication in
distributed applications



“Cloaked” as DCOM, CORBA, Java RMI, etc.



Also used on same node between applications



RPC is essentially language support for distributed
programming



RPC relies upon a stub compiler to automatically

generate client/server stubs from the IDL server
descriptions



These stubs do the marshalling

/

unmarshalling
,
message
s
ending

/

receiving

/

replying





Asynchronous communication promotes loose coupling in

which an
application does not need to know the intimate details

of how to reach
and interface with other applications.



Each participant in a multi
-
step business process flow needs

only be
concerned with ensuring that it can send a message to

the messaging
system.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





With the store and forward queuing mechanism, messages

are placed
on a virtual channel called a message queue by

a sending application and
are retrieved by the receiving

application as needed.



The queue is a container that can hold the message until the

recipient collects it.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008



The application that
produces information
publishes it and all
other

applications that
need this type of
information subscribe to
it.



Messages containing


the new information are


placed in a queue for


each subscriber by the


publishing application.



Each application


may have a dual role:


it may act as a
p
ublisher

or subscriber
of

different types


of information.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





The asynchrony, heterogeneity, and inherent loose coupling

that
characterize modern applications in a wide
-
area network

requires event
notification mechanisms.



Event notification offers a many
-
to
-
many communication and

integration facility. Clients in an event
-
notification scheme are of

two
kinds:



objects of interest, which are the producers of notifications,

and



interested parties, which are the consumers of notifications.



A client can act as both an object of interest and an interested

party. An event notification service typically realizes the

publish/subscribe asynchronous messaging scheme.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





Most asynchronous messaging mechanisms follow the “fire
-
and
-
forget”

messaging principle where the sending application can conduct
its work

as usual once a message was asynchronously sent.



The sending application assumes that the message will arrive
safely

at its destination at some point in time.



This mode of messaging does not preclude the necessity to
perform

request/reply operations.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





MOM is an infrastructure that involves the passing of data

between
applications using a common communication channel

that carries self
-
contained messages.



Messages are sent and received asynchronously.



The messaging system (integration broker) is responsible for

managing
the connection points between clients and for

managing multiple channels
of communication between the

connection points.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





MOM provides the following functions:



event
-
driven processing, i.e., the publish/subscribe model;



reliability and serialization of messages;



subject
-
based (textual) names and attributes to abstract from

physical names and addresses;



multiple communications protocols, e.g., store and forward,

request/reply, publish/subscribe.



An integration broker is an application
-
to
-
application middleware

service capable of one
-
to
-
many, many
-
to
-
one and many
-
to
-
many

message distribution.



It records and manages the contracts between publishers and

subscribers of messages.



An integration broker provides the following functions:



message transformation, business rules processing, routing

services, naming services, adapter services, repository services,

events, and alerts.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008




Distributed Computing



Information System Architectures (One


Tier,
Client/Server,Middleware)



Internet Protocols



Messaging



Enterprise Application Integration (EAI)





EAI has emerged to help organizations eliminate islands of data

and
automation and integrate diverse custom and package

applications
(including legacy).



The objective of EAI is to transform an organization’s internal

applications into a cohesive corporate framework.



EAI enables applications throughout the enterprise to integrate

seamlessly in the form of
business processes
.



The internal applications in an enterprise that EAI attempts to

integrate are called enterprise information systems. These

include the
following:



Custom applications



Legacy and database applications



Enterprise resource planning systems



Customer relationship management systems



Transaction systems.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008



EAI uses a fast, robust
communications backbone
with integration

broker
technology, business process
workflow, and facilities
tools.



Integration brokers are

used for message process

flow & are responsible for

brokering messages

exchanged between two or

more applications.



They provide the ability to



transform



store and route
messages



apply business rules and



respond to events.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





e
-
Business integration solutions grow on the back of successful

internal EAI solutions and provide the capability to link together

disparate processes between trading partners.



systems internal to an enterprise are able to interact with those
of

customers, suppliers, and partners.





Michael P.
Papazogl
o
u, Web Services, 1
st


Edition, © Pearson Education Limited 2008





Michael P.
Papazogl
o
u, Web Services, 1st


Edition, © Pearson
Education Limited 2008
. (Book Slides)



Kenneth M.Anderson, CSCI 7818


Distributed Information Systems
http://www.cs.colorado.edu/~kena/classes/7818/f06/lectures/02/index.h
tml



Gustavo Alonso, ETH Zürich
,

Web Services: Concepts, Architectures
and Applications
,
Springer
-
Verlag

Berlin Heidelberg
, 2003



Geoffrey M. Voelker, CSE 120


Principles of Operating Systems
Lecture,2000





Thanks for your interest...