Sunteți pe pagina 1din 6

System Programming

1. a) Discuss the architecture and operation of Client / Server applications. In your answer, provide an example of a distributed application and critically evaluate the suitability of the Client / Server approach for this type of application. In particular you should discuss: The scale of the application (number of components), The type of application in terms of the type and quantity of data that is sent across the network, The extent of the functionality of the application, The level of transparency required by the application. [25 marks] b) Identify an alternative to the Client / Server architecture. With the aid of diagrams show the difference in the operation of Client / Server and the alternative. Include in your answer a critical assessment of the relative benefits and drawbacks of the two approaches. [25 marks] Answer: a) Client / Server applications is the application logic, which is distributed across at least one client and at least one server. Each component can be on the same or different computer than others. Each component runs as a process, therefore communication between them is at layer 4 (the Transport Layer). Normally the server provides some sort of service to the Clients. Communication is usually initiated by the Clients. Clients typically do not interact directly. Client-server is a computing architecture which separates a client from a server. It is almost always implemented over a computer network. The most basic type of clientserver architecture employs only two types of nodes: clients and servers. This type of architecture is sometimes referred to as two-tier. It allows devices to share files and resources. The Server is a process that provides some sort of computation service. The Client is a process that makes service requests to the Server. The Client is usually associated with human users (it acts as their agent). The Server is usually hosted on a dedicated computer that is designed specially Server provides the service. Client is considered as the customer requesting the service. The server service can be shared among a number of clients. Clients must request or

initiate the service. The location of the server in the network is transparent to clients. Transaction between C/S is message-passing based. C/S architecture is scalable: Horizontally (more clients can added) Vertically (more servers can be added) The server is centrally maintained whereas clients are independent of each other. For example, a file server will house hard drives containing files that all network users can access from their personal workstations. After working on a file, the user can then save the changes back to the server for safekeeping and collaboration. Another example would be a server set up as a dedicated 'post office' for an entire organization, collecting everyone's email from outside sources for internal distribution and serving as the transporter for all outgoing email. In this case each user's computer would be a client of the mail server. b) An alternative to the Client / Server architecture is Peer-to-Peer architecture. Diagram:

Different between Client/Server and Peer-to-Peer architecture: In the client-server model, the server is a centralized system. The more simultaneous clients a server has, the more resources it needs. In a peer-to-peer network, two or more computers (called peers) pool their resources and communicate in a decentralized system. Peers are coequal nodes in a non-hierarchical network. Collectively, lesser-powered computers can share the load and provide redundancy.

Since most peers are personal computers, their shared resources may not be available consistently. Although an individual node may have variable uptime, the resource remains available as long as one or more other nodes offer it. As the availability of nodes changes, an application-layer protocol reroutes requests. Advantages P2P In a pure Peer-to-Peer architecture there is no single point of failure that means, if one peer breaks down, the rest of the peers are still able to communicate. Peer-to-Peer provides the opportunity to take advantage of unused resources such as processing power for computations and storage capacity. In Client-Server architectures, the centralized system bears the majority of the cost of the system. In Peer-to-Peer, all peers help spread the cost, e.g. Napster used the file storage space of participating peers to store all the files. Peer-to-Peer allows to prevent bottleneck such as traffic overload using a central server architecture, because Peer-to-Peer can distribute data and balance request across the net without using a central server. There is better scalability due to a lack of centralized control and because most peers interact with each other.

Disadvantages P2P Today many applications need a high security standard, which is not satisfied by current Peer-to-Peer solutions. The connections between the peers are normally not designed for high throughput rates, even if the coverage of ADSL and Cable modem connections is increasing. A centralized system or a Client-Server system will work as long as the service provider keeps it up and running. If peers start to abandon a Peer-to-Peer system, services will not be available to anyone. Most search engines work best when they can search a central database rather than launch a meta search of peers [2]. This problem is circumvented by the hybrid Peer-toPeer architecture.

Advantages of Client/Server architecture Data management is much easier because the files are in one location. This allows fast backups and efficient error management. There are multiple levels of permissions, which can prevent users from doing damage to files. The server hardware is designed to serve requests from clients quickly. All the data are processed on the server, and only the results are returned to the client. This reduces the amount of network traffic between the server and the client machine, improving network performance. Thin client architectures allow a quick replacement of defect clients, because all data and applications are on the server.

Disadvantages of Client/Server architecture Client-Server-Systems are very expensive and need a lot of maintenance. The server constitutes a single point of failure. If failures on the server occur, it is possible that the system suffers heavy delay or completely breaks down, which can potentially block hundreds of clients from working with their data or their applications. Within companies high costs could accumulate due to server downtime. a) Discuss the characteristics of the TCP and UDP communication protocols. Your answer should include critical evaluation of the main differences in the two protocols and the ways in which these differences affect their use in distributed applications. [25 marks] b) Define the terms Concurrency transparency and Replication transparency, and, in the context of large scale distributed systems in which applications must access and share remote resources such as files or databases, critically discuss the technical challenges that must be overcome to achieve these forms of transparency. Provide suitable application examples to illustrate your answer. [25 marks] Answer: a) Characteristics of the TCP: The primary transport layer protocol in the TCP/IP protocol suite is the Transmission Control Protocol (TCP). TCP is a connection-oriented, acknowledged, reliable, full featured protocol designed to provide applications with a reliable way to send data using the unreliable Internet Protocol (IP). It allows applications to send bytes of data as a stream of bytes and automatically packages them into appropriately sized segments for transmission. It uses a special sliding window acknowledgment system to ensure that its recipient receives all data, handles necessary retransmissions, and provides flow control so that each device in a connection can manage the rate at which other devices send data to it. Characteristics of the UDP: The User Datagram Protocol (UDP) was developed for use by application protocols that do not require reliability, acknowledgment, or flow control features at the transport layer. It is designed to be simple and fast. It provides only transport layer addressing (in the form of UDP ports), an optional checksum capability, and little else.

2.

Summary comparison of TCP and UDP Characteristic/ Description General Description UDP Simple, high-speed, lowfunctionality wrapper that interfaces applications to the network layer and does little else Connectionless; data is sent without setup TCP Full-featured protocol that allows applications to send data reliably without worrying about network layer issues Connection-oriented; connection must be established prior to transmission Message-based; the Stream-based; the application application sends data in sends data with no particular discrete packages structure Unreliable, best-effort Reliable delivery of delivery without messages; all data is acknowledgments acknowledged Not performed; application Delivery of all data is must detect lost data and managed, and lost data is retransmit if needed retransmitted automatically None Flow control using sliding windows; window size adjustment heuristics; congestion-avoidance algorithms Very low Low, but higher than UDP Very high High, but not as high as UDP Small to moderate amounts of Small to very large amounts data (up to a few hundred of data (up to a few bytes) gigabytes) Applications where data Most protocols and delivery speed matters more applications sending data than completeness, where that must be received reliably, small amounts of data are including most file and sent, or where message transfer protocols multicast/broadcast are used Multimedia applications, FTP, Telnet, SMTP, DNS, DNS, BOOTP, DHCP, HTTP, POP, NNTP, TFTP, SNMP, RIP, NFS IMAP, BGP, IRC, NFS (later (early versions) versions)

Protocol Connection Setup

Data Interface to Application

Reliability and Acknowledgments Retransmissions

Features Provided to Manage Flow of Data

Overhead Transmission Speed Data Quantity Suitability

Types of Applications That Use the Protocol

Well-Known Applications and Protocols

b) The implementation of the distributed system is very complex, as a number of issues have to be considered to achieve its final objective. The complexities should not worry the user of the distributed system from using it i.e., the complexities should be hidden from the user who uses the distributed system. This property of the distributed system is called its transparency. There are different kinds of transparencies that the distributed system has to incorporate. The following are the different transparencies encountered in the distributed systems. Concurrency Transparency: Users and Applications should be able to access shared data or objects without interference between each other. This requires very complex mechanisms in a distributed system, since there exists true concurrency rather than the simulated concurrency of a central system. The shared objects are accessed simultaneously. The concurrency control and its implementation is a hard task. The examples are NFS, Automatic Teller machine (ATM) network. Replication Transparency: This kind of transparency should be mainly incorporated for the distributed file systems, which replicate the data at two or more sites for more reliability. The client generally should not be aware that a replicated copy of the data exists. The clients should also expect operations to return only one set of values. The examples are Distributed DBMS and Mirroring of Web pages.

S-ar putea să vă placă și