The memory calculation in the Oracle database is the thing

Memory computing that matter

So far, memory is the fastest storage device we can use today. Putting data into memory as much as possible is the most effective way to improve data access performance for various applications. For many key business systems, memory is a kind of “volatile” and very limited storage device. How to ensure the performance while making the data persistent, how to put limited memory into the unlimited data to be processed. It is a major topic of programming.

Oracle's memory TImesTen in-memory database provides a near-perfect solution for mission-critical systems with high concurrency, low latency and high availability requirements: putting data into memory and simplifying development with SQL, application developers can focus more on the business Implementation without worrying about the underlying memory allocation. TImesTen also provides data integrity, consistency and recoverability comparable to Oracle databases in a large concurrent environment. The "volatility" of memory is also overcome, and maintenance is greatly simplified. Therefore, Oracle TImesTen has been widely used in telecommunications, finance and other industries for more than 20 years.

Another problem based on memory computing has always plagued the industry - limited memory and relatively infinite data: a single server's memory is far from enough to store the data that needs to be processed, frequent memory swaps consume too much resources, users have to use manual points The way of the library spreads the data across multiple servers for processing, which in turn brings many problems such as management, development complexity, and poor scalability.

With the development of technology, distributed memory grid technology has also begun to accelerate the speed of data access, such as Redis, Oracle Coherence and so on. Distributed memory grid technology uses key-value memory data storage to facilitate the distribution of disk-type database data to each node of the cluster system, providing high performance for simple data queries and transactions. But the problems with this type of technology are: strong consistency of data, data persistence, complex reporting and statistics, and large concurrent transaction processing.

Distributed relational in-memory database - ideal in-memory database

For a high-concurrency, real-time response to critical business systems, a distributed relational database is the ideal choice: it has the characteristics of relational data ACID, can handle high concurrent user requests, and can respond to services in real time. The data access request has a complete backup recovery and disaster recovery mechanism. At the same time, like NoSQL's memory grid technology, it can distribute the data to be processed to all nodes on a cluster, and can expand the data processing in the cluster as needed. node. In early May of this year, Oracle distributed memory database - this ideal, integrated memory computing, distributed processing, distributed database of relational database finally officially introduced to the market.

TImesTen 18.1 Scaleout features

Oracle's distributed in-memory database is built using the TimesTen kernel that has been around for more than 20 years. The official release is called TimesTen 18.1 Scaleout, and the version number means the first major release in 2018.

First, TimesTen 18.1 Scaleout is a strictly relational database; it has the same ACID characteristics as Oracle databases, such as: atomicity and persistence of transactions, transaction commit and rollback, version-based concurrency control, read and write operations. Do not block each other and so on.

Secondly, as a distributed in-memory database, it is a logically single, physically distributed distributed in-memory database. The data in TimesTen 18.1 Scaleout is distributed to each node of the database cluster. The application can access the database from any point. Access to all data, the application does not need to know where the data is stored. This is also different from the fragmented database on the market, which greatly simplifies the difficulty of application development and database management.

The memory calculation in the Oracle database is the thing

Several basic concepts of TimesTen Scaleout

A set of internally interconnected servers running Oracle TimesTen Scaleout is called a Grid. The TimesTimeTen Scaleout code is called an instance. The TimesTen Scaleout instance is divided into a data instance and a management instance. The concept of the data instance and the instance of the Oracle database are Very similar, it includes data caching and background processes.

The memory calculation in the Oracle database is the thing

Each TimesTen Scaleout data instance contains a unit of data persistence that we call Element, which has a portion of the data in the entire database and complete user information and schema information in the database; each element has its own persistent checkpoint file. And transaction log files, Element can use replicas for high availability and disaster tolerance.

In a cluster, there are generally 1 or 2 management instances configured to track and monitor the running status of the entire cluster.

Way of data distribution

So how do you assign all the data to each Element? Generally speaking, there are the following methods:

DISTRIBUTE

Based on the consistency hash algorithm distribution, usually used for large database tables, such as: Cush_ID based hash values, such as we distribute the rows in the CUSTOMER table to all elements. The following statement can be used:

CREATETABLE CUSTOMER (

ID NUMBER NOT NULL PRIMARY KEY,

NAME VARCHAR2(100),

...

) DISTRIBUTE BY HASH;

The memory calculation in the Oracle database is the thing

REFERENCE

The rows associated with the child table and the parent table coexist in the same element, and the optimized local transaction stores the rows associated with CUSTOMER in the ORDERS table in the same element.

The memory calculation in the Oracle database is the thing

DUPLICATE

The query-based small table stores complete data in each element, optimizing local transactions. If the PRODUCT table stores a full amount of data in all elements, this applies to tables that are relatively small and that are not changed very frequently.

The memory calculation in the Oracle database is the thing

Highly available implementation

As mentioned earlier, TimesTen 18.1 Scaleout is highly available through multiple copies of Element. This mechanism is called K-Safety (K>1), as shown in the following figure:

The memory calculation in the Oracle database is the thing

A complete data set is called Data Space, which contains all the Elements of this database. The Dataspace Group1 in the above figure contains Element 1 and Element 3 to form a complete database. A collection of the same Element is called a Replica Set, which is a copy of each other. For example, Replica Set1 in the above figure contains Element 1 and Element 2, which are located on different machines to achieve high data availability.

The elements that are mutually copied are double-active, that is, the application can initiate read and write transaction operations on any one of the elements without affecting each other, and the database system is responsible for data synchronization of the two elements.

Under this architecture, even if multiple Elements are abnormal, there is no impact on the application as long as there is a complete set of available copies. If an exception occurs for the entire replica set, the application can also choose to accept a result set that only returns the remaining data.

Centralized installation and management

TimesTen 18.1 Scaleout management operations can complete all operations of the cluster through an access point through a host using a graphical interface or command line, including:

Software Installation

Patch application

Configuration management

Database creation and management

Database monitoring

Backup and recovery

Log collection

Comparison of several memory caching technologies of Oracle

With the introduction of TimesTen 18.1 Scaleout, Oracle has further improved the real-time memory data processing puzzle. The traditional OLTP-oriented TimesTen has also been upgraded to 18.1. This version is called TimesTen 18.1 Classic. Let's see how the usage scenarios differ between them:

1.TimesTen18.1 Classic

The memory calculation in the Oracle database is the thing

Usage scenario: For real-time, near real-time OLTP system acceleration. If TimesTen18.1 Classic has enough machine memory to store the data that needs to be processed, TimesTen 18.1 Classic can provide higher data processing real-time.

Deployment: Can be run separately or as a buffer for the Oracle database, using CacheGroup or other means to synchronize data with the Oracle database.

2.TimesTen 18.1 Scaleout

The memory calculation in the Oracle database is the thing

Usage scenario: distributed, fault-tolerant, elastic and scalable relational in-memory database for high-concurrency, low-latency OLTP-based business-critical systems; single-machine memory cannot store all data that needs real-time processing and processing, and has to be manually divided. Scene.

Deployment: Use a server cluster deployment.

3.Oracle Database In-Memory Option

The memory calculation in the Oracle database is the thing

Usage scenario: The data columnar memory technology introduced by the Oracle12.1.02 database is mainly used to speed up data analysis and reporting.

Deployment: Users can add the columnar memory storage option to the database table in the database that needs to be analyzed and reported. The data will be cached in column or column compression when the database is started or the first time the table is queried. To the In Memory Area of ​​the SGA area of ​​the Oracle database: The optimizer automatically optimizes the SQL access path, allowing SQL that needs access to the columnar memory data to retrieve data from the In Memory Area.

4.Oracle Coherence

The memory calculation in the Oracle database is the thing

Usage scenario: Oracle Coherence is a distributed memory grid technology, generally used for intermediate layer data access acceleration.

Deployment: Data is stored in memory as Key Value and accessed using RESTAPI.

to sum up

In the era of big data and cloud, there are many ways to process real-time data. Oracle provides products and technologies with multiple memory technologies to speed up data access and processing. The launch of TimesTen 18.1 Scaleout further complements the Oracle family of memory computing products. It inherits the core of the proven TimesTen in-memory database, and incorporates some of the design concepts of the No SQL database, which will be applied to many key business systems that have high requirements for real-time data processing.

Portable Power Station

Portable Power Station also known as Portable Power Bank. Our product regulated DC Power, AC Pass-Through Charging, Wireless Fast Charger, Bluetooth Playback, Attentive Start, Car charger, Type-C ....... Large capacity meet the needs of all kinds of equipment.

Portable Power Station,Indoor Portable Power Station,Solar Portable Power Station,Portable Power Station With Bms

Jiangsu Zhitai New Energy Technology Co.,Ltd , https://www.zhitainewenergy.com