{"id":221,"date":"2017-09-06T20:49:20","date_gmt":"2017-09-06T20:49:20","guid":{"rendered":"http:\/\/www.volucer.it\/?p=221"},"modified":"2017-09-06T20:49:20","modified_gmt":"2017-09-06T20:49:20","slug":"web-server-architecture","status":"publish","type":"post","link":"https:\/\/www.volucer.it\/?p=221","title":{"rendered":"WEB SERVER ARCHITECTURE"},"content":{"rendered":"<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">Web servers, browsers, and proxies communicate by exchanging HTTP messages on a network structure using the request-response virtual circuit.<\/span><\/p>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">Web severs enable HTTP access to a collection of documents. And other information organized into a tree structure, much like a computer file system.<\/span><\/p>\n<figure id=\"attachment_223\" aria-describedby=\"caption-attachment-223\" style=\"width: 753px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-223\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/request_response_virtual_circuit.jpg\" alt=\"\" width=\"753\" height=\"371\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/request_response_virtual_circuit.jpg 753w, https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/request_response_virtual_circuit-300x148.jpg 300w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><figcaption id=\"caption-attachment-223\" class=\"wp-caption-text\">Figure 1 - Request-Response Schema<\/figcaption><\/figure>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">Web server receives and interprets HTTP requests from a client generally a browser. Then it examines the requests and maps the resource identifier to a file or forwards the request to a program which then produces the requested data. Finally, the server sends the response back to the client. <\/span><\/p>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The behaviour of a single-tasking HTTP Server using the Petri Net<\/span><\/span><sup><span style=\"font-size: large;\"><a class=\"sdfootnoteanc\" href=\"#sdfootnote1sym\" name=\"sdfootnote1anc\">1<\/a><\/span><\/sup><span style=\"font-size: large;\"><span lang=\"en-GB\"> formalism is shown in Fig. 2.<\/span><\/span><\/p>\n<div id=\"sdfootnote1\">\n<p class=\"sdfootnote\" align=\"justify\"><a class=\"sdfootnotesym\" href=\"#sdfootnote1anc\" name=\"sdfootnote1sym\">1<\/a> <span style=\"font-size: small;\"><span lang=\"en\">A Petri net consists of <\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\"><i>places<\/i><\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\">, <\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\"><i>transitions<\/i><\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\">, and <\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\"><i>directed arcs<\/i><\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\">. Arcs run from a place to a transition or vice versa, never between places or between transitions. The places from which an arc runs to a transition are called the <\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\"><i>input places<\/i><\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\"> of the transition; the places to which arcs run from a transition are called the <\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\"><i>output places<\/i><\/span><\/span><span style=\"font-size: small;\"><span lang=\"en\"> of the transition. More information is at link <\/span><\/span><span style=\"color: #0000ff;\"><u><a class=\"western\" href=\"http:\/\/en.wikipedia.org\/wiki\/Petri_net\"><span style=\"font-size: small;\"><span lang=\"en-GB\">http:\/\/en.wikipedia.org\/wiki\/Petri_net<\/span><\/span><\/a><\/u><\/span><span style=\"font-size: small;\"><span lang=\"en\">. <\/span><\/span><\/p>\n<\/div>\n<figure id=\"attachment_224\" aria-describedby=\"caption-attachment-224\" style=\"width: 678px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-224\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/http_server.jpg\" alt=\"\" width=\"678\" height=\"615\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/http_server.jpg 678w, https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/http_server-300x272.jpg 300w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><figcaption id=\"caption-attachment-224\" class=\"wp-caption-text\">Figure 2 \u2013 Behavior of a single-tasking HTTP server.<\/figcaption><\/figure>\n<h3 class=\"western\" lang=\"en-GB\">WEB SERVER REFERENCE ARCHITECTURE<\/h3>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">In this section we are going to show the reference architecture for web server domain. It defines the fundamental components of the domain and the relations between these components.<\/span><\/p>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">The reference architecture provides a common nomenclature across all software systems in the same domain, which allows: <\/span><\/p>\n<ol type=\"a\">\n<li>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">to describe uniformly the architecture of a web server and to understand a particular web server passing before through its conceptual architecture and then through its concrete architecture, which may have extra features based on its design goals. For example, not all web servers can serve Java Servlets;<\/span><\/p>\n<\/li>\n<li>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">to compare different architecture by using a common level of abstraction.<\/span><\/p>\n<\/li>\n<\/ol>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The web server reference architecture proposed is shown in Fig. 3. As you can see, it specifies the data flow and the dependencies between the seven subsystems. These major subsystems are divided between two layers: a <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><i>server layer<\/i><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> and a <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><i>support layer<\/i><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">.<\/span><\/span><\/p>\n<figure id=\"attachment_226\" aria-describedby=\"caption-attachment-226\" style=\"width: 705px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-226\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/web_server_reference_architecture.jpg\" alt=\"\" width=\"705\" height=\"700\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/web_server_reference_architecture.jpg 705w, https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/web_server_reference_architecture-150x150.jpg 150w, https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/web_server_reference_architecture-300x298.jpg 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><figcaption id=\"caption-attachment-226\" class=\"wp-caption-text\">Figure 3 - Web Server reference architecture.<\/figcaption><\/figure>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">The Server Layer contains five subsystems that encapsulate the operating system and provides the requested resources to the browser using the functionality of the local operating system. We will now describe every subsystem of the layer.<\/span><\/p>\n<ul>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Reception subsystem<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> implements the following functionalities:<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<ol type=\"a\">\n<li>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">It is waiting for the HTTP requests from the user agent that arrive through the network. Moreover it contains the logic and the data structures needed to handle multiple browser requests simultaneously.<\/span><\/p>\n<\/li>\n<li>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">Then it parses the requests and, after building an internal representation of the request, sends it to the next subsystem.<\/span><\/p>\n<\/li>\n<li>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">At the end it sends back the request\u2019s response according to the capabilities of the browser.<\/span><\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Request Analyzer<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> subsystem operates on the internal request received by the Reception subsystem. This subsystem translates the location of the resource from a network location to a local file name. It also corrects typing user error. For example if the user typed <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><i>indAx.html<\/i><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">, the Request Analyzer automatically corrects it in <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><i>index.html<\/i><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">.<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Access Control<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> subsystem authenticates the browsers, requesting a username and password, and authorizes their access to the requested resources.<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Resource Handler <\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">subsystem determines the type of resource requested by the browser. If it is a static file that can be sent back directly to the user or if it is a program that must be executed to generate the response.<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Transaction Log<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> subsystem records all the requests and their results.<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">The support layer contains two subsystems that provide services used by the upper server layer. <\/span><\/p>\n<ul>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Utility<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> subsystem contains functions that are used by all other subsystems.<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Operating System Abstraction Layer (OSAL)<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> encapsulates the operating system specific functionality to facilitate the porting of the web server to different platforms. This layer will not exist in a server that is designed to run on only one platform.<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">There are two others aspects that characterize web server architecture and go in during its activity:<\/span><\/p>\n<ul>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>processing model:<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> it describes the type of process or threading model used to support a Web Server operation;<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>pool-size behaviour<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">: it specifies how the size of the pool or threads varies over time in function of workload.<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">The main processing models are:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Process-based servers<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">: the web server uses multiple single-threaded processes each of which handles one HTTP request at a time.<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure id=\"attachment_227\" aria-describedby=\"caption-attachment-227\" style=\"width: 337px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-227\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/process_based_model.jpg\" alt=\"\" width=\"337\" height=\"187\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/process_based_model.jpg 337w, https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/process_based_model-300x166.jpg 300w\" sizes=\"auto, (max-width: 337px) 100vw, 337px\" \/><figcaption id=\"caption-attachment-227\" class=\"wp-caption-text\">Figure 4 - Web Server: Process-Based model.<\/figcaption><\/figure>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Thread-based servers<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">: the web server consists of a single multi-thread process. Each thread handles one request at a time.<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure id=\"attachment_228\" aria-describedby=\"caption-attachment-228\" style=\"width: 314px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-228\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/Thread_Base_Model.jpg\" alt=\"\" width=\"314\" height=\"222\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/Thread_Base_Model.jpg 314w, https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/Thread_Base_Model-300x212.jpg 300w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/><figcaption id=\"caption-attachment-228\" class=\"wp-caption-text\">Figure 5 - Web Server: Thread-Based model.<\/figcaption><\/figure>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Hybrid model servers<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">: the web server consists of multiple multithreaded processes, with each thread of any process handling one request at a time.<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure id=\"attachment_229\" aria-describedby=\"caption-attachment-229\" style=\"width: 330px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-229\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/multiple_multithread_processes.jpg\" alt=\"\" width=\"330\" height=\"454\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/multiple_multithread_processes.jpg 330w, https:\/\/www.volucer.it\/wp-content\/uploads\/2017\/09\/multiple_multithread_processes-218x300.jpg 218w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><figcaption id=\"caption-attachment-229\" class=\"wp-caption-text\">Figure 6 - Web Server: multiple multi-threaded processes.<\/figcaption><\/figure>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\">For the pool size behaviour we have two approaches: <\/span><\/p>\n<ol>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Static approach<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">: the web server creates a fixed number of processes and threads at the start-up time. If the number of requests exceeds the number of threads\/processes, the requests wait in the queue until a thread\/process becomes free to serve it.<\/span><\/span><\/p>\n<\/li>\n<li>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\"><b>Dynamic approach<\/b><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\">: the web server increases or decreases the pool of workers (processes and threads) in function of the numbers of requests. These behaviour decreases the queue size and the waiting time of each request.<\/span><\/span><\/p>\n<\/li>\n<\/ol>\n<hr \/>\n<p lang=\"en-GB\" align=\"justify\"><span style=\"font-size: large;\"><u><strong>Reception Subsystem: queue of requests and responses managemen<\/strong><b>t<\/b><\/u><\/span><\/p>\n<p align=\"justify\"><span style=\"font-size: large;\"><span lang=\"en-GB\">The Reception Subsystem maintains a queue of requests and responses to carry out its job within the context of a single continuously open connection. A series of requests may be transmitted on it and the responses to these requests must be sent back in the order of request arrival (FIFO). One common solution is for the server to maintain both an input and an output queue of requests. When a request is submitted for processing, it is removed from the input queue and inserted into the output queue. Once the processing is complete, the request is marked for release, but it remains on the Output Queue while at least one of its predecessors is still there. When the response is sent back to the browser the related request is released. Here is a code snippet using a <\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"><i>C-like<\/i><\/span><\/span><span style=\"font-size: large;\"><span lang=\"en-GB\"> language to show how the queue of requests and responses are managed. <\/span><\/span><\/p>\n<pre lang=\"en-GB\" style=\"padding-left: 30px;\"><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><b>\/\/ DEFINITIONS<\/b><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">\/\/ UserRequest: represents the user request<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">\/\/ WebResponse: represents the relative web response<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><b>\/\/ DATA STRUCTURES<\/b><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">RequestQueueElement = (UserRequest, Marker);<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">ResponseQueueElement = (WebServerResponse, RelatedUserRequest);<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><b>\/\/ Requests that are not processed yet<\/b><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">Queue RequestQueueElement RequestInputQueue; <\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><b>\/\/ Requests that are in processing or already processed<\/b><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">Queue RequestQueueElement RequestOutputQueue;<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><b>\/\/ Responses related to User Requests <\/b><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">ResponseOutputQueue; \/\/ FIFO politics<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><b>\/\/ ALGORITHM<\/b><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>While<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"> (true) {<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>If<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"> &lt;User Request arrived&gt; {<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>Enqueue<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(UserRequest, RequestInputQueue); <\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">};<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>If<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"> &lt;User Request can be processed&gt; {<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">UserRequestInProcessing =<\/span><\/span><\/span><b> <\/b>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>RemoveFrom<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(UseRequest,RequestInputQueue);<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>Enqueue<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(UserRequestInProcessing, RequestOutputQueue);<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>SubmitForProcessing<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(UserRequestInProcessing);<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">};<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>If<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"> &lt;User Request has been already processed&gt; {<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>MarkforRelease<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(UserRequest, RequestOutputQueue); <\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>Enqueue<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(WebResponse, ResponseOutputQueue);<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">};<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>If<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"> &lt;Length(ResponseOutputQueue)&gt; 0 &gt; {<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">WebResponse= <\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>Dequeue<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(ResponseOutputQueue);<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>RemoveFrom<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(WebResponse.UserRequest RequestOutputQueue);<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\"><b>SendResponse<\/b><\/span><\/span><\/span><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\"><span lang=\"en-GB\">(WebResponse);<\/span><\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">};<\/span><\/span>\r\n\r\n<span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">}\r\n\r\n\r\n<\/span><\/span><\/pre>\n<p><strong>REFERENCES<\/strong><\/p>\n<p><strong>[01]<\/strong> Andrea Nicchi, Web Applications: technologies and models, EAI, 2014;<\/p>\n<pre lang=\"en-GB\" style=\"padding-left: 30px;\"><span style=\"font-family: Courier New,monospace;\"><span style=\"font-size: small;\">\u00a0<\/span><\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Web servers, browsers, and proxies communicate by exchanging HTTP messages on a network structure using the request-response virtual circuit. Web severs enable HTTP access to a collection of documents. And other information organized into a tree structure, much like a computer file system. Web server receives and interprets HTTP requests from a client generally a <a class=\"read-more\" href=\"https:\/\/www.volucer.it\/?p=221\">...continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-web-application"],"_links":{"self":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":7,"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions\/234"}],"wp:attachment":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}