Oracle concept (Oracle 10.2)
10. Application Architecture
This chapter defines the application architecture and describes how Oracle database servers and database applications work in a distributed processing environment. This architecture can be applied to almost any type of Oracle Database system environment.
This chapter includes the following:
U Client/Server Architecture
U multi-layer architecture Overview
U Oracle network service Overview
Client/Server Architecture Overview
In the Oracle database system environment, the database application and database are divided into two parts: a front-end or client, and a backend or server, which are commonly used terms: client/server architecture. The client runs the database application and is responsible for accessing the database information and interacting with users through the keyboard, screen, and clicking a device (such as a mouse. The server runs the Oracle software and processes the features required for concurrent and shared access to the database.
Although the client application and Oracle can run on one server, running the client and server on different machines through network connection can achieve higher performance. The next section discusses possible variants of the Oracle client/server architecture.
Distributed Processing is to use multiple processors on different systems to process a single task. The distributed processing example of the Oracle database system is shown in Figure 10-1.
U in Part A of the chart, the client and server are located on different computers that are connected over the network. The client and server of the Oracle Database System communicate through the Oracle network service (Oracle network interface.
U in Part B of the chart, a single computer has multiple processors, and different processors independently execute Oracle client applications.
Note: The application environment in this chapter is a database on a server. In a distributed database, one server (Oracle) may need to access the database on another server.
Figure 10-1 client/server architecture and distributed processing
The Oracle client/server architecture provides the following advantages in a distributed processing environment:
U client applications are not responsible for performing any data processing. It obtains input from the user, data from the server, and then uses the display capability or terminal of the client workstation to analyze and present data (for example, using a graphical interface or spreadsheet)
U client applications do not depend on the physical location of data. Even if the data is moved or distributed to another database server, the application can still function as long as it makes minor adjustments or does not need to be adjusted.
U oracle can utilize the multi-task and shared memory capabilities of the underlying operating system. Therefore, it can provide its client applications with the highest level of concurrency, data integrity, and performance.
U client workstations or terminals can optimize data presentation (for example, by providing graphics and mouse support), servers can optimize data processing and storage (for example, by providing more memory and disk space ).
U in the network environment, you can use a cheap client workstation to efficiently access the data of remote servers.
If needed, Oracle performance can also be improved when the system performance increases. You can add multiple servers (horizontal scaling) to the network for Distributed Database processing load. You can also migrate Oracle to a minicomputer or mainframe to take advantage of the performance (vertical scaling) of large systems ). In any case, all data and applications do not need or only need a little modification, because oracle is very easy to migrate between systems.
In the network environment, shared data is stored on the server, rather than on all computers in the system. This makes managing concurrent access easier and more efficient.
U in the network environment, client applications use SQL statements to submit requirements to the database. After the database receives the SQL statement, it processes the SQL statement and returns the result to the client application. The network traffic is minimized because only requests and results are transmitted over the network.
Multi-layer architecture
In a multi-tier system environment, an application server provides data for the client and serves as an interface between the database server and the client. This architecture becomes more important with the popularity of Internet applications.
Enable the architecture of the Application Server:
U verifies the certificate of a client (such as a web browser)
U connect to the Database Server
U executes the requested operation
An example of multi-layer architecture is shown in Figure 10-2.
Figure 10-2 Multi-layer architecture environment example
Client
The client submits a request, and the database server is responsible for performing corresponding operations. The client can be a web server or other end-user process. In a multi-tier architecture, the client connects to the database server through one or more application servers.
Application Server
The client accesses data through the application server. The application server acts as an interface service between the client and one or more database servers. It provides additional security. It can also perform some Query Processing for the client, thus reducing the load on the database server.
When the application server performs operations on the database server for the client, it is like a client. The permissions of the Application Server are strictly limited to avoid unnecessary and unnecessary operations during client operations.
Database Server
The database server provides data for the application server that requests a client. The database server processes all the remaining queries.
The Oracle database server can review the operations performed by the application server on behalf of individual customers, as if the application server performed the operations on its own. For example, a client operation can request information from the client, but the application server operation may be a connection request to the database server.
Oracle network service Overview
Oracle Network Service provides enterprise-level connection solutions in distributed and heterogeneous computing environments. Oracle network service is responsible for starting network sessions from client applications to Oracle databases.
Oracle network services use communication protocols or application interfaces (APIS) that support a wide range of networks to provide distributed databases and distributed processing for Oracle.
A communication protocol is a series of protocols that specify how applications access the network and how data is subcontracting for cross-network transmission.
An API is a series of subprograms that provide communication protocols to build communication channels between remote processes under network conditions.
After a network session is established, the Oracle network service becomes a data correspondent between the client application and the database server. It is responsible for building and maintaining connections between client applications and database servers, and for exchanging data between them. Each computer on the network has an oracle network service, so it can perform this task.
The Oracle Network Service provides location transparency, centralized configuration and management, and fast and concise installation and configuration. It can also maximize the use of system resources and improve system performance. The Oracle Shared Server architecture improves application scalability and the number of clients that can access the database at the same time. The Virtual Interface (vi) Protocol processes most messages through high-speed network hardware, which reduces the burden on the CPU to handle more important tasks.
How Oracle network services work
Oracle supports industrial-level network protocols and provides interfaces between database servers running Oracle processes on the network and Oracle Applications running user processes.
The Oracle protocol obtains SQL statements from the interfaces of Oracle Applications, packs them, and transmits them to Oracle through a supported industrial standard high-level protocol or program interface. The protocols obtain responses from Oracle, package them, and transmit them to applications through the same high-level communication mechanism. This process does not depend on the network operating system.
Depending on the operating system running Oracle, the Oracle network service software of the database server can contain the driver software, or can be started as an additional Oracle background process.
Listener
When an instance is started, a listening process builds a communication link for Oracle. When a user process sends a connection request, the listener determines whether it should use the Shared Server Scheduler process or a dedicated server process to build a suitable connection.
Listeners also build communication links between databases. When multiple databases or instances run on one computer, such as the real application cluster (RAC), the service name is automatically registered to other listeners on the same computer. One service name can identify multiple instances, and one instance can belong to multiple service names. The name of the client that connects to the service. You do not need to specify the instance to which the client connects.
Service Information Registration
Dynamic Service Registration reduces the difficulty of managing multiple databases and multiple instances. The service name that the listener sends to the client request is registered to the listener. Service information can be dynamically registered on the listener through a feature called service registration, or static configuration in the listener. ora file.
Service Registration depends on the pmon process (an instance background process) to register instance information with the listener, including the current status and load of the instance and the Shared Server Scheduler. The registration information allows the listener to pass client connection requests to appropriate service handlers. Service Registration does not need to be configured in the listener. ora file.
The initialization parameter SERVICE_NAME identifies the database service to which an instance belongs. At startup, each instance wants to register the listener of another instance of the same service. In database operations, each service instance sends CPU usage information and the current number of connections to the listener of the same service. In this way, dynamic load balancing and connection failure transfer can be started.