The main tasks performed by server programs.

Server software – in information technology – a software component of a computing system that performs service (servicing) functions at the request of the client, providing him with access to certain resources or services.

To interact with the client (or clients, if simultaneous work with several clients is supported), the server allocates the necessary interprocess communication resources (shared memory, pipe, socket, etc.) and waits for requests to open a connection (or, in fact, requests for the provided service ). Depending on the type of such resource, the server may serve processes within the same computer system or processes on other machines through data channels (eg, COM port) or network connections.

The format of client requests and server responses is defined by the protocol. Open protocol specifications are described by open standards, for example, Internet protocols are defined in RFC documents.

Depending on the tasks being performed, some servers, in the absence of service requests, may be idle waiting. Others may be doing some work (for example, collecting information), for such servers, working with clients may be a secondary task.

54. Tools for creating applications: Tools for creating programs that run on the server side. Their characteristics and purpose.

The client layer is the browser, the server layer is the database server, and the middle layer is the Web server and the server extension program. This architectural solution reduces network traffic, makes components interchangeable, and improves security. However, this architecture also makes it difficult to process database transactions due to the stateless nature of the HTTP protocol (this protocol is used to transfer data between the browser and the database server). The browser sends requests to the Web server to deliver Web pages or data. The Web server serves requests for Web pages, and sends requests to the server-side extension program. The latter accepts requests transmitted to it, converts them into a form understandable to the database server, and passes them to the database server. The database server then performs the work of servicing the request and returns the result to the back-end extension program. Finally, it converts the results into a browser-friendly format and passes them to the Web server, which in turn passes it to the browser.

Server Extension Programs

One of the main reasons for using back-end extensions at the middle layer is the ability to use the standards that exist for the two extreme layers by translating between them. Other uses of back-end extensions are to maintain connections between databases to reduce network traffic and to maintain a reserve of connections between databases to reduce the overhead of opening/closing a database. Back-end extensions also support interchangeability in their standard interfaces. Therefore, Web and database servers can be relatively easily replaced or expanded.

55. Application Creation Tools: CGI (Common Gateway Interface) Specification.

CGI is an interface standard used to communicate between an external program and a web server. A program that works on such an interface in conjunction with a web server is commonly called a gateway, although many prefer the names “script” (script) or “CGI program”.

The interface itself is designed so that you can use any programming language that can work with standard input / output devices. Even scripts for the built-in command interpreters of operating systems have such capabilities, so even command scripts can be used in simple cases.

Typically, hypertext documents written in HTML and presented on a WWW server contain static data. Using CGI, you can create CGI programs, called gateways or scripts (CGI Script), which, in interaction with such application systems as a database management system, spreadsheet, business graphics, etc., can display dynamic information on the user’s screen.

The gateway program is launched by the WWW server in real time. The WWW server ensures the transfer of the user’s request to the gateway, and it, in turn, using the means of the application system, returns the result of processing the request to the user’s screen. Gateway program (CGI Script) can be written in languages: C/C++, Visual Basic, etc.

As an executable, such a program is usually placed in a subdirectory called cgi-bin of the WWW server. In principle, it can be placed in any other directory where execution of executable modules is allowed.

CGI script.

CGI scripts are usually distributed as source code in the language in which they are written. This is most often the perl language, as it is very well suited for parsing string variables. There are several public archives of CGI scripts, the most famous of which is CGI-resources. Most of the scripts in the public archives are free or have free versions with limited performance or functionality. There are, at the same time, quite complex, expensive scripts, such as link directories or database management programs.

To run the script on your server, you need full ftp or telnet access to the server, an ftp editor that has the ability to change file attributes on the server. In addition, do not forget to ask your hosting provider what scripts you are allowed to run on the server (in the case of free hosting, there may be serious restrictions), as well as where the interpreter itself is located and what version it is.

Placing and configuring CGI scripts on our server.
So, in order for your scripts to be successfully executed on our server, you need to know the following:

All CGI scripts must reside in the cgi directory in your home directory. This is a prerequisite. If you place the CGI script somewhere else, it will not run. In order for your script to be executed, you need to correctly set its rights.

CGI gateway. Preprocessor.

Using CGI, you can create CGI programs, called gateways, which, in cooperation with such application systems as a database management system, spreadsheet, business graphics, etc., can display dynamic information on the user’s screen.

The gateway program is launched by the WWW server in real time. The WWW server ensures the transfer of the user’s request to the gateway, and it, in turn, using the means of the application system, returns the result of processing the request to the user’s screen. The gateway program can be coded in C/C++, Fortran, Perl, TCL, Unix Schell, Visual Basic, Apple Script. As an executable module, it is written to a subdirectory called cgi-bin of the WWW server.

Data transfer to gateways. To transfer data about an information request from the server to the gateway, the server uses the command line and environment variables. These environment variables are set when the server executes the gateway program.

58. Application Development Tools: ISAPI extensions and their benefits.

Application Programming Interface (sometimes Application Programming Interface ) ( .API ]) is a set of ready-made classes, procedures, functions, structures, and constants provided by an application (library, service) for use in external software products. Used by programmers to write all sorts of applications.

The API defines the functionality that a program (module, library) provides, while the API allows you to abstract from how exactly this functionality is implemented.

Software components interact with each other through APIs. In this case, components usually form a hierarchy – high-level components use the API of low-level components, and those, in turn, use the API of even lower-level components.

According to this principle, data transfer protocols over the Internet are built. The standard protocol stack (OSI network model) contains 7 layers (from the physical bit-transfer layer to the application protocol layer like HTTP and IMAP). Each layer takes advantage of the functionality of the previous data layer and, in turn, provides the desired functionality to the next layer.

It is important to note that the concept of a protocol is close in meaning to the concept of an API. Both are abstractions of functionality, only in the first case we are talking about data transfer, and in the second – about the interaction of applications.

The function and class library API includes a description of the signatures and semantics of functions .

59. Application Development Tools: ASP Servers.

ASP ( Active Server Pages – “active server pages”) is the first Microsoft technology that allows you to dynamically create web pages on the server side. ASP runs on Windows NT operating systems and on the Microsoft IIS web server.

ASP is not a programming language – it’s just a pre-processing technology that allows you to include program modules during the web page generation process. The relative popularity of ASP is based on the simplicity of the scripting languages used (VBScript or JScript) and the ability to use external COM components.

An ASP page is a normal HTML page, with inserts marked with <% and %> delimiters:

Be First to Comment

Leave a Reply

Your email address will not be published.