Server side web technology is used to develop dynamic web resource programs that having the capability to generate dynamic web pages. Server side web technologies are two types.
1. Process based
2. Thread based
Process based Technologies are CGI and thread based technologies are Servlet, JSP, ASP.net.
A light weight sub process is called Thread. Operating system controls processes but threads can be controlled through java programming using JRE support.
Transferring control between two processes (or) between two threads is called as “Context switch” (or) “Control jumping” (or) “scheduling”. The scheduling on processes takes more time compare to the scheduling on threads.
We’ll be covering the following topics in this tutorial:
Understanding CGI Environment:
Since processes based scheduling takes more time, the CGI web applications performance will be degraded when multiple requests are given simultaneously. This makes the CGI web applications as non-scaleable web applications (If application gives good performance respective of increase (or) decrease in request count then that application is called as “Scaleable applications”).
Understanding Servlet/JSP Environment:
Since, scheduling on threads takes less time the above diagram based web application gives good performance in all situations. This makes web applications as “scaleable applications.” It is recommended to use thread based server side technologies in web application development for better performance.
Every servlet program is a “Single instance multiple threads component” that means when multiple requests are given to servlet program. The servlet container creates only one object for that servlet program class but multiple threads will be started on that object representing multiple request. As shown above diagram.