Concurrent connection Oriented multiservice Application Maste… rocesses (or threads) Slave Slave Socket for Sockets for←OS connection individual requests connections 6 SIE NTUT Ta
6 CSIE, NTUT, Taiwan Concurrent ConnectionOriented Multiservice Master OS Application Processes (or threads) Socket for connection requests Sockets for individual connections slave 1 slave n
o..I Single-thread, Multiservice o It is also possible but uncommon to implement multiservice servers with a single thread of execution o Mainly on connection-oriented style SIE NTUT. Taiwan
7 CSIE, NTUT, Taiwan Single-thread, Multiservice It is also possible, but uncommon, to implement multiservice servers with a single thread of execution Mainly on connection-oriented style
●° Invoking Separate Programs o Main flaw for multiservice servers inflexible o Changing small piece of code needs to recompile the entire server- time consuming o Stopping the server to recompile bothers clients o How to overcome this? o Break a server into independent parts o Then, handle each part independently .", implemented by execve SIE NTUT. Taiwan
8 CSIE, NTUT, Taiwan Invoking Separate Programs Main flaw for multiservice servers – inflexibility ⚫ Changing small piece of code needs to recompile the entire server – time consuming ⚫ Stopping the server to recompile bothers clients How to overcome this? ⚫ Break a server into independent parts ⚫ Then, handle each part independently ⚫ “overloading” implemented by execve
。。 Multiprocess Multiservice(TCP) laster Application rocesses ave slave og D. prog n k+- execve()used ro OS Master sockets Sockets for (One for each individual slave service offered) connections SIE NTUT. Taiwan
9 CSIE, NTUT, Taiwan Multiprocess Multiservice (TCP) Master OS Application Processes Master sockets (One for each service offered) Sockets for individual slave connections slave 1 slave n prog 1 prog n execve( ) used fork( )