台北科技大学:《计算机网络》(英文版) NP04 16 server

Server software design Algorithms and Issues Chuan-Ming LIu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN CSIE NTUT Taiwan
1 CSIE, NTUT, Taiwan Server Software Design Algorithms and Issues Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN

●。 Conceptual Server Algorithm o Simple server Algorithm 1. Create a socket 2. Bind the socket to the port 3. Enter an infinite loop Accept request Process request Reply request o Not enough in practice generall SIE, NTUT, Taiwan
2 CSIE, NTUT, Taiwan Conceptual Server Algorithm Simple Server Algorithm 1. Create a socket 2. Bind the socket to the port 3. Enter an infinite loop • Accept request • Process request • Reply request Not enough in practice generally

●。 Conceptual Server Algorithm o Consider file transfer first client needs a 200 Mb file o Second client needs a 20 byte file If the server processes them in Fifo fashion The second client will wait an unreasonable amount of time for a small transfer Server usually handles more than one request at a time SIE, NTUT, Taiwan
3 CSIE, NTUT, Taiwan Conceptual Server Algorithm Consider file transfer ⚫ First client needs a 200 MB file ⚫ Second client needs a 20 byte file ⚫ If the server processes them in FIFO fashion The second client will wait an unreasonable amount of time for a small transfer Server usually handles more than one request at a time

。。 Concurrent vs. Iterative o Iterative server: one request at a time o Concurrent server: multiple requests at one time o Note: the concurrency is conceptual and generally will use one thread for one request o Concurrent server refers to whether the server permits multiple requests to proceed concurrently, not whether the underlying implementation uses multiple and concurrent threads 4 CSIE. NTUT. Taiwan
4 CSIE, NTUT, Taiwan Concurrent v.s. Iterative Iterative server: one request at a time Concurrent server: multiple requests at one time Note: the concurrency is conceptual and generally will use one thread for one request Concurrent server refers to whether the server permits multiple requests to proceed concurrently, not whether the underlying implementation uses multiple and concurrent threads

●。 Concurrent vs. Iterative o Concurrent servers are difficult to design and build o Why concurrency? o Long delay caused by iterative servers o Performance bottleneck resulted from iterative servers effects many clients 5 SIE NTUT. Taiwan
5 CSIE, NTUT, Taiwan Concurrent v.s. Iterative Concurrent servers are difficult to design and build Why concurrency? ⚫ Long delay caused by iterative servers ⚫ Performance bottleneck resulted from iterative servers effects many clients

●。 Connection Access or not o Two major transport protocols o TCP(Transmission Control protocol) UDP (USer Datagram Protocol) o tCP is connection-oriented and udp is connectionless o The corresponding servers are o Connection-oriented servers o Connectionless serves 6 SIE, NTUT, Taiwan
6 CSIE, NTUT, Taiwan Connection Access or Not Two major transport protocols: ⚫ TCP (Transmission Control Protocol) ⚫ UDP (User Datagram Protocol) TCP is connection-oriented and UDP is connectionless The corresponding servers are ⚫ Connection-oriented servers ⚫ Connectionless serves

●。 TCP Semantics o Point-to-point communication o Reliable connection establishment o Reliable delivery o Flow controlled transfer o Full-duplex transfer o Stream paradigm SIE, NTUT, Taiwan
7 CSIE, NTUT, Taiwan TCP Semantics Point-to-point communication Reliable connection establishment Reliable Delivery Flow controlled transfer Full-duplex transfer Stream paradigm

●。 UPD Semantics o Many-to-many communication o Unreliable service o Lack of flow control o Message paradigm SIE, NTUT, Taiwan
8 CSIE, NTUT, Taiwan UPD Semantics Many-to-many communication Unreliable Service Lack of flow control Message paradigm

TCP or UDP o Because the semantics of TcP and UDP differ sharply, a designer cannot choose between connection-oriented and connectionless transport protocols without considering the semantics required by the application protocol o Depends on the applications, not the pes SIE, NTUT, Taiwan
9 CSIE, NTUT, Taiwan TCP or UDP? Because the semantics of TCP and UDP differ sharply, a designer cannot choose between connection-oriented and connectionless transport protocols without considering the semantics required by the application protocol Depends on the applications, not the types

●。 Connection- Oriented servers o Easier to program since tCP provide all the reliabili o Drawbacks o Need a separate socket for each connection o cares about the socket allocation and resource consuming o Resource limitation problem-due to the clients crash often 10 SIE, NTUT, Taiwan
10 CSIE, NTUT, Taiwan Connection-Oriented Servers Easier to program since TCP provide all the reliability Drawbacks: ⚫ Need a separate socket for each connection ⚫ Cares about the socket allocation and resource consuming ⚫ Resource limitation problem – due to the clients crash often
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 台北科技大学:《计算机网络》(英文版) NP04 16 multi services.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 multi proto.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 Client Software Design.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 Socket API.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 15 Client Server model.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 12 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 11 Introduction.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 1 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 0 Network Programming.ppt
- 哈尔滨工业大学:《网络应用开发》英文版 网络开发与应用实验指导书.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter7.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter7-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter6-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter5.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter5-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter4.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter4-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter3.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter3-6.pdf
- 台北科技大学:《计算机网络》(英文版) NP04 16 server ex.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 server ex con.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 18.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 2 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 20(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 20.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 21(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 22(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 23(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 24(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 27 Mobile ip discussion overview.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 28 Real-Time Transport protocol.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 3 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 4 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 5 Subnetting.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 8 Internet Protocol (IP).ppt
- 《计算机图形学》课程教学资源:第3章 图形的基本运算.ppt
- 《计算机图形学》课程教学资源:第4章 图形的观察运算.ppt
- 《计算机图形学》课程教学资源:第6章(6-1)图形的数据结构.ppt
- 《计算机图形学》课程教学资源:第6章 图形的数据结构.ppt