distributed systems architecture presentation ii presenters rose kit & turgut tezir
Post on 22-Dec-2015
219 Views
Preview:
TRANSCRIPT
Distributed Systems Architecture Distributed Systems Architecture
Presentation IIPresentation II
Presenters
Rose Kit & Turgut TezirRose Kit & Turgut Tezir
OutlineOutline
General View TABLEGeneral View TABLECentralized System Architecture Centralized System Architecture Distributed System Architecture (DSA) Distributed System Architecture (DSA) Advantages of DSA Advantages of DSA Client / Server SystemClient / Server System– Client / Server ArchitectureClient / Server Architecture
Three-Tier client ArchitectureThree-Tier client Architecture– Three-Tier Client Server SystemThree-Tier Client Server System– Three-Tier Internet Banking SystemThree-Tier Internet Banking System
Distributed Object ComputingDistributed Object ComputingDistributed Object ArchitectureDistributed Object ArchitectureAdvantages of Distributed Object ArchitectureAdvantages of Distributed Object ArchitectureDistributed Object Programming TechniquesDistributed Object Programming Techniques
Outline, cont.Outline, cont.Distributed Network OrganizationDistributed Network OrganizationNetwork SchematicNetwork SchematicProtocol LayersProtocol LayersISO OSI Protocol LayersISO OSI Protocol LayersTCP/IP Network ModelTCP/IP Network ModelHow OSI relates to TCP/IP LayersHow OSI relates to TCP/IP LayersNetwork SchematicNetwork SchematicInternet Protocol (IP)Internet Protocol (IP)Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)User Datagram Protocol (UDP)User Datagram Protocol (UDP)CommunicationCommunicationMessage passingMessage passingSocketsSocketsDifficult To Reuse CodeDifficult To Reuse CodeDistributed Object Architecture and TCPDistributed Object Architecture and TCPDistributed Object Architecture and C/S ModelDistributed Object Architecture and C/S ModelMiddlewareMiddlewareDistributed Object Architecture ModelDistributed Object Architecture ModelDisadvantages of Distributed Object ArchitectureDisadvantages of Distributed Object ArchitectureRMI ExampleRMI Example
General View TABLEGeneral View TABLE
Centralized systems: Centralized systems: Data, Process and Data, Process and Interface components of an information Interface components of an information system are central. Users interact with the system are central. Users interact with the system via terminals or terminal system via terminals or terminal emulators.emulators.– A single computer with one ore more CPUs A single computer with one ore more CPUs
processes all incoming requestprocesses all incoming request– Problems with cost, reliabilityProblems with cost, reliability– Specification and implementation are defined Specification and implementation are defined
within a single systemwithin a single system
Centralized System Architecture Centralized System Architecture
Centralized System ArchitectureCentralized System Architecture
Centralized System ArchitectureCentralized System Architecture
Distributed System ArchitectureDistributed System Architecture
Distributed System: Distributed System: Data, Process, and Interface Data, Process, and Interface components of an information system are distributed to components of an information system are distributed to multiple locations in a computer network. Accordingly, multiple locations in a computer network. Accordingly, the processing workload is distributed across the the processing workload is distributed across the network.network.– Set of separate computers that are capable of autonomous Set of separate computers that are capable of autonomous
operation, link by a computer network.operation, link by a computer network.– Enable individual computers (different location) to share Enable individual computers (different location) to share
resources in the networkresources in the network– Server implementation for the same interface located in different Server implementation for the same interface located in different
servers.servers.
Distributed System ArchitectureDistributed System Architecture
Advantages of DSAAdvantages of DSA
Companies are preferring their system decentralized and Companies are preferring their system decentralized and distributed, because Distributed System allows distributed, because Distributed System allows companies to have better customer services. companies to have better customer services. – Shareability: Shareability: Allows systems to use each other’s resourcesAllows systems to use each other’s resources– Expandability: Expandability: Permits new systems to be added as members Permits new systems to be added as members
of the overall systemof the overall system– Local Autonomy: Local Autonomy: Manage local resourcesManage local resources– Improved performance: Improved performance: Resource replication. Combined Resource replication. Combined
processing power of multiple computers provides much more processing power of multiple computers provides much more processing power than a centralised system with multiple CPUsprocessing power than a centralised system with multiple CPUs
– Improved reliability and availability: Improved reliability and availability: Disruption would not stop Disruption would not stop the whole system from providing its services as resources the whole system from providing its services as resources spread across multiple computersspread across multiple computers
– Potential cost reductionsPotential cost reductions
Client / ServerClient / Server
Client/server is a distributed computing model in which client applications request services from server processes. Clients and servers typically run on different computers interconnected by a computer network.– Client application is a process or program that sends messages
to a server via the network. Those messages request the server to perform a specific task, such as looking up a customer record in a database or returning a portion of a file on the server’s hard disk.
– Server process or program listens for client requests that are transmitted via the network. Servers receive those requests and perform actions such as database queries and reading files.
Client / Server SystemClient / Server System
Client / Server ArchitectureClient / Server Architecture
Three-tier ArchitecturesThree-tier ArchitecturesAn important design consideration for large client/server systems is whether a client talks directly to the server, or whether an intermediary process is introduced in-between the client and the server. The former is a two-tier architecture, the latter is a three-tier architecture.In the three-tier architecture, process between Server and client (intermediary) process is: – separate the clients and servers.– cache frequently accessed server data to ensure better performance
and scalability.– Performance can be increased by having the intermediary process to
distribute client requests to several servers such that requests execute in parallel.
– The intermediary can also act as a translation service by converting requests and replies to and from a mainframe format, or as a security service that grants server-access only to trusted clients.
Three-Tier Client Server SystemThree-Tier Client Server System
Three-Tier Internet Banking SystemThree-Tier Internet Banking System
Distributed Object Computing Distributed Object Computing
Distributed object computing is Object-oriented modeling and programming that is applied to the development of client/server systems. – Objects are pieces of software that make distributed object
computing accessible through a well defined interface.– The interface consists of object operations and attributes that
are remote accessible.– Client applications may connect to a remote instance of the
interface and invoke the operations on the remote object. The remote object acts as a server.
– Client/server objects have to interact with each other even if they are written in different programming languages and to run on different hardware and operating system platforms.
Distributed Object ArchitectureDistributed Object Architecture
There is no distinction in a distributed object architecture between clients and serversEach distributable entity is an object that provides services to other objects and receives services from other objectsObject communication is through a middleware system called an object request broker (software bus)
Distributed Object ArchitectureDistributed Object Architecture
Advantages of Distributed Object Architecture
It allows the system designer to delay decisions on where and how services should be provided
It is a very open system architecture that allows new resources to be added to it as required
The system is flexible and scaleable
It is possible to reconfigure the system dynamically with objects migrating across the network as required
Distributed Network OrganizationDistributed Network Organization
Network can be organized over a WANNetwork can be organized over a WAN
WAN consists of a series of LANs WAN consists of a series of LANs connected together through routersconnected together through routers
Individual nodes (machines) in a LAN are Individual nodes (machines) in a LAN are connected to each other through a hubconnected to each other through a hub
Each machine on a network can function Each machine on a network can function as the server for a particular set of as the server for a particular set of servicesservices
Network SchematicNetwork Schematic
WANWAN
Router
Hub
Computer 1
Computer 2
Computer 3
Computer 4 Computer 5
Router
Hub
LAN
LAN
Protocol LayersProtocol Layers
Protocols are the standard rules for Protocols are the standard rules for communications between processescommunications between processes
Network communications requires Network communications requires protocols to cover high-level application protocols to cover high-level application communication all the way down to wire communication all the way down to wire communication communication
Complexity is handled by encapsulation in Complexity is handled by encapsulation in protocol layers protocol layers
TCP/IP Network Model
TCP/IP layers combine layers of ISO/OSI
TCP/IP Network ModelTCP/IP Network Model
Networking is implemented as a series of Networking is implemented as a series of layered protocols starting at the lowest level (the layered protocols starting at the lowest level (the electronic signals on the wire and the physical electronic signals on the wire and the physical cable) up through the higher levels.cable) up through the higher levels.
TCP/IP LayersTCP/IP Layers– Layer 1: Layer 1: LinkLink (devices and drivers) (devices and drivers)– Layer 2: Layer 2: NetworkNetwork (IP) (IP)– Layer 3: Layer 3: TransportTransport (TCP) (TCP)– Layer 4: Layer 4: Application Application (Provide network services)
How OSI relates to TCP/IP LayersHow OSI relates to TCP/IP Layers
Network SchematicNetwork Schematic
WANWAN
Router
Hub
Computer 1
Computer 2
Computer 3
Computer 4 Computer 5
Router
Hub
Network SchematicNetwork Schematic
WANWAN
Router
Hub
Computer 1
Computer 2
Computer 3
Computer 4 Computer 5
Router
Hub
Network SchematicNetwork Schematic
WANWAN
Router
Hub
Computer 1
Computer 2
Computer 3
Computer 4 Computer 5
Router
Hub
Internet Protocol (IP)Internet Protocol (IP)
IP is the lowest level of network IP is the lowest level of network communication that handles packet communication that handles packet communication between machinescommunication between machinesIP is an unreliable protocol where a IP is an unreliable protocol where a message sent is not guaranteed to reach message sent is not guaranteed to reach the intended recipientthe intended recipientHigher level protocols use IP as their basic Higher level protocols use IP as their basic communication scheme adding reliability communication scheme adding reliability and other useful featuresand other useful features
Transmission Control Protocol Transmission Control Protocol (TCP)(TCP)
TCP is a higher level protocol built on top of IP. TCP is a higher level protocol built on top of IP. The vast majority of network traffic take place The vast majority of network traffic take place using the TCP protocol.using the TCP protocol.TCP is connection-based – a connection TCP is connection-based – a connection between two nodes is established up front and between two nodes is established up front and then messages may be sent in both directions.then messages may be sent in both directions.The TCP address is a combination of an IP The TCP address is a combination of an IP address that identifies a machine and a port on address that identifies a machine and a port on that machine. Using ports, it’s possible to that machine. Using ports, it’s possible to participate in multiple independent network participate in multiple independent network communications, even to communicate between communications, even to communicate between different processes on the same machine.different processes on the same machine.
User Datagram Protocol (UDP)User Datagram Protocol (UDP)
UDP is also extends IP with the addition of ports UDP is also extends IP with the addition of ports (like TCP). (like TCP). UDP is connectionless and unreliable (like IP).UDP is connectionless and unreliable (like IP).UDP is less complex and performs better than UDP is less complex and performs better than TCP.TCP.UDP is often used in implementing client/server UDP is often used in implementing client/server applications in distributed systems built over applications in distributed systems built over local area networks where the physical local area networks where the physical connection is over a shorter distance and there connection is over a shorter distance and there is less chance of losing packets. is less chance of losing packets.
CommunicationCommunication
Sharing data is easy when communicating Sharing data is easy when communicating between two processes that are in the between two processes that are in the same address space.same address space.Messages provide for communication Messages provide for communication without shared data. without shared data. Message - a piece of information that is Message - a piece of information that is passed from one process to another.passed from one process to another.One process or the other owns the data at One process or the other owns the data at any point, never both at the same time. any point, never both at the same time.
Message passingMessage passing
SocketsSockets
Sockets is a method for communication between Sockets is a method for communication between a client program and a server program in a a client program and a server program in a networknetworkCommunicating with sockets is low-level where Communicating with sockets is low-level where both the client and server are responsible for both the client and server are responsible for ensuring that the TCP or UDP protocol is ensuring that the TCP or UDP protocol is followed correctlyfollowed correctlyBoth client and server must correctly code Both client and server must correctly code header information about the message, the header information about the message, the message size, the IP address and port number, message size, the IP address and port number, etc.etc.
Difficult to reuse codeDifficult to reuse code
User Interface
Business Logic
Data Management
Server
Client 1New 1…
Adapter 1
New n
Adapter n
Distributed Object Architecture and Distributed Object Architecture and TCPTCP
To allow for programming and distributing objects across distributed networks, TCP is used with a middleware system– At the TCP level, all the connections between
objects on networked computers appear identical because the details of routing across hubs, routers, etc. are all handled at lower levels
– Object communication is through a middleware system
Distributed Object Architecture and Distributed Object Architecture and C/S ModelC/S Model
Client applications are represented by Client applications are represented by objectsobjects
Server applications are represented by Server applications are represented by objectsobjects
Back-end services like database can also Back-end services like database can also be represented as objectsbe represented as objects
The role between client and server is not The role between client and server is not necessarily fixed in a networknecessarily fixed in a network
MiddlewareMiddleware
A software layer that sits between applications A software layer that sits between applications and the network operating system to hide the and the network operating system to hide the different underlying platforms different underlying platforms Provides more distribution transparencyProvides more distribution transparencyInstead of communicating through operations on Instead of communicating through operations on low level sockets and using the interfaces of the low level sockets and using the interfaces of the local file system, middleware offers services for local file system, middleware offers services for different machines to pass each other messages different machines to pass each other messages at a higher abstraction level.at a higher abstraction level.Java RMI, CORBA, and DCOMJava RMI, CORBA, and DCOM
Distributed Object Architecture Distributed Object Architecture ModelModel
Distributed Object Architecture Distributed Object Architecture ModelModel
Distributed Object Architecture Distributed Object Architecture ModelModel
Distributed Object Architecture Distributed Object Architecture ModelModel
Distributed Object Architecture Distributed Object Architecture ModelModel
Disadvantages of Distributed Disadvantages of Distributed Object ArchitectureObject Architecture
Multiple protocols may be involvedMultiple protocols may be involved
Client, server, and back-end services may have Client, server, and back-end services may have to understand, interpret, and translate between to understand, interpret, and translate between multiple protocolsmultiple protocols
Data structures on the client, server, and back-Data structures on the client, server, and back-end may conflict with each other and with end may conflict with each other and with standard protocolsstandard protocols
Client, server, and back-end may each be Client, server, and back-end may each be written in a different programming languagewritten in a different programming language
Distributed Object Programming Distributed Object Programming TechniquesTechniques
Java supports both RMI and CORBAJava supports both RMI and CORBA– Remote Method Invocation allows objects in a Remote Method Invocation allows objects in a
network to remotely invoke methods of other objects network to remotely invoke methods of other objects in the same networkin the same network
– Objects can be transported across the network using Objects can be transported across the network using CORBA’s standard protocol, IIOPCORBA’s standard protocol, IIOP
– All CORBA objects are filtered through an Object All CORBA objects are filtered through an Object Request Broker (ORB) which allows objects to be Request Broker (ORB) which allows objects to be translated from one language to anothertranslated from one language to another
RMI ExampleRMI Example
RMI calls a method of the remote objectRMI calls a method of the remote object
x = remoteObj.MethodA(param); Remote ObjectRemote Object
StubStub
Remote Reference Layer
Transport Layer
RMI ExampleRMI Example
Stub is generated which then sends Stub is generated which then sends marshalled data to receivermarshalled data to receiver
x = remoteObj.MethodA(param); Remote ObjectRemote Object
StubStub
Remote Reference Layer
Transport Layer
Receiver
RMI ExampleRMI Example
Receiver unmarshals, or decodes, parameters, Receiver unmarshals, or decodes, parameters, locates object and calls the method specified by locates object and calls the method specified by the stubthe stub
x = remoteObj.MethodA(param); Remote ObjectRemote Object
StubStub
Remote Reference Layer
Transport Layer
Receiver
RMI ExampleRMI Example
Receiver retrieves and marshals return value and Receiver retrieves and marshals return value and sends back the encoded info to the stubsends back the encoded info to the stub
x = remoteObj.MethodA(param); Remote ObjectRemote Object
StubStub
Remote Reference Layer
Transport Layer
Receiver
top related