Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet Applications & Programming

Similar presentations


Presentation on theme: "Internet Applications & Programming"— Presentation transcript:

1 Internet Applications & Programming
Chapter 3 Internet Applications & Programming © Bobby Hoggard, Department of Computer Science, East Carolina University These slides may not be used or duplicated without permission

2 Internet Applications
The Internet is diverse with services None of the services is part of the Internet structure The Internet provides a common communication medium New services can be created

3 Two Communication Means
Stream Message Connection Oriented 1-to-1 Communication Send Sequence of Bytes Any Length Transfer Widely Used TCP Connectionless Many-to-Many Send Individual Message Limited to 64K Multimedia Applications UDP

4 Messages (UDP) Connection-less: Very little set-up involved
A packet sent represents and entire message as it was originally sent No guarantee that messages sent will be received Messages can be lost Messages can be duplicated Messages can be delivered out of order Faster: no error checking involved Examples of uses include: DNS (domain name lookup) VOIP (voice over IP) Some Games

5 Streams (TCP) Connection Oriented Guaranteed delivery of packets
Two applications must agree on having a connection created Both applications can send and receive After communication is finished, connection is terminated Guaranteed delivery of packets Packets are guaranteed to be in the same order sent Slower: due to the error checking involved Examples of uses include: HTTP (web service) FTP (file transfer) SMTP ( service)

6 Streams (TCP) Uses a client / server model
Client: application which requests a connection to be made Server: application which waits for connection requests

7 Clients vs. Servers Client Server Starts second
Must know the server to which it will connect Initiates contact when needed Can send & receive When finished, the client shuts down Starts first Does not know which client will communicate Passively waits for long periods of time for a connection to be made Can send & receive When finished, waits for another connection

8 Multiple Clients It is possible (and very common) to have multiple clients operating on one machine All clients can communicate with the same server All clients can communicate with different servers

9 Multiple Servers It is possible to have multiple servers operating on one machine More efficient use of the machine Makes use of idle time between connections Can be problematic if the servers are busy

10 Server Identification
Servers are identified by a 2-part identification number Computer Identifier Service Identifier IP Address 32-bit number Port Number 16-bit number Domain Name Translator

11 Server Identification
Each service on the server computer has a unique port number When the server starts it registers its port number with the operating system This is what allows the OS to send requests to the correct program when multiple servers are on the same machine Two commonly used port numbers are: port 80 = web browsing port 25 = service

12 Server Identification
Web Server Client Computer Server Computer 1 Request IP Address Port Number Server Request IP Address Port Number Server Computer 2

13 Client/Server Interaction
Start Get Server Name Translate To IP Address Specify Port Number Contact Server Stop Start Register Port # with OS Wait For Client Interact With Client Finished

14 Concurrent Server Processing
Server uses a thread of control for each client Will have a main thread and one thread for each client it is processing The main thread waits for connections and handles the connection set up Once the connection has been made, a client thread is created to continue the communication, while the main thread continues to wait for more requests

15 Servers Can Be Clients! Web Browser Client Computer Request For
ASPX page Web Server Request For Data Database Server HTML page Data CLIENT SERVER CLIENT SERVER


Download ppt "Internet Applications & Programming"

Similar presentations


Ads by Google