How to set up smartphones and PCs. Informational portal
  • home
  • TVs (Smart TV)
  • Review of modern server technologies. Web client-server technologies

Review of modern server technologies. Web client-server technologies

DBs working on FILE-SERVER technology;

DBs working on CLIENT-SERVER technology.

File Server


- Access to the database (request)
- Transferring data with blocking access to other users
- Data processing on the user's computer

For clarity, consider concrete examples. Suppose you need to view sent payment orders for the period from May 19 to May 25 in the amount of 5,000 rubles. The user will need to launch a client application on his computer that works in the database with payment orders and enter the required selection criteria. After that, a file containing all documents of this type for the entire period for any amount will be downloaded to your computer from the database server and loaded into RAM. The client application running on the user's computer, working with the database, will itself process this information (sort them), after which it will issue an answer (a list of payment orders that meet your criteria will appear on the screen). After that, you will select the required payment order and try to edit (change) one field in it - for example, the date. During editing, the data source is locked, that is, the entire file containing this document. This means that the file will either not be available to other users at all, or will be available only in view mode. Moreover, this kind of capture does not even occur at the record level, that is, one document, but is blocked whole file- that is, the entire table containing similar documents. Only after this field is fully processed and the editing mode is exited, this file of payment orders will be unblocked from capture by the user. If the data is stored in more voluminous objects, for example, one file contains payment orders for both the receipt of funds and the sending, then even more information will not be available. You will work with one "date" field in one document - the rest of the employees of the enterprise will wait until you finish.

The disadvantages of the FILE-SERVER system are obvious:

    Very heavy load on the network, increased bandwidth requirements. In practice, this makes it almost impossible simultaneous work a large number of users with large amounts of data.

    Data processing is carried out on the user's computer. This entails increased requirements for the hardware of each user. How more users, topics more money will have to spend on equipping their computers.

    Blocking data when editing by one user makes it impossible for other users to work with this data.

    Security. To be able to work with such a system, you will need to give each user full access to the whole file, in which he may be interested in only one field.

    client-server

    Handling a single user request:
    - Accessing the database (SQL query)
    - Sending a response - the result of processing


    If it is necessary to process the information stored in the database, the client application running on the user's computer that works with the database generates a query in the SQL language (the name from the initial letters is the Structured Query Language). The database server receives the request and processes it on its own. No data array (file) is transmitted over the network. After processing the request, only the result is transmitted to the user's computer - that is, in the previous example, a list of payment orders that meet the required criteria. The file itself, which stored the data that served as the source for processing, remains unlocked for access by the server itself at the request of other users.

    In serious client-server DBMS, there are additional mechanisms, reducing the load on the network, reducing the requirements for user computers. As an example, let's take stored procedures - that is, entire programs for processing data stored in a database. In this case, even SQL expressions are not transmitted from the user to the server - a function call with call parameters is transmitted. In this way, workplace the user is simplified even more, the logic of the program is transferred to the server. The user place becomes just a means of displaying information. All this means a further reduction in the load on the network and user workstations.

    Thus, all the above disadvantages of the FILE-SERVER scheme are eliminated in the CLIENT-SERVER architecture:

      Data arrays are not transferred over the network from the database server to the user's computer. Network bandwidth requirements are reduced. This makes it possible for a large number of users to work simultaneously with large amounts of data.

      Data processing is carried out on the database server, and not on the user's computer. This allows you to use simpler, and therefore cheaper computers at client sites.

      Blocking (capture) of data by one user does not occur.

      User access is provided not to the whole file, but only to those data from it with which the user has the right to work.

      Having considered the difference between a FILE-SERVER and a CLIENT-SERVER, we can complete the consideration of the concept of "information storage". It is important to emphasize that the work depends largely on the type of DBMS used. corporate system. It is clear that for large enterprises, with big amount users, with a huge number of records in the database, the file-server scheme is completely unacceptable. On the other hand, there are differences in databases in other parameters and capabilities:

        types of data that can be stored in the database (numbers, dates, text, pictures, video, sound, etc.);

        on the technologies of access to data in the database organized by the database itself and the level of protection of information from unauthorized access;

        on the provided tools and development methods that can be used to design any information system based on this database;

        on the provided means and methods of information (data) analysis that can be applied in the information system based on this database;

        by reliability and stability, that is (roughly) the number of records (filled fields) in the database, which provides a reliable and uninterrupted ability to access, change, analyze information in the database;

        by speed - the time spent on accessing and processing information;

        if possible, organize work on computers from different manufacturers, that is, according to compatibility with other platforms and operating systems;

        by the level of support (service) provided by the database developer or its authorized dealer;

        by availability good money creating applications that use this database, etc.

        Why is it not profitable to invest in a file server solution today? Today the further way of development of databases is already obvious. Multi-level client-server systems appear, with very thin clients, removing any restrictions from client stations, both in terms of performance and platform, operating system. If for a client-server solution further development seems quite clear, and the transition from client-server to multi-level client-server is not problematic, then for a file server, a simple transition to client-server is a huge problem and enormous labor costs, if it suddenly turns out to be possible at all.

The client-server architecture is widely used network technologies used to access various network services. Let's take a quick look at some types of such services (and servers).

Web servers

Initially, they provided access to hypertext documents via the HTTP protocol (Huper Text Transfer Protocol). Now they support advanced features, in particular, working with binary files (images, multimedia, etc.).

Application servers

Designed for centralized solution of applied problems in a certain subject area. To do this, users have the right run server programs for execution. The use of application servers reduces client configuration requirements and simplifies general management network.

Database servers

Database servers are used to process user queries in the SQL language. In this case, the DBMS is located on the server, to which client applications connect.

File servers

File Server stores information in the form of files and provides users with access to it. As a rule, a file server also provides a certain level of protection against unauthorized access.

Proxy Server

First, it acts as an intermediary, helping users obtain information from the Internet while securing the network.

Secondly, it stores frequently requested information in a cache on a local disk, quickly delivering it to users without re-accessing the Internet.

Firewalls(firewalls)

Firewalls, analyzing and filtering the passing network traffic, in order to secure the network.

Mail servers

They provide services for sending and receiving electronic mail messages.

Servers remote access(RAS)

These systems provide communication with the network via dial-up lines. A remote employee can use corporate LAN resources by connecting to it using a regular modem.

These are just a few types of the entire variety of client-server technologies used in both local and global networks.

To access certain network services, clients are used, the capabilities of which are characterized by the concept of "thickness". It defines the hardware configuration and software that the customer has. Consider possible boundary values:

"Thin" client

This term defines a client whose computing resources are only sufficient to run the required network application through a web interface. The user interface of such an application is formed by means of static HTML (JavaScript execution is not provided), all application logic is performed on the server.
For the thin client to work, it is enough just to provide the ability to launch a web browser, in the window of which all actions are carried out. For this reason, the web browser is often referred to as the "universal client".

"Fat" client

This is a workstation or personal computer running its own disk operating system and having the necessary set of software. TO network servers"fat" clients apply mainly for additional services (for example, access to a web server or corporate database).
A “thick” client also means a client network application running under the local OS. Such an application combines a data presentation component (OS graphical user interface) and an application component (computing power of the client computer).

IN Lately Another term is increasingly used: "rich"-client. "Rich"-client is a kind of compromise between "thick" and "thin" client. Like the "thin" client, the "rich" client also presents a graphical interface, already described by means of XML and including some functionality of thick clients (for example, a drag-and-drop interface, tabs, multiple windows, drop-down menus, etc.)

The application logic of the “rich” client is also implemented on the server. The data is sent to standard format exchange, based on the same XML (SOAP, XML-RPC protocols) and interpreted by the client.

Some of the main XML-based rich client protocols are listed below:

  • XAML (eXtensible Application Markup Language) - developed by Microsoft, used in applications on the .NET platform;
  • XUL (XML User Interface Language) - a standard developed by the Mozilla project, used, for example, in an email client Mozilla Thunderbird or Mozilla browser Firefox;
  • Flex- multimedia technology based on XML developed by Macromedia/Adobe.

Conclusion

So, the main idea of ​​the client-server architecture is to divide the network application into several components, each of which implements a specific set of services. The components of such an application can run on different computers, performing server and/or client functions. This improves reliability, security and performance. network applications and the network in general.

Send your good work in the knowledge base is simple. Use the form below

Good work to site">

Students, graduate students, young scientists who use the knowledge base in their studies and work will be very grateful to you.

Hosted at http://www.allbest.ru/

[Enter text]

Servers. Basic concepts of servers

Client-server model

Classification standard servers

List of used literature

Servers. Basic concepts of servers

Server (from English server, serving). Depending on the purpose, there are several definitions of the concept of a server.

1. Server (network) - a logical or physical network node serving requests to a single address and/or domain name (adjacent domain names), consisting of one or a system of hardware servers running one or a system of server programs

2. Server (software) - software that receives requests from clients (in the client-server architecture).

3. Server (hardware) - a computer (or special computer equipment) dedicated and / or specialized to perform certain service functions.

3. Server in information technology - software component computer system that performs service functions at the request of the client, providing him with access to certain resources.

The relationship of concepts. The server application (server) runs on a computer, also called a "server", while considering the network topology, such a node is called a "server". IN general case it may be that the server application is running on a normal workstation, or a server application running on server computer within the considered topology, it acts as a client (that is, it is not a server from the point of view of the network topology).

Client-server model

The concepts of server and client and the roles assigned to them form the software concept of "client-server". The client-server model is another approach to structuring the Operating System (OS). In a broad sense, the client-server model assumes the presence of a software component - a consumer of a service - a client, and a software component - a provider of this service - a server. The interaction between the client and the server is standardized so that the server can serve clients implemented in different ways and maybe by different manufacturers. At the same time, the main requirement is that they request the services of the server in a way that is understandable to him. The initiator of the exchange is usually the client, which sends a service request to the server, which is in the request pending state. The same software component can be a client for one type of service and a server for another type of service. The client-server model is rather a convenient conceptual tool for a clear representation of the functions of a particular program element in one situation or another than technology. This model is successfully used not only in the construction of the OS, but also at all levels of software, and in some cases has a narrower, specific meaning, while retaining, of course, all its common features. With regard to structuring the OS, the idea is to split it into several processes - servers, each of which performs a separate set of service functions - for example, memory management, creation or scheduling of processes. Each server runs in user mode. The client, which can be either another OS component or an application program, requests a service by sending a message to the server. The OS kernel (here called the microkernel), operating in privileged mode, delivers the message to the desired server, the server performs the operation, after which the kernel returns the results to the client using another message. 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. Specifications open protocols 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.

Classification of standard servers

Typically, each server serves one (or several similar) protocols, and servers can be classified according to the type of service they provide.

Universal servers are a special kind of server program that does not provide any services on its own. Instead, generic servers provide service servers with a simplified interface to IPC resources and/or unified client access to various services. There are several types of such servers:

inetd from English. internet super-server daemon IP service daemon - a standard tool on UNIX systems - a program that allows you to write TCP/IP servers (and network protocols other families) that work with the client through inetd redirected standard input and output streams (stdin and stdout).

RPC from English. Remote Procedure Call remote procedure call - server integration system in the form of procedures available for calling remote user through a unified interface. The interface invented by Sun Microsystems for its operating system (SunOS, Solaris; Unix system) is currently used by both most Unix systems and Windows.

Applied client-server technologies Windows:

(D-)COM (English (Distributed) Component Object Model) etc. - Allows one program to perform operations on data objects using the procedures of other programs. Initially this technology is intended for their "embedding and linking objects" (OLE English Object Linking and Embedding), but, in general, allows you to write wide range various application servers. COM works only within one computer, DCOM is available remotely via RPC.

Active-X - COM and DCOM extension for creating multimedia applications.

Generic servers are often used to write all sorts of information servers, servers that do not need any specific networking, servers that do not have any tasks other than serving clients. For example, regular console programs and scripts can act as servers for inetd.

Most internal and network specific Windows servers work through universal servers (RPC, (D-)COM).

Network services ensure the functioning of the network, for example, DHCP and BOOTP servers provide initialization of servers and workstations, DNS - translation of names into addresses and vice versa.

Tunneling servers (for example, various VPN servers) and proxy servers provide communication with a network that is not accessible by routing.

AAA and Radius servers provide a single network authentication, authorization and access logging.

Information Services. Information services include both the simplest servers reporting information about the host (time, daytime, motd), users (finger, ident), and monitoring servers, such as SNMP. Majority information services work through universal servers.

Time synchronization servers are a special type of information services - NTP, in addition to informing the client about the exact time, the NTP server periodically polls several other servers to correct their own time. In addition to time correction, the travel speed is analyzed and corrected. system clock. Time correction is carried out by speeding up or slowing down the system clock (depending on the direction of the correction) in order to avoid problems that can occur with a simple permutation of the time.

File servers are servers for providing access to files on the server's disk.

First of all, these are on-demand file transfer servers using FTP, TFTP, SFTP and HTTP protocols. The HTTP protocol is transfer-oriented text files, but servers can also give arbitrary data as requested files, for example, dynamically created web pages, pictures, music, etc.

Other servers allow you to mount server disk partitions in disk space client and fully work with files on them. The servers allow NFS protocols and SMB. NFS and SMB servers work through the RPC interface.

Disadvantages of a file server system:

Very heavy load on the network, increased bandwidth requirements. In practice, this makes it almost impossible for a large number of users to work with large amounts of data at the same time.

Data processing is carried out on the user's computer. This entails increased requirements for the hardware of each user. The more users, the more money will have to be spent on equipping their computers.

Blocking data when editing by one user makes it impossible for other users to work with this data.

Security. To be able to work with such a system, you will need to give each user full access to the whole file, in which he may be interested in only one field.

Data access servers maintain the database and return data upon request. One of the most simple servers of a similar type - LDAP (English Lightweight Directory Access Protocol - a lightweight protocol for accessing lists).

There is no single protocol for accessing database servers, however, all database servers are united by the use of uniform query generation rules - the SQL language (Structured Query Language).

Messaging services allow the user to send and receive messages (usually text messages).

Servers first. Email working on SMTP protocol. The SMTP server receives the message and delivers it to the user's local mailbox or to another SMTP server (destination or intermediate server). On multi-user computers, users work with mail directly on the terminal (or web interface). To work with mail on a personal computer, mail is retrieved from the mailbox through servers operating under the POP3 or IMAP protocols.

To organize conferences, there are news servers operating via the NNTP protocol.

For real-time messaging, there are chat servers, a standard chat server operates on the IRC protocol - a distributed chat for the Internet.

There are many other chat protocols, such as ICQ or Jabber.

Remote access servers

Remote access servers, through the appropriate client program, provide the user with console access to a remote system.

To provide access to the command line, telnet, RSH, SSH servers are used.

The graphical interface for Unix systems - X Window System, has a built-in remote access server, since it was originally developed with this capability. The ability to remotely access the X-Window interface is sometimes incorrectly referred to as "X-Server" (the X-Window term for a video driver).

The standard server for remote access to the Microsoft Windows GUI is called a terminal server.

Some kind of management (more precisely, monitoring and configuration) is also provided by the SNMP protocol. The computer or hardware device must have an SNMP server for this.

Game servers serve for the simultaneous game of several users in a single game situation. Some games have a server in the main distribution and allow you to run it in a non-dedicated mode (that is, they allow you to play on the machine on which the server is running).

Server solutions - operating systems and / or software packages optimized for the performance of server functions by a computer and / or containing a set of programs for the implementation of typical services.

An example of server solutions is Unix systems that were originally designed to implement a server infrastructure, or server modifications. Microsoft platforms Windows.

It is also necessary to separate packages of servers and related programs (for example, a web server / PHP / MySQL kit for a quick deployment of hosting) for installation under Windows (Unix is ​​characterized by modular or "packaged" installation of each component, so such solutions are rare).

In integrated server solutions, all components are installed at the same time, all components are more or less tightly integrated and pre-configured with each other. However, in this case, replacing one of the servers or secondary applications (if their capabilities do not meet the needs) can be a problem.

Server solutions serve to simplify the organization of the basic IT infrastructure of companies, that is, to quickly build a full-fledged network in a company, including from scratch. Combining individual server applications into a solution implies that the solution is designed to perform most typical tasks; at the same time, the complexity of deployment and the total cost of ownership of an IT infrastructure built on such solutions is significantly reduced.

Proxy server (from the English proxy - “representative, authorized”) is a service in computer networks that allows clients to make indirect requests to other network services. First, the client connects to the proxy server and requests some resource (for example, e-mail) located on another server. The proxy then either connects to specified server and receives a resource from it, or returns a resource from its own cache (in cases where the proxy has its own cache). In some cases, a client request or server response can be modified by a proxy server in certain purposes. Also, a proxy server allows you to protect client computer from some network attacks.

Outputs

server formatProxy windows

Thus, any computer network, in fact, is a client-server network. A user who connects his computer to the Internet will be dealing with a client-server network, and even if the computer does not have access to the network, its software, and indeed it, is most likely organized according to the client-server scheme.

List of usesovannoyliterature

1. Droga A.A., Zhukova P.N., Koponev D.N., Lukyanov D.B., Prokopenko A.N. Computer science and mathematics. - Minsk, 2008.

2. Connolly T., Begg K. Databases. Design, implementation and support. Theory and Practice - 3rd ed. - M.: "Williams", 2003.

3. Kuznetsov S.D. Database fundamentals. - 1st ed. - M.: "Internet University of Information Technologies - INTUIT.ru", 2005.

4. Scott W. Ambler, Pramodkumar J. Sadalaj. Database refactoring: evolutionary design - M.: "Williams", 2007.

5. A.N. Morozevich, A.M. Zenevich Informatics. Minsk, 2008.

6. Titorenko G.A. Information technology management. M., Unity: 2002.

7. Melnikov V. Information security in computer systems. - M.: Finance and statistics, Electroninform, 1997.

Hosted on Allbest.ru

...

Similar Documents

    Basic concepts of servers. client-server model. Classification of standard servers. Disadvantages of a file server system. Cryptographic methods of information protection. Remote access servers. Methods and means of ensuring information security.

    control work, added 12/13/2010

    General information about the Linux operating system. Server information analysis. Basic applied client-server technologies of Windows. Information about the SQL server. General information about MySQL server. Installation and configuration specifics of the MYSQL server on LINUX.

    term paper, added 12/16/2015

    Analysis of the architecture of an information system, the structure of which includes the file-server and client-server systems. Comparison of SQL and QBE query languages. Principles for developing client-server architecture applications using structured language SQL queries.

    term paper, added 04/11/2010

    Architecture "client-server". System Analysis database "Newspaper of announcements", its infological and physical design. SQL Server Side Programming. Development of the client side in Borland C++ Builder 6.0 and using Web technologies.

    term paper, added 07/07/2013

    Methodology and main stages of developing a testing system for assessing the level of students' knowledge using the "Client-Server" technology. Designing the client, server part of this testing system, the procedure for compiling final reports.

    thesis, added 11/08/2010

    Designing physical and logical models of a remote database for gas stations. Development of a database in the Firebird DBMS using the IBExpert utility. Creation client application for Windows using client-server technology in the C++ Builder environment.

    term paper, added 01/18/2017

    Creation of a software product based on client-server technology that implements fault-tolerant operation of the system, which is capable of connecting the client to the master server in case of loss of communication alternative server(on the example of a weather server).

    term paper, added 08/24/2012

    Design and development of a database in the Firebird RDBMS. The sequence of creating an application based on client-server technology and running in the operating room Windows system. Stored procedures and triggers. Network access and transactions.

    term paper, added 07/27/2013

    Relational bases data as part of corporate information systems, their construction on the principles of client-server technology. Main characteristics of the Firebird DBMS. Designing a database for the information system "Computer components".

    term paper, added 07/28/2013

    Architecture "client-server". Parallel data processing in multiprocessor systems. Modernization of outdated information systems. Character traits modern server DBMS. The most popular server DBMS. Distributed requests and transactions.

The purpose of the lecture: to show how the general principles of client-server technologies are implemented in web technologies. Consider key elements basic HTTP protocol.

The subject of this course is the technologies of the global network World Wide Web (abbreviated as WWW or simply Web). In Russian, a common variant is the name "Web".

In particular, the course will cover such issues as: basic standards and protocols of the Web, markup and programming languages ​​for web pages, tools for developing and managing web content and applications for the Web, tools for integrating web content and applications on the Web.

Net Web is a global information space based on the physical infrastructure of the Internet and the transmission protocol HTTP data. Often, when talking about the Internet, they mean the network. Web.

Client-server technologies Web

The basic protocol of the Web hypertext resource network is the HTTP protocol. It is based on interaction client-server", which means that:

    Consumer- customer initiating a connection with the provider-server sends him a request;

    The supplier- server, having received a request, performs the necessary actions and returns a response with the result back to the client.

In this case, there are two ways to organize the work of a client computer:

    Thin client is a client computer that transfers all information processing tasks to the server. An example of a thin client is a browser-based computer used to run web applications.

    fat client, on the contrary, it processes information independently of the server, uses the latter mainly for data storage.

Before moving on to specific client-server web technologies, let's look at the basic principles and structure of the underlying HTTP protocol.

http protocol

HTTP(HyperText Transfer Protocol - RFC 1945, RFC 2616) is an application layer protocol for transferring hypertext.

The central object in HTTP is resource, which points to URI in the client's request. Typically, these resources are files stored on the server. A feature of the HTTP protocol is the ability to specify in the request and response how the same resource is represented by various parameters: format, encoding, language, etc. It is thanks to the ability to specify how the message is encoded that the client and server can exchange binary data, although initially this protocol designed to convey symbolic information. At first glance, this may seem like a waste of resources. Indeed, data in symbolic form takes up more memory, messages create an additional load on communication channels, but this format has many advantages. Messages transmitted over the network are easy to read, and by analyzing the received data, the system administrator can easily find the error and fix it. If necessary, the role of one of the interacting applications can be performed by a person, manually entering messages in the required format.

Unlike many other protocols, HTTP is a memoryless protocol. This means that the protocol does not store information about previous client requests and server responses. Components using HTTP can independently maintain state information related to recent requests and responses. For example, a web client application that sends requests can keep track of response delays, and a web server can store the IP addresses and request headers of recent clients.

All software for working with the HTTP protocol is divided into three main categories:

    Servers- providers of information storage and processing services (request processing).

    Clients- end users of server services (sending requests).

    Proxy servers to support transport services.

The "classic" HTTP session scheme looks like this.

    Establishing a TCP connection.

    Client request.

    Server response.

    Termination of the TCP connection.

Thus, the client sends a request to the server, receives a response from it, after which the interaction stops. Typically, a client request is a request for an HTML document or some other resource, and the server's response contains the code for that resource.

The HTTP request sent from the client to the server consists of the following components.

    The status line (sometimes the terms status line, or query line are also used to refer to it).

    Header fields.

    Empty line.

    Request body.

status bar together with header fields sometimes also called request header.

Rice. 1.1. The structure of the client's request.

Status bar has the following format:

query_method URL_pecypca protocol_version_HTTP

Let's take a look at the components of the status bar, with particular attention to the query methods.

Method, specified in the status bar, determines how to act on the resource whose URL is given in the same line. The method can take the values ​​GET, POST, HEAD, PUT, DELETE, etc. Despite the abundance of methods, only two of them are really important for a web programmer: GET and POST.

    GET. According to the formal definition, the GET method is intended to retrieve a resource with a specified URL. Having received GET request, the server MUST read the specified resource and include the resource ID in the response to the client. The resource whose URL is passed as part of the request does not have to be an HTML page, image file, or other data. The resource URL can point to the program's executable code, which, under certain conditions, must be run on the server. In this case, the client is returned not the program code, but the data generated during its execution. Although, by definition, the GET method is for retrieving information, it can be used for other purposes as well. The GET method is fine for passing small pieces of data to the server.

    POST. According to the same formal definition, the main purpose of the POST method is to send data to the server. However, like the GET method, the POST method can be used in many ways and is often used to retrieve information from a server. As with the GET method, the URL given in the status bar points to a specific resource. The POST method can also be used to start a process.

    The HEAD and PUT methods are modifications of the GET and POST methods.

HTTP protocol version is usually given in the following format:

HTTP/version.modification

Header fields, following the status line, allow you to refine the query, i.e. send additional information to the server. The header field has the following format:

Field_name: Value

The purpose of a field is determined by its name, which is separated from the value by a colon.

The names of some of the most common header fields in a client request and their purpose are given in tab. 1.1.

Table 1.1. HTTP request header fields.

HTTP Request Header Fields

Meaning

Domain name or IP address of the host that the client is accessing

The URL of the document that links to the resource specified in the status bar

Email address user mail working with a client

MIME types of data processed by the client. This field can have multiple values ​​separated by commas. Often the Accept header field is used to tell the server which image file types the client supports.

A set of comma-separated two-character identifiers that represent the languages ​​supported by the client

List of supported character sets

MIME type of the data contained in the request body (if the request does not consist of a single header)

The number of characters contained in the request body (if the request does not consist of a single header)

Present if the client does not request the entire document, but only part of it

Used to manage a TCP connection. If the field contains Close, it means that after processing the request, the server should close the connection. The Keep-Alive value suggests not to close the TCP connection so that it can be used for subsequent requests

Client information

In many cases, when working on the Web, there is no request body. When running CGI scripts, the data passed for them in a request can be placed in the body of the request.

Below is an example of an HTML request generated by a browser

GET http://oak.oakland.edu/ HTTP/1.0

Connection: Keep Alive

User Agent: Mozilla/4.04 (Win95; I)

Host: oak.oakland.edu

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*

Accept-Language: en

Accept-Charset: iso-8859-l,*,utf-8

Having received a request from the client, the server must respond to it. Knowing the structure of the server response is necessary for a web application developer, since programs that run on the server must independently form a response to the client.

Like a client request, a server response also has four components listed below.

    Status bar.

    Header fields.

    Empty line.

    Response body.

The server's response to the client begins with a status line that has the following format:

Protocol_version Response_code Explanatory_message

    Protocol_version is specified in the same format as in the client's request and has the same meaning.

    response_code is a three-digit decimal number that encodes the result of the request being served by the server.

    explanatory_message duplicates the response code in symbolic form. This is a character string that is not processed by the client. It is intended for system administrator or an operator who maintains the system, and is the decoding of the response code.

Of the three digits that make up the response code, the first (highest) determines the response class, the remaining two represent the response number within the class. So, for example, if the request was processed successfully, the client receives the following message:

HTTP/1.0 200 OK

As you can see, the HTTP 1.0 protocol version is followed by the code 200. In this code, the character 2 means the successful processing of the client request, and the remaining two digits (00) are the number of this message.

In currently used implementations of the HTTP protocol, the first digit cannot be greater than 5 and defines the following response classes.

    1 - a special class of messages called informational. A response code starting with 1 means that the server is continuing to process the request. When exchanging data between an HTTP client and an HTTP server, messages of this class are rarely used.

    2 - successful processing of the client's request.

    3 - request redirection. In order for the request to be served, additional steps must be taken.

    4 - client error. As a rule, a response code starting with the number 4 is returned if the client's request met syntax error.

    5 - server error. For one reason or another, the server is unable to fulfill the request.

Examples of response codes that the client can receive from the server, and explanatory messages are given in Table. 1.2.

Table 1.2. Server response code classes.

Decryption

Interpretation

Part of the request has been accepted and the server is waiting for the client to continue the request

The request was successfully processed, and the data specified in the request is transmitted in the client's response

As a result of processing the request, a new resource was created

The request has been accepted by the server, but processing has not been completed. Given code response does not guarantee that the request will be processed without errors.

Partial content

The server returns a portion of the resource in response to a request that contained a Range header field

multiple choice

The request points to more than one resource. The response body may contain instructions on how to properly identify the requested resource.

Moved Permanently

The requested resource is no longer located on the server

Moved Temporarily

The requested resource has temporarily changed its address

Syntax error found in client request

The resource on the server is not available for this user

The resource specified by the client does not exist on the server

Method Not Allowed

The server does not support the method specified in the request

Internal Server Error

One of the server components is not working correctly

Not Implemented

The functionality of the server is not enough to fulfill the request of the client

Service Unavailable

Service temporarily unavailable

HTTP Version not Supported

The HTTP version specified in the request is not supported by the server

The response uses the same header field structure as the client request. The header fields are intended to clarify the server's response to the client. A description of some of the fields that can be found in the server response header is given in Table. 1.3.

Table 1.3. Web server response header fields.

Field name

Description of content

Server name and version number

Time in seconds since the resource was created

List of methods allowed for this resource

Content-Language

Languages ​​that the client must support in order to correctly display the transmitted resource

MIME-type of data contained in the body of the server response

Number of characters contained in the server response body

The date and time the resource was last modified

The date and time that determines when the response was generated

The date and time that defines the moment after which the information transmitted to the client is considered outdated

This field specifies the actual location of the resource. It is used to redirect a request

caching directives. For example, no-cache means the data should not be cached.

The response body contains the code of the resource passed to the client in response to the request. It doesn't have to be the HTML text of the web page. As part of the response, an image, an audio file, a fragment of video information, as well as any other type of data supported by the client, can be transmitted. The content of the Content-type header field tells the client how to process the received resource.

The following is an example of a server response to the request in the previous section. The body of the response contains the source text of the HTML document.

Server: Microsoft-IIS/5.1

X-Powered-By: ASP.NET

Content-Type: text/html

Accept-Ranges: bytes

ETag: "b66a667f948c92:8a5"

Content Length: 426

Operand1:

Operand2:

operation:

The header fields and body of the message may be missing, but the status bar is obligatory element, as it indicates the type of request/response.

A field named Content-type can occur in both a client request and a server response. The value of this field is MIME- the content type of the request or response. MIME-type is also passed in the field of the Accept header present in the request.

Specification MIME(Multipurpose Internet Mail Extension - multipurpose mail Internet extension) was originally developed to allow the transmission of various data formats as part of emails. However, the use of MIME is not limited to email. MIME tools are successfully used in the WWW and, in fact, have become an integral part of this system.

Standard MIME designed as an extensible specification, with the expectation that the number of data types will grow as data representations evolve. Each new type must be registered with IANA(Internet Assigned Numbers Authority).

Before the advent MIME computers communicating via the HTTP protocol exchanged exclusively textual information. To transfer images, as well as to transfer any other binary files, had to use the FTP protocol.

Specification MIME, to describe the data format are used type And subtype. Type defines which class the content format of the HTTP request or HTTP response belongs to. Subtype specifies the format. The type and subtype are separated from each other by a slash:

type/subtype

Since in the overwhelming majority of cases, the server returns the original text of the HTML document in response to a client request, the Content-type field of the response usually contains the value text/html. Here, the text identifier describes the type, indicating that character information is being passed to the client, and the html identifier describes the subtype, i.e. indicates that the character sequence contained in the response body is an HTML description of the document.

List of types and subtypes MIME big enough. In table. 1.4 are examples MIME-types most commonly found in HTML request and response headers.

Table 1.4. MIME data types.

Type/subtype

File extension

Description

Document intended for processing by Acrobat Reader

application/msexcel

Document format Microsoft Excel

application/postscript

PostScript Document

application/x-tex

TeX document

application/msword

Document format Microsoft Word

document in RTF format, displayed with Microsoft Word

GIF image

Picture in JPEG format

Image in TIFF format

Image in XBitmap format

ASCII text

HTML document

MIDI audio file

WAV audio file

mail message

Post to newsgroups

Mpeg, .mpg, .mpe

Video clip in MPEG format

Video clip in AVI format

Unique URL identifiers are used to uniquely identify resources on the Web.

A Uniform Resource Identifier (URI) is a short sequence of characters that identifies an abstract or physical resource. The URI does not indicate how to get the resource, it only identifies it. This makes it possible to describe using RDF (Resource Description Framework) resources that cannot be obtained via the Internet (names, titles, etc.). The most famous examples of URIs are URL and URN.

    URL(Uniform Resource Locator) is a URI that, in addition to identifying a resource, also provides information about the location of this resource.

    URN(Uniform Resource Name) is a URI that identifies a resource in a specific namespace, but unlike a URL, a URN does not indicate the location of that resource.

The URL has the following structure:

<схема>://<логин>:<пароль>@<хост>:<порт>/

    scheme- resource access scheme (usually a network protocol);

    login- username used to access the resource;

    password- the password associated with the specified username;

    host- Fully registered domain name of the host in the DNS system or IP address of the host;

    port- host port for connection;

    URL path- specifying information about the location of the resource.

It should be noted that, like any classification, our classification of information system architectures is not absolutely rigid. In the architecture of any particular information system, the influences of several general architectural decisions can often be found. However, when architecturally designing a system, it seems useful to have at least a partially orthogonalized architectural basis. In the following parts of the course, we will consider in detail the features of each architecture and focus on the methodologies and tools that support the design and development of information systems in the corresponding architecture.

2.1. File Server Applications

Apparently, the organization of information systems based on the use of dedicated file servers is still the most common due to the presence a large number personal computers different levels development and comparative cheapness of PC binding in local networks. What attracts such an organization to developers of information systems who are not very experienced in the field of system programming? Most likely, the fact that when relying on file-server architectures, the autonomy of the application (and most of the system) software that runs on each PC on the network is preserved. In fact, the components of an information system running on different PCs interact only due to the presence shared storage files stored on the file server. In the classical case, each PC duplicates not only application programs, but also database management tools. The file server is an extension shared by all PCs of the complex. disk storage(Figure 2.1).

Without dwelling in detail on the promising tools development of file server applications and without giving an analysis of trends in the development of relevant technologies (the third part of the course is devoted to this), we will briefly list the main advantages and disadvantages of file server architectures.

Of course, the main advantage is the ease of organization. Designers and developers of the information system are in the familiar and comfortable conditions of the IBM PC in MS-DOS, Windows or any lightweight Windows variant NT. There are convenient and advanced tools for developing a graphical user interface, easy-to-use tools for developing database systems and / or DBMS. But in many ways this simplicity is apparent. (As the Russian proverb says, "Simplicity is worse than theft", and here we usually have simplicity based on theft software products for PC.)

Rice. 2.1. Classical representation of an information system in the "file-server" architecture

First, the information system has to work with the database. Therefore, this database must be designed. For some reason, developers of file-server applications often feel that, due to the simplicity of database management tools, the problem of database design can be neglected. Of course, this is wrong. A database is a database. The better it is designed, the more likely it is to effectively use the information system later. Naturally, the complexity of database design is determined by the objective complexity of the modeled subject area. But, in fact, from what should it follow that file-server applications are suitable only in simple subject areas?

Secondly, as we repeatedly emphasized in the first part of the course, the necessary requirements for the database of an information system are maintaining its integrity and guaranteed reliability of information storage. The minimum conditions under which these requirements can be met are:

    the presence of transactional management, storage of redundant data (for example, using logging methods), the ability to formulate integrity constraints and check their compliance.

In principle, the file-server organization, as shown in Figure 2.1, does not contradict the observance of the noted conditions. An example of a system that does this, but is based on a file server architecture, is the formerly popular "database server" Informix SE.

Long note:
In order to preserve the clarity of the further presentation, we need to somewhat clarify the terminology. It's not for nothing that we wrote "database server" in quotation marks in relation to the Informix SE DBMS. Under this system, a copy of the DBMS software was maintained for each user-initiated DBMS session. Roughly speaking, for each user process interacting with the database, a DBMS service process was created, which ran on the same processor as the user process (i.e., on the client side). Each of these service processes actually behaved as if they were the sole representative of the DBMS. All synchronization of possible parallel work with the database was performed at the level of external memory files containing the database. Let us agree henceforth to call such DBMS not database servers, but database management systems based on a file-server architecture (DBMS-FS).

By a true database server, we mean software education, bound to the corresponding database (databases), existing, generally speaking, regardless of the existence of user (client) processes, and generally speaking (though not necessarily) executed on dedicated hardware (we deliberately use not very specific terms "software education" and "dedicated hardware" because their specific implementation differs in different servers databases).

True database servers are much more complex in organization than DBMS-FS, but they provide more subtle and efficient database management. Throughout this course, when we use the term "database server" we will refer to true database servers.

But on the other hand, in most personal DBMS these conditions are not met even with the help of rough tricks. IN best case it is possible to partially compensate for the shortcomings at the level of application programs.

Thirdly, the interface of developed database servers is based on the use of a high-level database language SQL data, which allows the use of network traffic between the client and the database server only for useful purposes (mainly SQL statements are sent from the client to the server, and the results of the execution of statements are sent from the server to the client). In a file-server organization, the client works with remote files, which causes a significant traffic congestion (since the DBMS-FS works on the client side, it is generally necessary to view the entire corresponding file on the client side in order to select useful data).

In general, in a file server architecture, we have a "thick" client and a very "thin" server, in the sense that almost all the work is done on the client side, and only enough disk space is required from the server (figure 2.2).

Rice. 2.2. "Thick" client and "thin" server in file-server architecture

Brief conclusions. Simple, low volume, and designed for single-user use, a file server application can be designed, developed, and debugged very quickly. Very often for a small company to maintain, for example, personnel records, it is enough to have an isolated system running on a stand-alone PC. Of course, in this case, too, great care is required from end users (or administrators, whose presence is doubtful in this case) to securely store and maintain the integrity of the data state. However, in slightly more complex cases (for example, when organizing an information system to support a project carried out by a group), file-server architectures become insufficient.

Client-server applications

By a client-server application we mean an information system based on the use of database servers (see the long note at the end of section 2.1). The general representation of the information system in the "client-server" architecture is shown in Figure 2.3.

    On the client side, the application code is executed, which necessarily includes components that support the end user interface, generate reports, and perform other application-specific functions (for now, we will not be interested in how the application code is built). The client side of the application interacts with client side database management software, which is, in fact, the individual representative of the DBMS for the application.

(Here again, there are shortcomings in terminology. Usually, when a company announces the release of the next database server, it is implicitly understood that there is also a client component of this product. The combination "client part of the database server" seems a little strange, but we will have to use this term.)

Rice. 2.3. General representation of the information system in the "client-server" architecture

Note that the interface between the client side of the application and the client side of the database server is usually based on the use of the SQL language. Therefore, functions such as, for example, pre-processing of forms intended for database queries, or the generation of resulting reports are performed in the application code.

Finally, the client side of the database server, using the tools network access, refers to the database server, passing it the text of the SQL statement.

There are two more remarks to be made here.

Typically, companies producing advanced database servers strive to ensure that their products can be used not only in today's standard TCP / IP-oriented networks, but in networks based on other protocols (for example, SNA or IPX / SPX) . Therefore, when organizing network interactions between the client and server parts of the DBMS, not standard high-level tools (for example, the mechanisms of software nests or remote procedure calls) are often used, but their own functionally similar tools that are less dependent on the features of network transport protocols. When we talk about an interface based on the SQL language, you need to be aware that despite the titanic efforts to standardize this language, there is no such implementation in which the standard features of the language would not be extended. The thoughtless use of language extensions leads to complete dependence of the application on a particular database server vendor.

Now let's see what happens on the database server side. In the products of almost all companies, the server receives from the client the text of the operator in the SQL language.

    The server compiles the received statement. We will not dwell here on which target language is used by a particular compiler; different implementations take different approaches (see Part 4 for examples). The main thing is that in any case, based on the information contained in the database catalog tables, the non-procedural representation of the operator is converted into some procedure for its execution. Then (if the compilation was successful) the statement is executed. Again, we won't discuss the technical details as they differ in implementations. Consider the possible actions of SQL statements.
      An operator may refer to a class of operators for defining (or creating) database objects (it would be more accurate and correct to speak about database schema elements or about metadatabase objects). In particular, domains, tables, integrity constraints, triggers, user privileges, stored procedures can be defined. In any case, when the database schema element creation statement is executed, the corresponding information is placed in the database catalog tables (database metadata tables). Integrity constraints are usually stored in the metabase of the database directly in textual representation. For actions defined in triggers and stored procedures, procedural executable code is generated and stored in catalog tables. Note that integrity constraints, triggers, and stored procedures are, in a sense, representative of the application in the database backed by the server; they form the backbone of the application's back-end (see below). When executing data selection statements, based on the contents of the tables affected by the query, and possibly using indexes maintained in the database, the resulting data set is formed (we intentionally do not use the term "result table" here, because, depending on the specific type of operator, the result may be ordered, and tables, i.e. relations are unordered by definition). The server part of the DBMS sends the result to the client part, and the final processing is done in the client part of the application. When executing database content modification statements (INSERT, UPDATE, DELETE), it is checked that the integrity constraints defined at that time (those that belong to the class of immediately checked) will not be violated, after which the appropriate action is taken (accompanied by modification of all relevant indexes and logging changes). Next, the server checks to see if the change affects the firing condition of any trigger, and if such a trigger is found, executes its action procedure. This procedure may include additional operators database modifications that may cause other triggers to fire, and so on. You can think of the actions that are performed on the database server when checking for integrity constraints and when triggers are fired as actions of the application back end. When executing database schema modification statements (adding or deleting columns of existing tables, changing the data type of an existing column existing table etc.) can also fire triggers, i.e., in other words, can execute server part applications. Similarly, triggers can fire when database schema objects (domains, tables, integrity constraints, etc.) are destroyed. A special class of operators in the SQL language is the call operators of previously defined and stored in the database stored procedures. If a stored procedure is defined using a well-developed language that includes both non-procedural SQL statements and purely procedural constructs (for example, Oracle's PL / SQL language), then a serious part of the application can be placed in such a procedure, which, when the procedure call statement is executed, will be executed on server side, not client side. When executing a transaction completion statement, the server must check that all so-called deferred integrity restrictions are observed (such restrictions include restrictions imposed on the contents of the database table as a whole or on several tables at the same time; for example, the total salary of department 999 employees should not exceed 150 million rubles .). Again, checking for deferred integrity constraints can be thought of as running the back-end of an application.

As you can see, in a client-server organization, clients can be thin enough, and the server must be thick enough to be able to satisfy the needs of all clients (Figure 2.4).

Rice. 2.4. "Thin" client and "fat" server in client-server architecture

On the other hand, developers and users of information systems based on the client-server architecture are often dissatisfied with the ever-present network overhead that results from the need to go from client to server with each successive request. In practice, the situation is common when effective work a separate client component of the information system actually requires only a small part common base data. This leads to the idea of ​​maintaining a local cache of the shared database on the side of each client.

In fact, the concept of local database caching is a special case of the concept of replicated (or, as they are sometimes called in Russian literature, replicated) databases. As in the general case, to support a local database cache, workstation software must contain a database management component - a simplified version of the database server, which, for example, may not provide multi-user access. A separate problem is to ensure the consistency (coherence) of caches and a common database. Here are possible various solutions- from automatic maintenance of consistency through the means of the underlying database management software to the complete shifting of this task to the application layer. Either way, the clients get fatter without the server getting thinner (Figure 2.5).

Rice. 2.5. "Fat" client and "fat" server in a client-server architecture with local cache support on the client side

Let us formulate some preliminary conclusions. The client-server architecture at first glance seems to be much more expensive than the file-server architecture. Requires more powerful hardware at least, for the server) and much more advanced database management tools. However, this is only partially true. Huge advantage client-server architecture is its scalability and general ability to develop.

When designing an information system based on this architecture, more attention should be paid to literacy. common solutions. Technical means of the pilot version can be minimal (for example, one of the workstations can be used as the hardware basis of the database server). After the creation of the pilot version, it is necessary to carry out additional research work, to find out narrow places systems. Only after that it is necessary to make a decision on the choice of server hardware that will be used in practice.

The increase in the scale of the information system does not give rise to fundamental problems. The usual solution is to replace the server hardware (and maybe the workstation hardware if you want to switch to local database caching). In any case, the applied part of the information system is practically not affected. Ideally, which, of course, does not exist, Information system continues to function normally after a hardware change.

Top Related Articles