/var/log/blog

主にサーバー・インフラやシステム開発に関する公開学習メモや雑な記録

NewSQL という用語の定義や言葉がいつ頃から登場したのか等を調べての雑な備忘

興味本位で TiDB を触ってみていましたが, そもそも NewSQL って何なのかわかっていませんでした。 まずは, NewSQL がいつ頃から登場し始めたものなのか気になったので調べてみました。

wikipedia をみてみます。

これによると最初の NewSQL は H-Store らしいです。2008年頃には元となる概念は出てきていそうです。

その後、451 group のブログで以下のような記事が投稿されていました。NewSQL という用語としてはこの辺りから始まったようです。

“NewSQL” is our shorthand for the various new scalable/high performance SQL database vendors. We have previously referred to these products as ‘ScalableSQL’ to differentiate them from the incumbent relational database products. Since this implies horizontal scalability, which is not necessarily a feature of all the products, we adopted the term ‘NewSQL’ in the new report.

2011/6 に Michael Stonebraker 氏による以下のような記事が投稿されています。

3) New SQL. Systems are starting to appear that preserve SQL and offer high performance and scalability, while preserving the traditional ACID notion for transactions. To distinguish these solutions from the traditional vendors, we term this class of systems “New SQL.” Such systems should be equally capable of high throughput as the NoSQL solutions, without the need for application-level consistency code. Moreover, they preserve the high-level language query capabilities of SQL. Such systems include Clustrix, NimbusDB, and VoltDB. (Disclosure: I am a founder of VoltDB.)

Hence, New SQL should be considered as an alternative to NoSQL or Old SQL for New OLTP applications. If New OLTP is as big a market as I foresee, I expect we will see many more New SQL engines employing a variety of architectures in the near future.

2016年には以下の論文があり、目を通してみました。

とりあえず言葉の定義についてみてみました。 論文を引用すると以下のようなことが書かれました。

  1. THE RISE OF NEWSQL

Our definition of NewSQL is that they are a class of modern relational DBMSs that seek to provide the same scalable performance of NoSQL for OLTP read-write workloads while still maintaining ACID guarantees for transactions. In other words, these systems want to achieve the same scalability of NoSQL DBMSs from the 2000s, but still keep the relational model (with SQL) and transaction support of the legacy DBMSs from the 1970–80s.

This enables applications to execute a large number of concurrent transactions to ingest new information and modify the state of the database using SQL (in stead of a proprietary API). If an application uses a NewSQL DBMS, then developers do not have to write logic to deal with eventually consistent updates as they would in a NoSQL system. As we discuss below, this interpretation covers a number of both academic and commercial systems.

We note that there are data warehouse DBMSs that came out in the mid-2000s that some people think meet this criteria (e.g., Vertica, Greenplum, Aster Data). These DBMSs target on-line analytical processing (OLAP) workloads and should not be considered NewSQL systems. OLAP DBMSs are focused on executing complex read-only queries (i.e., aggregations, multiway joins) that take a long time to process large data sets (e.g., seconds or even minutes). Each of these queries can be significantly different than the previous. The applications targeted by NewSQL DBMSs, on the other hand, are characterized as executing read-write transactions that (1) are short-lived (i.e., no user stalls), (2) touch a small subset of data using index lookups (i.e., no full table scans or large distributed joins), and (3) are repetitive (i.e., executing the same queries with differ ent inputs). Others have argued for a more narrow definition where a NewSQL system’s implementation has to use (1) a lock-free concurrency control scheme and (2) a shared-nothing distributed architecture [57]. All of the DBMSs that we classify as NewSQL in Section 3 indeed share these properties and thus we agree with this assessment.

要約すると、NewSQLデータベースの定義は、

  • トランザクションの ACID 特性を保証し、OLTP 読み取り/書き込みワークロードに対して NoSQL と同じスケーラブルなパフォーマンスを提供しようとするRDBMS

ということのようです。 これは、

  • 2000 年代の NoSQL DBMS と同じスケーラビリティを実現しつつ 1970~80 年代のレガシー DBMS のリレーショナルモデル(SQL を使用)とトランザクションをサポートしている

ということと同等であるようで、ここから NoSQL と RDB の良いとこ取りと言われているのではないかと思われます。

2000年代登場したDWHと同じに見えるが、DWHがオンライン分析処理(OLAP)用なのに対して、NewSQLはオンライン分析処理(OLAP)ワークロードをターゲットとしているため異なるようです。

NewSQL DBMS は、

  • 有効期間が短い(ユーザー停止が発生しない)
  • インデックスを利用して検索し、小さいデータにアクセスする
  • 反復的(異なる入力で同じクエリを使う)

を備えている必要があり、また別の人が主張するNewSQLの定義は

  • ロックフリーの同時t実行制御
  • シェアードナッシング分散アーキテクチャを使用する必要がある

といったものがあるようです。

まとめ

NewSQL がいつ頃から登場して、どういったものが NewSQL になるのか調べてみました。 概念としては少し理解が深まりました。

参考