Download - MySQL de NoSQL Fukuoka
![Page 1: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/1.jpg)
MySQLでNoSQL かじやま りゅうすけ @RKajiyama
![Page 2: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/2.jpg)
2種類のmemcached連携
InnoDB Storage Engine
MySQL Server
Memcached plugin
Application SQL
(MySQL Protocol)
NoSQL (Memcached Protocol)
mysqld
NDBCluster Storage Engine
MySQL Server
Application SQL
(MySQL Protocol)
NoSQL (Memcached Protocol)
mysqld
Data Nodes
NDB API
Memcached Driver for NDB
memcached
![Page 3: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/3.jpg)
MySQL Server 5.6の場合
InnoDB Storage Engine
MySQL Server
Memcached plugin
Application SQL
(MySQL Protocol)
NoSQL (Memcached Protocol)
mysqld
• MySQLサーバにプラグインとしてmemcachedインターフェースを追加
• アプリからの接続先= MySQLサーバ
• データ格納先 =InnoDBテーブル
• トランザクション利用可能
![Page 4: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/4.jpg)
MySQL Cluster • シェアードナッシング型Ac;ve-‐Ac;veデータベースクラスタ • トランザクション対応キーバリューデータストア
Data Nodes
Node Group 1
F1
F3
F3
F1
Nod
e 1
Nod
e 2
Node Group 2
F2
F4
F4
F2
Nod
e 3
Nod
e 4
Applica;on Nodes
Cluster Mgmt
Cluster Mgmt
REST JPA
![Page 5: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/5.jpg)
MySQL Cluster 7.2の場合
NDBCluster Storage Engine
MySQL Server
Application SQL
(MySQL Protocol)
NoSQL (Memcached Protocol)
mysqld
Data Nodes
NDB API
Memcached Driver for NDB
memcached
• memcachedにNDB API用 ドライバを追加
• アプリからの接続先= memcached
• データ格納先 =データノード上のndbclusterテーブル
• トランザクション利用可能
• レプリケーション利用可能
![Page 6: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/6.jpg)
Cluster & Memcached – Schema-Free
<town:maidenhead,SL6>
key value
<town:maidenhead,SL6>
key value
Key Value
town:maidenhead SL6
generic table
Application view
SQL view
![Page 7: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/7.jpg)
Cluster & Memcached – Defined Schema
<town:maidenhead,SL6>
prefix key value
<town:maidenhead,SL6>
key value
Prefix Table Key-‐col Val-‐col policy
town: map_zip town code cluster
Config tables
town ... code ...
maidenhead ... SL6 ...
map_zip
Application view
SQL view
hWp://clusterdb.com/u/memcached
![Page 8: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/8.jpg)
SQL and NoSQL
InnoDB Storage Engine
MySQL Server
Memcached plugin
Application SQL
(MySQL Protocol)
NoSQL (Memcached Protocol)
mysqld
NDBCluster Storage Engine
MySQL Server
Application SQL
(MySQL Protocol)
NoSQL (Memcached Protocol)
mysqld
Data Nodes
NDB API
Memcached Driver for NDB
memcached
![Page 9: MySQL de NoSQL Fukuoka](https://reader038.vdocuments.pub/reader038/viewer/2022100523/554bd382b4c9058f6c8b4e3e/html5/thumbnails/9.jpg)
dev.mysql.com