Presentation on theme: "Distributed Systems Architecture Presentation II Presenters Rose Kit & Turgut Tezir."— Presentation transcript:
Distributed Systems Architecture Presentation II Presenters Rose Kit & Turgut Tezir
Outline General View TABLE Centralized System Architecture Distributed System Architecture (DSA) Advantages of DSA Client / Server System –Client / Server Architecture Three-Tier client Architecture –Three-Tier Client Server System –Three-Tier Internet Banking System Distributed Object Computing Distributed Object Architecture Advantages of Distributed Object Architecture Distributed Object Programming Techniques
Outline, cont. Distributed Network Organization Network Schematic Protocol Layers ISO OSI Protocol Layers TCP/IP Network Model How OSI relates to TCP/IP Layers Network Schematic Internet Protocol (IP) Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Communication Message passing Sockets Difficult To Reuse Code Distributed Object Architecture and TCP Distributed Object Architecture and C/S Model Middleware Distributed Object Architecture Model Disadvantages of Distributed Object Architecture RMI Example
Centralized systems: Data, Process and Interface components of an information system are central. Users interact with the system via terminals or terminal emulators. –A single computer with one ore more CPUs processes all incoming request –Problems with cost, reliability –Specification and implementation are defined within a single system Centralized System Architecture
Distributed System Architecture Distributed System: Data, Process, and Interface components of an information system are distributed to multiple locations in a computer network. Accordingly, the processing workload is distributed across the network. Distributed System: Data, Process, and Interface components of an information system are distributed to multiple locations in a computer network. Accordingly, the processing workload is distributed across the network. –Set of separate computers that are capable of autonomous operation, link by a computer network. –Enable individual computers (different location) to share resources in the network –Server implementation for the same interface located in different servers.
Advantages of DSA Companies are preferring their system decentralized and distributed, because Distributed System allows companies to have better customer services. –Shareability: Allows systems to use each other’s resources –Expandability: Permits new systems to be added as members of the overall system –Local Autonomy: Manage local resources –Improved performance: Resource replication. Combined processing power of multiple computers provides much more processing power than a centralised system with multiple CPUs –Improved reliability and availability: Disruption would not stop the whole system from providing its services as resources spread across multiple computers –Potential cost reductions
Client / 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 Architecture Client / Server Architecture
Three-tier Architectures An 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.
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 Architecture There is no distinction in a distributed object architecture between clients and servers Each distributable entity is an object that provides services to other objects and receives services from other objects Object communication is through a middleware system called an object request broker (software bus)
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 Organization Network can be organized over a WAN WAN consists of a series of LANs connected together through routers Individual nodes (machines) in a LAN are connected to each other through a hub Each machine on a network can function as the server for a particular set of services
Network Schematic WAN Router Hub Computer 1 Computer 2 Computer 3 Computer 4 Computer 5 Router Hub LAN
Protocol Layers Protocols are the standard rules for communications between processes Network communications requires protocols to cover high-level application communication all the way down to wire communication Complexity is handled by encapsulation in protocol layers
TCP/IP Network Model TCP/IP layers combine layers of ISO/OSI
TCP/IP Network Model Networking is implemented as a series of layered protocols starting at the lowest level (the electronic signals on the wire and the physical cable) up through the higher levels. TCP/IP Layers –Layer 1: Link (devices and drivers) –Layer 2: Network (IP) –Layer 3: Transport (TCP) –Layer 4: Application –Layer 4: Application (Provide network services)
Internet Protocol (IP) IP is the lowest level of network communication that handles packet communication between machines IP is an unreliable protocol where a message sent is not guaranteed to reach the intended recipient Higher level protocols use IP as their basic communication scheme adding reliability and other useful features
Transmission Control Protocol (TCP) TCP is a higher level protocol built on top of IP. The vast majority of network traffic take place using the TCP protocol. TCP is connection-based – a connection between two nodes is established up front and then messages may be sent in both directions. The TCP address is a combination of an IP address that identifies a machine and a port on that machine. Using ports, it’s possible to participate in multiple independent network communications, even to communicate between different processes on the same machine.
User Datagram Protocol (UDP) UDP is also extends IP with the addition of ports (like TCP). UDP is connectionless and unreliable (like IP). UDP is less complex and performs better than TCP. UDP is often used in implementing client/server applications in distributed systems built over local area networks where the physical connection is over a shorter distance and there is less chance of losing packets.
Communication Sharing data is easy when communicating between two processes that are in the same address space. Messages provide for communication without shared data. Message - a piece of information that is passed from one process to another. One process or the other owns the data at any point, never both at the same time.
Sockets Sockets is a method for communication between a client program and a server program in a network Communicating with sockets is low-level where both the client and server are responsible for ensuring that the TCP or UDP protocol is followed correctly Both client and server must correctly code header information about the message, the message size, the IP address and port number, etc.
Difficult to reuse code User Interface Business Logic Data Management Server Client 1 New 1… Adapter 1 New n Adapter n
Distributed Object Architecture and TCP 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 C/S Model Client applications are represented by objects Server applications are represented by objects Back-end services like database can also be represented as objects The role between client and server is not necessarily fixed in a network
Middleware A software layer that sits between applications and the network operating system to hide the different underlying platforms Provides more distribution transparency Instead of communicating through operations on low level sockets and using the interfaces of the local file system, middleware offers services for different machines to pass each other messages at a higher abstraction level. Java RMI, CORBA, and DCOM
Disadvantages of Distributed Object Architecture Multiple protocols may be involved Client, server, and back-end services may have to understand, interpret, and translate between multiple protocols Data structures on the client, server, and back- end may conflict with each other and with standard protocols Client, server, and back-end may each be written in a different programming language
Distributed Object Programming Techniques Java supports both RMI and CORBA –Remote Method Invocation allows objects in a network to remotely invoke methods of other objects in the same network –Objects can be transported across the network using CORBA’s standard protocol, IIOP –All CORBA objects are filtered through an Object Request Broker (ORB) which allows objects to be translated from one language to another
RMI Example RMI calls a method of the remote object x = remoteObj.MethodA(param); Remote Object Stub Remote Reference Layer Transport Layer
RMI Example Stub is generated which then sends marshalled data to receiver x = remoteObj.MethodA(param); Remote Object Stub Remote Reference Layer Transport Layer Receive r
RMI Example Receiver unmarshals, or decodes, parameters, locates object and calls the method specified by the stub x = remoteObj.MethodA(param); Remote Object Stub Remote Reference Layer Transport Layer Receive r
RMI Example Receiver retrieves and marshals return value and sends back the encoded info to the stub x = remoteObj.MethodA(param); Remote Object Stub Remote Reference Layer Transport Layer Receive r