Presentation is loading. Please wait.

Presentation is loading. Please wait.

Principles of Network Applications

Similar presentations


Presentation on theme: "Principles of Network Applications"— Presentation transcript:

1 Principles of Network Applications

2 Some network apps e-mail web text messaging remote login
P2P file sharing multi-user network games streaming stored video (YouTube, Hulu, Netflix) voice over IP (e.g., Skype) real-time video conferencing social networking search

3 Application architectures
transport network data link physical possible structure of applications: client-server peer-to-peer (P2P) Hybrid of client-server and P2P

4 Client-Server Architecture
always-on host permanent IP address data centers for scaling clients: communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other client/server

5 P2P Architecture no always-on server
arbitrary end systems directly communicate peers request service from other peers, provide service in return to other peers self scalability – new peers bring new service capacity, as well as new service demands peers are intermittently connected and change IP addresses complex management peer-peer

6 Hybrid of Client-Server and P2P
Skype Voice-Over-IP (VoIP) P2P application Centralized server: finding address of remote party: Client-Client connection: direct (not through server) Instant Messaging Chatting between two users is P2P Centralized service: client presence detection/location user registers its IP address with central server when it comes online user contacts central server to find IP addresses of buddies (friends) peer-peer

7 Processes Communicating
clients, servers process: program running within a host within same host, two processes communicate using: inter-process communication (IPC) (defined by OS) processes in different hosts communicate by exchanging messages client process: process that initiates communication server process: process that waits to be contacted Himm: applications with P2P architectures have client processes & server processes

8 Sockets process sends/receives messages to/from its socket
socket analogous to door sending process shoves message out door sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process application application socket controlled by app developer process process transport transport network network controlled by OS link Internet link physical physical

9 Addressing Processes to receive messages, process must have identifier
host device has unique 32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process? identifier includes both IP address and port numbers associated with process on host. example port numbers: HTTP server: 80 mail server: 25 to send HTTP message to just.edu.jo web server: IP address: port number: 80 A: no, many processes can be running on the same host

10 Network Applications/1
Most Net Applications use the Client-Server architecture, In which two processes (applications) communicate with each other to exchange some information. One of the two processes acts as a client process, and the other one acts as a server

11 Network Applications/2
Client Process Typically makes a request for information. After getting the response, it may terminate or may do some other processing (or even other requests). Example: Internet Browser works as a client application, It sends a request to the Web Server to get one HTML webpage.

12 Network Applications/3
Server Process Takes/Receives a request from clients When it gets a request from a client, the server process will perform the required processing, gather the requested information, and send it to the requestor client. Once done, it becomes ready to serve another client. Server processes are always alert and ready to serve incoming requests.

13 Network Applications/4
Example: Web Server keeps waiting for requests from Internet Browsers As soon as it gets any request from a browser, it picks up a requested HTML page and sends it back to that Browser. Note that: A client needs to know the address of the server: (IP and Port), but The server does not need to know the address or even the existence of the client prior to the connection being established/requested. Once a connection is established, both sides (client & server know about each others) and can send and receive information back and forth between them.

14 System Architecture The architecture of a computer system is the high-level (most general) design on which the system is based Architectural features include: Components Collaborations (how components interact) Connectors (how components communicate, communication methods)

15 Client-Server Architecture
Each component of a Client-Server system has the role of either client or server Client: a component that makes requests clients are active initiators of transactions Server: a component that satisfies requests servers are passive and react to client requests

16 Centralized / Distributed
The client-server architecture can be thought of as a median between Centralized Processing: computation is performed on a central platform, (a set of central servers) Distributed Processing: computation is performed on platforms located with the user Distributed Systems: physically separate computers working together Challenge: coordination is more difficult when performed over a network Centralized Client / Server Distributed

17 Client-Server Architecture
The Web is a client-server system Web browsers act as clients, and make requests to web servers Web servers respond to requests with requested information and/or computation Client Client Server Client Server request Client Client Server

18 Tiered Web Architectures
Web applications are usually implemented with: 2-tier, 3-tier, or multitier (N-tier) architectures Each tier is a platform (client or server) with a unique responsibility

19 2-Tier Architecture Tier 1: Client platform, hosting a web browser
Tier 2: Server platform, hosting all server software components

20 2-Tier Characteristics
Advantage: Inexpensive (single platform) Disadvantages Interdependency (coupling) of components No redundancy Limited scalability Typical application users Small company or organization, e.g., law office, medical practice, local non-profit

21 3-Tier Architecture Tier 3 takes over part of the server function from tier 2, typically data management, etc.

22 3-Tier Characteristics
Advantages Improved performance, from specialized hardware Decreased coupling of software components Improved scalability Disadvantages No redundancy Typical Application users Small business or regional organization, e.g., specialty retailer, small college and universities

23 Multitier C/S Architecture
A multitier (N-tier) architecture is an expansion of the 3-tier architecture, The expansion can be in one of several different possible ways Replication of the function of a tier Specialization of function within a tier Portal services, focusing on handling incoming web traffic

24 Replication Application and data servers are replicated
Servers share the total workload

25 Specialization Servers are specialized
Each server handles a designated part of the workload, by function

26 Portal Services Portal servers handle incoming traffic, reducing application server load e.g., firewall, load balancer, transaction processing manager

27 Multi-Tier Characteristics
Advantages Decoupling of software components Flexibility to add/remove platforms in response to load Scalability Redundancy Disadvantages Higher costs (maintenance, design, electrical load, cooling) Typical Application 1000+ users Large business or organization

28 Characteristics Summary
2-Tier 3-Tier N-Tier 10 100 1000 users large e-commerce, business, or organization small e-commerce, regional business or organization local business or organization Capacity, scalability, redundancy, & cost

29 Summary 2-Tier vs. 3-Tier 2-Tier Architecture
The client directly interacts with the server. This may have some security holes and performance problems. For example: Internet Explorer and Web Server work on 2-tier architecture Here security problems are resolved using: Secure Socket Layer (SSL) or the new version is Transport Layer Security (TLS) i.e. HTTPS uses port # 443 (also called HTTP over TLS, HTTP over SSL, or HTTP Secure)

30 Summary 2-Tier vs. 3-Tier 3-Tier Architecture Middleware
In this architecture, one more software sits in between the client and the server. This middle software is called ‘middleware’. Middleware Used to perform all the security checks and load balancing in case of heavy load. For example: It may takes all the requests from the client after performing the required authentication, it passes that request to the server. Then the server does the required processing and sends the response back to the middleware and finally the middleware passes this response back to the client. If you want to implement a 3-tier architecture, then you can keep any middleware like Web Logic or WebSphere software in between your Web Server and Web Browser.

31 End


Download ppt "Principles of Network Applications"

Similar presentations


Ads by Google