SlideShare a Scribd company logo
2
Most read
4
Most read
6
Most read
PRESENTATION ON:-
SERVERS
o CONCURRENT SERVER
• CONNECTION LESS
• CONNECTION ORIENTED
o ITERATIVE SERVER
• CONNECTION LESS
• CONNECTION ORIENTED
SERVERS
CONCURRENT SERVER ITERATIVE SERVER
• It is the server that handles
multiple request at a time
• However it’s implementation
may not be required if the apptn.
p/l handles it with ease
• If the server is defined for a
single process & if it perform
lesser and of I/O options ,then
also Concurrency is not desired
• It is a server that processes
one request at at time
• Although , it may cause
unnecessary delays in
distributed n/ws & become
performance bottlenecks
• comparatively , they are easier
to design & build & resulting
code is simple & easy to modify
CONNECTION-ORIENTED SERVER
• These servers use TCP as the transport layer p/l.
• Here, TCP handles packets loss (error control),flow
control & out of order delivery problems
• Here , 3 ways handshake is used is used to establish &
terminate a connection and whole data is transferred
through communication
• These servers provide reliability for data transmission
CONNECTION-LESS SERVERS
• These servers use UDP as their transport layer protocol
• These server avoid overhead of communication establishment &
termination.
• They do not suffer from resources depletion problem
• They permit communication with multiple hosts (multiple connection)
from a single socket
• They do not provide reliability & usually clients take responsibility for
retansmitting request in case of no. response or faulty response from
server
• It is usually duty of appltn. Layer p/l to provide reliability with the
help of a complex sophisticated technique known as
‘adaptive retransmission’
• TCP offers point to point communication, while UDP offers
TCP offers point to point communication, while UDP offers
broadcasting & multicasting. All the future applications depend
broadcasting & multicasting. All the future applications depend
more on multicasting . Hence connectionless servers will be popular
more on multicasting . Hence connectionless servers will be popular
in future.
in future.
• Connectionless servers that use ‘ adaptive retransmission’ have
Connectionless servers that use ‘ adaptive retransmission’ have
complex programming
complex programming
SERVERS
Stateful Stateless
• Stateful Servers maintain the
status of ongoing interactions
with clients.
• Usually that use TCP are
stateful servers
• Stateless Servers do not maintain
the states of current intraction
with client
• Usually these servers use UDP
• Issue of statelessness arises from
a need to ensure reliability,
• Especially when using
connectionless transport
Concurrent vs. iterative servers
 Iterative server
 process one request at a time
 Easy to build
 Unnecessary delay
 Concurrent server handles multiple requests at
one time.
 More difficult to design and build
 Better performance
Fork and exec functions
 #include<unistd.h>
 int fork();
 Return 0 in child, process ID of child in parent –1
on error
 There are two typical uses of fork
1. A process makes a copy of itself so that one copy
handle one operation while the other copy does
another task.
2. A process wants to execute another program.
Since the only way to create a new process is by
calling fork, the process first calls fork to make a
copy of itself, and then one of the copies(child)
calls exec to replace itself with the new program
exec
 #include<unistd.h>
 int execl(const char *pathname, const char *arg0,…);
 int execv(const char *pathname, char *const argv[]);
 int execle(const char *pathname, const char *arg0,…,
);
 int execve(const char *pathname, char *constargv[],
char *constenvp[]);
 int execlp(const char *filename, const char *arg0,…);
 int execvp(const char *filename, char *const argv[]);
 All sizr return –1 on error, no return on sucess
Outline for typical concurrent server
int pid,s, conn;
S = Socket( .. );
// fill in server address
Bind(s, ..);
Listen(s, LISTNQ);
while(1){
conn = Accept(s, ..);
if( (pid = fork()) ==0)
{ close (s);
doit( conn);
close(conn);
exit(0);
} // end of if
close(conn);
}// end of while loop
Concurrent, connection-oriented
 Connection-oriented servers implement
concurrency among connections rather than
among individual requests.
 Connection between client-server handle more
than a single request: The protocol allow a client
to repeatedly send requests and receive
responses without terminating the connection or
creating a new one.
Algorithm-parent,madter
1. Create a socket and bind to the well-known
address for the service being offered. Leave
the socket unconnected
2. Place the socket in passive mode, making it
ready for use by a server.
3. Repeatedly call accept to receive the next
request from a client, and create a new process
to handle the response
Algorithm-child,slave
1. Begin with a connection passed from the
master(I.e. a socket for the connection)
2. Interact with the client using the connection:
read request(s) and send back response(s)
3. Close the connection and exit. The slave exits
after handling all requests from one client
Apparent concurrency using a
single thread
1. Create a socket and bind to the well-known port
for the service.add socket to the list of those on
which I/O is possible.
2. Use select to wait for I/O on existing sockets
3. If original socket is ready, use accept to obtain the
next connection, and add the new socket to the list
of those on which I/O is possible.
4. If some socket other than the original is ready, use
recv and read to obtain the next request, forma
response, and use send or write to send the
response back to the client
5. Continue processing with step 2.

More Related Content

PPTX
Case Study - SUN NFS
PPTX
file sharing semantics by Umar Danjuma Maiwada
PDF
Cloud Computing and Service oriented Architecture
PPT
Linux interview questions-ppt
PPT
Client Centric Consistency Model
PPTX
Delivery and Forwarding of IP Packets
PPT
Distributed databases
PPTX
Case Study - SUN NFS
file sharing semantics by Umar Danjuma Maiwada
Cloud Computing and Service oriented Architecture
Linux interview questions-ppt
Client Centric Consistency Model
Delivery and Forwarding of IP Packets
Distributed databases

What's hot (20)

PPTX
Introduction to distributed database
PPTX
Object Oriented Approach for Software Development
PDF
Distributed Operating System_4
PPTX
Compiler an overview
PPTX
CPU Scheduling in OS Presentation
PPTX
Message and Stream Oriented Communication
PPTX
Transport layer
PDF
Deadlock in Distributed Systems
PDF
Lecture 1 introduction to parallel and distributed computing
PPT
Network Layer,Computer Networks
PPT
File replication
PPTX
Distributed Databases
PDF
Private Network Project for Colleges
PPT
Sorting network
PDF
Difference between snowflake schema and fact constellation
PPTX
HDLC and Point to point protocol
PPT
Chapter 15 distributed mm systems
PPTX
Hidden & exposed terminal problem
PPTX
Query decomposition in data base
DOC
Distributed Operating System,Network OS and Middle-ware.??
Introduction to distributed database
Object Oriented Approach for Software Development
Distributed Operating System_4
Compiler an overview
CPU Scheduling in OS Presentation
Message and Stream Oriented Communication
Transport layer
Deadlock in Distributed Systems
Lecture 1 introduction to parallel and distributed computing
Network Layer,Computer Networks
File replication
Distributed Databases
Private Network Project for Colleges
Sorting network
Difference between snowflake schema and fact constellation
HDLC and Point to point protocol
Chapter 15 distributed mm systems
Hidden & exposed terminal problem
Query decomposition in data base
Distributed Operating System,Network OS and Middle-ware.??
Ad

Similar to Concurrent Server and Iterative Server (1)-1.ppt (20)

PPT
Server and its both type concurrent and iterattive.ppt
PPTX
Lecture 10 - The Client-Server Paradigm.pptx
PPTX
Module 1 part 2.pptx with clear notes and explanation
PDF
sockets SMTP Bmsce ppt information science and engineering
PDF
CHAPTER 24.pdfhehbebbebebbebbeebbebbebeb
PPTX
Service Discovery with Consul - Arunvel Arunachalam
PPT
many many many many server types all there
PPT
Multi user chat system using java
DOCX
Internet
PDF
Review on tls or ssl session sharing based web cluster load balancing
PDF
Review on tls or ssl session sharing based web cluster load balancing
PPTX
RPC: Remote procedure call
PPTX
Making communication across boundaries simple with Azure Service Bus
PPTX
Windows Communication Foundation (WCF)
PDF
QUIC, presented by Geoff Huston at the 42nd TWNIC IP Open Policy Meeting
PDF
Writing Networking Clients in Go - GopherCon 2017 talk
PDF
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
PPTX
Tech talk microservices debugging
PPTX
Debugging Microservices - key challenges and techniques - Microservices Odesa...
PDF
Server and its both type concurrent and iterattive.ppt
Lecture 10 - The Client-Server Paradigm.pptx
Module 1 part 2.pptx with clear notes and explanation
sockets SMTP Bmsce ppt information science and engineering
CHAPTER 24.pdfhehbebbebebbebbeebbebbebeb
Service Discovery with Consul - Arunvel Arunachalam
many many many many server types all there
Multi user chat system using java
Internet
Review on tls or ssl session sharing based web cluster load balancing
Review on tls or ssl session sharing based web cluster load balancing
RPC: Remote procedure call
Making communication across boundaries simple with Azure Service Bus
Windows Communication Foundation (WCF)
QUIC, presented by Geoff Huston at the 42nd TWNIC IP Open Policy Meeting
Writing Networking Clients in Go - GopherCon 2017 talk
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
Tech talk microservices debugging
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Ad

More from Meenakshi Raheja (6)

PPT
Piyush ppt Principle of Software Engineering.ppt
PPTX
Network Topology used in computer network.pptx
PPTX
concurrent serve rand iterative server.pptx
PPT
Remote Procedure Call related to computer newtork.ppt
PPT
classle_37133_05c1c0be651c4c162c3207a89ccd7723_b849f1b258faeed2_f.ppt
PPT
step of planning of software project manager
Piyush ppt Principle of Software Engineering.ppt
Network Topology used in computer network.pptx
concurrent serve rand iterative server.pptx
Remote Procedure Call related to computer newtork.ppt
classle_37133_05c1c0be651c4c162c3207a89ccd7723_b849f1b258faeed2_f.ppt
step of planning of software project manager

Recently uploaded (20)

PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Digital Logic Computer Design lecture notes
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
composite construction of structures.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
Geodesy 1.pptx...............................................
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT
Mechanical Engineering MATERIALS Selection
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Sustainable Sites - Green Building Construction
PPTX
web development for engineering and engineering
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Project quality management in manufacturing
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
PPT on Performance Review to get promotions
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Digital Logic Computer Design lecture notes
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
composite construction of structures.pdf
UNIT 4 Total Quality Management .pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Geodesy 1.pptx...............................................
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Mechanical Engineering MATERIALS Selection
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Sustainable Sites - Green Building Construction
web development for engineering and engineering
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Project quality management in manufacturing
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT on Performance Review to get promotions

Concurrent Server and Iterative Server (1)-1.ppt

  • 1. PRESENTATION ON:- SERVERS o CONCURRENT SERVER • CONNECTION LESS • CONNECTION ORIENTED o ITERATIVE SERVER • CONNECTION LESS • CONNECTION ORIENTED
  • 2. SERVERS CONCURRENT SERVER ITERATIVE SERVER • It is the server that handles multiple request at a time • However it’s implementation may not be required if the apptn. p/l handles it with ease • If the server is defined for a single process & if it perform lesser and of I/O options ,then also Concurrency is not desired • It is a server that processes one request at at time • Although , it may cause unnecessary delays in distributed n/ws & become performance bottlenecks • comparatively , they are easier to design & build & resulting code is simple & easy to modify
  • 3. CONNECTION-ORIENTED SERVER • These servers use TCP as the transport layer p/l. • Here, TCP handles packets loss (error control),flow control & out of order delivery problems • Here , 3 ways handshake is used is used to establish & terminate a connection and whole data is transferred through communication • These servers provide reliability for data transmission
  • 4. CONNECTION-LESS SERVERS • These servers use UDP as their transport layer protocol • These server avoid overhead of communication establishment & termination. • They do not suffer from resources depletion problem • They permit communication with multiple hosts (multiple connection) from a single socket • They do not provide reliability & usually clients take responsibility for retansmitting request in case of no. response or faulty response from server • It is usually duty of appltn. Layer p/l to provide reliability with the help of a complex sophisticated technique known as ‘adaptive retransmission’
  • 5. • TCP offers point to point communication, while UDP offers TCP offers point to point communication, while UDP offers broadcasting & multicasting. All the future applications depend broadcasting & multicasting. All the future applications depend more on multicasting . Hence connectionless servers will be popular more on multicasting . Hence connectionless servers will be popular in future. in future. • Connectionless servers that use ‘ adaptive retransmission’ have Connectionless servers that use ‘ adaptive retransmission’ have complex programming complex programming
  • 6. SERVERS Stateful Stateless • Stateful Servers maintain the status of ongoing interactions with clients. • Usually that use TCP are stateful servers • Stateless Servers do not maintain the states of current intraction with client • Usually these servers use UDP • Issue of statelessness arises from a need to ensure reliability, • Especially when using connectionless transport
  • 7. Concurrent vs. iterative servers  Iterative server  process one request at a time  Easy to build  Unnecessary delay  Concurrent server handles multiple requests at one time.  More difficult to design and build  Better performance
  • 8. Fork and exec functions  #include<unistd.h>  int fork();  Return 0 in child, process ID of child in parent –1 on error  There are two typical uses of fork 1. A process makes a copy of itself so that one copy handle one operation while the other copy does another task. 2. A process wants to execute another program. Since the only way to create a new process is by calling fork, the process first calls fork to make a copy of itself, and then one of the copies(child) calls exec to replace itself with the new program
  • 9. exec  #include<unistd.h>  int execl(const char *pathname, const char *arg0,…);  int execv(const char *pathname, char *const argv[]);  int execle(const char *pathname, const char *arg0,…, );  int execve(const char *pathname, char *constargv[], char *constenvp[]);  int execlp(const char *filename, const char *arg0,…);  int execvp(const char *filename, char *const argv[]);  All sizr return –1 on error, no return on sucess
  • 10. Outline for typical concurrent server int pid,s, conn; S = Socket( .. ); // fill in server address Bind(s, ..); Listen(s, LISTNQ); while(1){ conn = Accept(s, ..); if( (pid = fork()) ==0) { close (s); doit( conn); close(conn); exit(0); } // end of if close(conn); }// end of while loop
  • 11. Concurrent, connection-oriented  Connection-oriented servers implement concurrency among connections rather than among individual requests.  Connection between client-server handle more than a single request: The protocol allow a client to repeatedly send requests and receive responses without terminating the connection or creating a new one.
  • 12. Algorithm-parent,madter 1. Create a socket and bind to the well-known address for the service being offered. Leave the socket unconnected 2. Place the socket in passive mode, making it ready for use by a server. 3. Repeatedly call accept to receive the next request from a client, and create a new process to handle the response
  • 13. Algorithm-child,slave 1. Begin with a connection passed from the master(I.e. a socket for the connection) 2. Interact with the client using the connection: read request(s) and send back response(s) 3. Close the connection and exit. The slave exits after handling all requests from one client
  • 14. Apparent concurrency using a single thread 1. Create a socket and bind to the well-known port for the service.add socket to the list of those on which I/O is possible. 2. Use select to wait for I/O on existing sockets 3. If original socket is ready, use accept to obtain the next connection, and add the new socket to the list of those on which I/O is possible. 4. If some socket other than the original is ready, use recv and read to obtain the next request, forma response, and use send or write to send the response back to the client 5. Continue processing with step 2.