Alinous Elastic DB Blog

This Blog is about Alinous Elastic Database's technical topics, development status, and news.

Avoid Lock Escalation by Disk Swap

Lock Escalation is to change row locks into table lock. This method is dangerous and not effective. That is because it makes dead lock. In addition to that, vacancy of lock occurs.

Memory Manager of Database

Huge Row Locks Occurs

Sometimes a lot of row locks are necessary, in order to execute application. That is inevitable to keep data consistency.

On handling big data, number of records depends on master table's one also becomes big.

Batch Process

Batch process cases this problem most often. It is to collect data, and calculate the result. Then transaction have to lock a lot of records.

Read "Avoid Lock Escalation by Disk Swap" more


Created time: 2017-02-17 Last updated time: 2017-02-17

Implement DELETE SQL Statement

This page is about internal implementation procedure of DELETE SQL statement in both Local & Remote SQL Mode.

On Transaction Engine

On transaction phase, from executing BEGIN to before COMMIT or ROLLBACK statement, the transaction engine uses record cache.

About record cache engine, please take a look at Execute Transaction Concurrently with Record Cache.

Scan Records to Delete

The DELETE statement has WHERE clause. It scans records which satisfy the condition in it. After that, it adds the records to deleted cache.

DML Lock on Scan

The transaction engine locks records on scanning. This lock is same with of UPDATE SQL statement.

Read "Implement DELETE SQL Statement" more


Created time: 2017-02-15 Last updated time: 2017-02-15

Execute Transaction Concurrently with Record Cache

Record Cache Engine

Concurrency Control of Transaction is implemented by records cache. This page explains how the cache is used.

Record Caches for Each Transaction

Record Caches are used to check which records are updated by local transaction.

Fast Concurrency Control

Alinous Elastic DB does not update data in the storage engine before committing the transaction.

Even if table partitioning or replication cluster is used, the data in the storage is single point on update it.

Read "Execute Transaction Concurrently with Record Cache" more


Created time: 2017-02-15 Last updated time: 2017-02-15

Implement UPDATE SQL Statement

This page is about internal implementation procedure of UPDATE SQL statement in both Local & Remote SQL Mode.

On Transaction Engine

On transaction phase, from executing BEGIN to before COMMIT or ROLLBACK statement, the transaction engine uses record cache.

On executing UPDATE statement, READ COMMITTED isolation level uses locks, but SERIALIZABLE level does not use locks.

About record cache engine, please take a look at Execute Transaction Concurrently with Record Cache.

Scan Records to Update

The UPDATE statement has WHERE clause. It scans records which satisfy the condition in it. After that, it makes cache records.

Read "Implement UPDATE SQL Statement" more


Created time: 2017-02-15 Last updated time: 2017-02-15

Implement INERT SQL Statement

This page is about internal implementation procedure of INSERT SQL statement in both Local & Remote SQL Mode.

On Transaction Engine

On transaction phase, from executing BEGIN to before COMMIT or ROLLBACK statement, the transaction engine uses record cache.

The cache is used to store the updates of records. It is available from the transaction.

About record cache engine, please take a look at Execute Transaction Concurrently with Record Cache.

INSERT into Record Cache

The records in the INSERT statement is added to the cache. No locks are necessary, that is because it is transactionally independent.

Read "Implement INERT SQL Statement" more


Created time: 2017-02-15 Last updated time: 2017-02-15

Implement from Local SQL Mode

Today is 14th February 2014. I'm going to implement Alinous Elastic DB from local mode, before remote mode, because it contains base of whole database architecture.

Distributed Database with Local Mode

Alinous Elastic DB has 2 execution modes, they are local mode and remote mode. It is not only scalable distributed database, but also high response database.

Local Mode

In local mode, database works on only local host. It works very fast in this mode, but not scalable. In addition to that, the database becomes portable.

Therefore, in following cases local mode is used.

  • On Debug and Development with Eclipse IDE
  • When high speed response, not scalability,  is necessary

Remote Mode

Remote mode is main mode to run on cloud server. In this mode, the database is scalable, with dynamic partitioning.

Read "Implement from Local SQL Mode" more


Created time: 2017-02-14 Last updated time: 2017-02-14

NewSQL for OLTP & Bigdata

NewSQL is database management system which have more functions than RDBMS. It has distributed data management functions, that NoSQL is good at. Alinous Elastic DB is a kind of NewSQL.

Use Case of Bigdata

BigData is not simply huge data. That is high resolution data.

Data Acquisition Changes

Recently, IoT (Internet of Things) is a trending keyword. The IoT products generates a lot of data.

That is because the way to acquire data is changed by it. It takes a lot of detailed information as huge logs. As time passed, the data become bigger and bigger.

Detail Information for the Customer

When we acquire detail information about each customer, quantity of data become huge. In addition to that, it increases every day.

Read "NewSQL for OLTP & Bigdata" more


Created time: 2017-02-11 Last updated time: 2017-02-11

NoSQL vs Distributed Relational Database

NoSQL is to solve problem of non-distributed database. But by adding distributed functions, RDBMS(Relational Database Management System) can do same things.

Advantage of NoSQL

NoSQL databases are basically very simple. But recently, they have some great functions about distributed data management.

The advantage of NoSQL is weak points of RDBMS.

Small Overhead

NoSQL for BigData, ex Hadoop, do not supports UPDATE and DELETE operation in SQL. In addition to no transaction support, it makes the structure simple.

Therefore it has almost no over head of Relational Databases.

Read "NoSQL vs Distributed Relational Database" more


Created time: 2017-02-11 Last updated time: 2017-02-11

Distributed Transaction Performance for Scalability & Response

In order to make Distributed Database, especially Transactional RDBMS (Relational Database) supports remote transaction, fast, there are some points to solve.

Why Distributed Database is High Speed

Generally, distributed database is good at high scalability & high throughput. That is because it has some network nodes, and the CPUs in them works simultaneously.

The query benchmark is very fast, if it is independent task. As you add nodes, the number of transactions executed is linearly increases.

Weak Points of Distributed Database

But in actual use, it does not work like benchmark. It has some weak points.

The distributed database is good at throughput, but week at response speed. That is because there are some slow points, because it uses network.

Read "Distributed Transaction Performance for Scalability & Speed" more


Created time: 2017-02-10 Last updated time: 2017-02-10

Internal Lock Types of Alinous Elastic DB

In order to keep data consistency by transaction supporting ACID, locks are essential. Mainly READ COMMITTED isolation level uses them.

Transaction Isolation Level & Lock

Most of locks are done in READ COMMITTED isolation level. , because it often fails at COMMIT phase.SERIALIZABLE level is almost for lock free and read only transactions

Explicit Locks

Explicit Locks are done by following SQL statements explicitly.

  • SELECT .. FOR UPDATE
  • SELECT .. FOR SHARE
  • LOCK TABLE

Table Lock

Table Locks are done by "LOCK TABLE" SQL statements. It locks entire table by either UPDATE or SHARE mode.

The lock remains until the transaction ends.

Read "Internal Lock Architecture of Alinous Elastic DB" more


Created time: 2017-02-09 Last updated time: 2017-02-10
1 2