Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWSの15→16あるデータベースを使いこなそう
アマゾン ウェブ サービス ジャパン 株式会社シニアエバンジェリスト亀田治伸
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
データベース
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
万能のデータベースは存在しない
“A one size fits all database doesn't fit anyone”
Werner VogelsCTO - Amazon.com
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
従来のエンタープライズ DB システム
アプリ
オンライントランザクション
ETLツール
分析
BIツールOLTP DB OLAP DB
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
データベースの選択
• AWS では多様なデータベースの選択肢
• ワークロードに応じて最適な選択が可能
Purpose builtThe right tool for
the right jobhttps://www.allthingsdistributed.com/2018/06/purpose-built-databases-in-aws.html
適材適所の選択
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
データの種類に応じて適切なデータストアを選択
サーバー
ローカルストレージ
サーバー
ローカルストレージ
共有ストレージ
データベース(RDBMS)
データベース(NoSQL)
・ショッピングカート・セッション情報
・ユーザ情報・商品情報・在庫情報
・商品画像データ
複数データストアの使い分けで効率を向上
“A one size fits all database doesn't fit anyone”
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A m a z o n D y n a m o D B
キ ー
バリュー イ ン メ モ リ グ ラ フリ レ ー シ ョ ナ ル
A m a z o n R D S
A m a z o nQ L D B
元 帳時 系 列
A m a z o nT i m e s t r e a m
A m a z o n A u r o r a
A m a z o n D o c u m e n t D B
ド キ ュ メ ン ト
A m a z o nN e p t u n e
A m a z o n E l a s t i C a c h e
A m a z o n R D S f o r V M W a r e E l a s t i C a c h e
f o r R e d i s
E l a s t i C a c h e f o r M e m c a c h e d
A m a z o nR e d s h i f t
デ ー タ
ウ ェ ア ハ ウ ス 移行
AWS Database Migration Service
ワークロードに適した最適なデータベース選択
A m a z o n M a n a g e d A p a c h e C a s s a n d r a
S e r v i c e ( M C S )
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
データカテゴリ
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
データカテゴリ
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
リレーショナル
キーバリュー
ドキュメント
インメモリー
グラフ
時系列
台帳
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
AmazonDynamoDB
AmazonNeptune
Amazon RDS
Aurora CommercialCommunity
AmazonTimestream
AmazonQLDB
AmazonElastiCache
AmazonDocumentDB
AmazonMCS
マネージドサービス
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
価値を生みずらい重労働 (Undifferentiated Heavy Lifting)
冗長構成
Backup
パッチ適応
PITR(Point In Time Recovery)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
オンプレミスのサーバー 仮想サーバーデータベース
サービス
データベース構築の選択肢
AWS Cloud
Amazon EC2 Amazon RDS 等
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
AmazonMCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
AmazonMCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
リレーショナルデータベース
RDBMSRelational
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
リレーショナルデータ
• テーブル間でデータを分割
• 高度に構造化されたデータ
• キーを介して確立されたリレーションシップ(関係性)
• データの完全性と一貫性
Patient
* Patient ID
First Name
Last Name
Gender
DOB
* Doctor ID
Visit
* Visit ID
* Patient ID
* Hospital ID
Date
* Treatment ID
Medical Treatment
* Treatment ID
Procedure
How Performed
Adverse Outcome
Contraindication
Doctor
* Doctor ID
First Name
Last Name
Medical Specialty
* Hospital Affiliation
Hospital
* Hospital ID
Name
Address
Rating
リレーション
多 対 1
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Relational Database Service (Amazon RDS)
6つのデータベースエンジンから選択できるマネージリレーショナルデータベース
容易な管理 高可用性と永続性 高スケール 高速でセキュア
マネージドによる運用自動化
データレプリケーション、自動バックアップ、スナップショット、
自動フェイルオーバー
コンピュートとストレージをスケール可能
SSDストレージのI/O保証、保存時と通信時の暗号化
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora 基本アーキテクチャ
• SSDを利用したシームレスに
スケールするストレージ
• 10GBから64TBまでシームレスに自動で
スケールアップ
• 実際に使った分だけ課金
• 標準で高可用性を実現
• 3AZに6つのデータのコピーを作成
• 継続的に S3 へ増分バックアップ
• MySQL と Postgres 互換
SQL
Transactions
AZ 1 AZ 2 AZ 3
Caching
Amazon S3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ディスク障害検知と修復
• 2つのコピーに障害が起こっても、読み書きに影響は無い
• 3つのコピーに障害が発生しても読み込みは可能
• 自動検知、修復
SQL
Transaction
AZ 1 AZ 2 AZ 3
Caching
SQL
Transaction
AZ 1 AZ 2 AZ 3
Caching
読み書き可能読み込み可能
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
リードレプリカ構成
Master Replica Replica Replica
Availability Zone 1
Aurora ストレージ(共有ストレージボリューム)
プライマリインスタンス
リードレプリカリード
レプリカリード
レプリカ
Availability Zone 2 Availability Zone 3
リージョン
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless
Master Replica Replica Replica
Availability Zone 1
Aurora ストレージ(共有ストレージボリューム)
プライマリインスタンス
Availability Zone 2 Availability Zone 3
リージョン
SUMM I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non RelationalAmazon
MCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Non Relational – “ Not only SQL”
NoSQL:
RDBMSではないデータベースの総称
従来のRDBMSの課題を解決するために生まれた
NoSQLは非常に多くの種類がある
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non RelationalAmazon
MCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non RelationalAmazon
MCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Key Value Store
Key-value
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
キーバリューストア (KVS)
• キーとバリュー(値)という単純な構造
• 超高速なパフォーマンス
• RDBMSに比べ読み書きが高速
Key1 Value1
Key2 Value2
Key3 Value3
1 対 1
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
選択指針
• スケーラビリティが求められる
• レスポンスタイム 数ミリ秒 が求められる
• シンプルなクエリ
• Amazon DynamoDB• マルチリージョンマルチマスター構成• 規模に関係なく、数ミリ秒のレスポンス• 1 日に 10 兆件以上のリクエスト処理可能• 毎秒 2,000 万件を超えるリクエストをサポート
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
選択指針
• スケーラビリティが求められる
• レスポンスタイム 数ミリ秒 が求められる
• シンプルなクエリ
• Amazon MCS• 社内にCassandraのExpertが存在している• 既存システムマイグレーション
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non RelationalAmazon
MCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ドキュメントデータベース
Document
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ドキュメント指向データベース
• JSONやXML等の不定形なデータ構造に対応
• 複雑なデータモデリングを容易に表現可能
{”id": ”tttak”,“job”: “sa”,”info": {
”skill": [ “youtuber”, ”video-shoping" ],”database": ”oracle"
}}
Key1 Object1
Key2 Object2
Key3 Object3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
選択指針
• スキーマを決められないデータの格納• 後から属性情報の変更を行いたい
• JSONやXML形式のをそのまま扱いたい
• 構造を意識したドキュメント思考の検索
• Amazon DocumentDB• フルマネージドなMongoDB(3.6)互換
• 読み取り容量を数百万件/秒までスケール
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non RelationalAmazon
MCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
インメモリーデータベース
In-memory
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
インメモリーデータベース
• KVS (キーバリューストア)
• 最大限メモリで処理
• 短い応答時間が期待できる
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
選択指針
• ミリ秒未満のレイテンシー求められる
• キャッシュ可能• 障害時のデータ損失リスクを許容できる• インメモリ処理のため障害によるデータ損失の可能性がある
• Amazon ElastiCache• マイクロ秒の応答時間• フルマネージドな運用管理
E las t iCachefo r Red i s
E la s t iCache f o r Memcached
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non RelationalAmazon
MCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
グラフデータベース
Graph
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
グラフ指向データベース
• データ間を相互に結びつけてデータ同士の関係をグラフという形で表す
• 複雑な関係性を表すのを得意とする• SNSのフレンドの関連性等
多 対 多
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユースケース
SNSニュースフィード リコメンデーション 不正検出
Friends
Use
Play
Like
Check in
Like
Connect
Read
Creditcard
Product
Emailaddress
Creditcard
Knownfraud
Uses
Paid
with
Uses
Paid
with
Paid with
Purchased
Approve
purchase?
Sport
Product
Purchased
Purchased
People
who also
follow sports
purchased…
Purchased
Knows
Knows
Do you
know…
Follows
Follows
Follows
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サンプルデータ
ID Node Name Next Ptr
1 A NULL
2 B C
3 C A
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サンプルデータ その2
ID Node Name Next Ptr
1 A B
2 B C
3 C A
4 B A
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ID Node Name Next Ptr Attr Num
1 A NULL NULL NULL
2 B C Like 1
3 C A Dislike 1
4 B A Like 2
5 B A Dislike 1
サンプルデータ その3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ID Node Name Next Ptr Attr Num
1 A NULL NULL NULL
2 B C Like 1
3 C A Dislike 1
4 B A Like 2
5 B A Dislike 1
サンプルデータ その3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
選択指針
• 関連を探索するクエリ (トラバーサル)
• 短いクエリが大量に来る要件がある
• Amazon Neptune• 数十億のリレーションシップを扱える
• ミリ秒台のレイテンシー
• グラフに最適化された、専用のグラフデータベースエンジン
• SPARQLとGremlinに対応
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non RelationalAmazon
MCS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
時系列データベース
Time-series
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
時系列データ
• 時間が唯一の主軸
• 特定の間隔で記録され続ける
• 時間の経過に伴う変化を測定• リアルタイムの意思決定、警告 等
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
選択指針
• 時系列データを扱うか• 大量、粒度が小さい、すぐに分析したい• 多数のソース (IoTデバイスなど) からの頻繁に送信されるか• 一定の時間間隔で分析を実行したいか
• Amazon Timestream (Public Preview)• RDB の 1/10 のコストで 1,000 倍のパフォーマンス• 一日あたり数兆規模のイベントに対応• 挿入とクエリを異なる処理階層で実行し、競合を解消
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS のデータベースサービス
Relational
Referential integrity, ACID transactions,
schema-on-write
Lift and shift, ERP, CRM, finance
Key-value
High throughput, low-
latency readsand writes, endless
scale
Real-time bidding, shopping cart, social,
product catalog, customer preferences
Document
Store documents and quickly
access querying on any attribute
Content management,
personalization, mobile
In-memory
Query by key with
microsecond latency
Leaderboards, real-time analytics,
caching
Graph
Quickly and easily create and
navigate relationships
betweendata
Fraud detection, social networking, recommendation
engine
Time-series
Collect, store, and process data
sequenced by time
IoT applications, event tracking
Ledger
Complete, immutable, and
verifiable history of all changes to
application data
Systems of record, supply
chain, health care, registrations,
financial
DynamoDB NeptuneAmazon RDS
Aurora CommercialCommunity
Timestream QLDBElastiCacheDocumentDB
Non Relational
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
台帳データベース
Ledger
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Basics of Block Chain
ビザンチン耐性
イミュータブルトランザクション
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
通常のオンラインバンキング
1:N取引であり銀行がTrustAnchor
TrustAnchorへの攻撃が成功すればハッキング可能
高いセキュリティが必要
メンテナンス、障害によるダウンタイムが発生
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
BlockChain の P2Pネットワーク
攻撃者は複数のノードを一度に攻撃しデータを書き換える必要がある
→不可能。高セキュリティ
DNSやCDN(のEdge)と同じように、すべてのノードが一度に停止することはない
→ゼロダウンタイムの実現
ビザンチン耐性
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Block [Chain]
x x
x x
x x
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
台帳データベース
• データの変更履歴はイミュータブル(変更や削除が不可能)
• 意図しない変更が発生していないことを暗号技術で検証
C | H
J
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
選択指針
• 履歴の追跡と変更管理• 完全で検証可能な変更履歴を長期間維持したい
• 管理者でも変更履歴を改ざんできないことを保証したい
• Amazon Quantum Ledger Database• スケーラブルで完全
• 検証可能なトランザクション
• データの変更全てを追跡可能
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
データ構造
ID Manufacturer Model Year VIN Owner
1 Tesla Model S 2012 123456789 Robert Dennison
History
Current
INSERT… UPDATE… DELETE… UPDATE… UPDATE… UPDATE…
SEQUENCE NUMBER: 789
SEQUENCE NUMBER: 790
SEQUENCE NUMBER: 791
SEQUENCE NUMBER: 793
SEQUENCE NUMBER: 792
SEQUENCE NUMBER: --
Journal
元帳
データ Amazon Quantum
Ledger Database
ID Version Start Manufacturer Model Year VIN Owner
1 0 7/16/2012 Tesla Model S 2012 123456789 Traci Russell
1 1 8/03/2013 Tesla Model S 2012 123456789 Ronnie Nash
1 2 9/02/2016 Tesla Model S 2012 123456789 Robert Dennison
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1Tracy buys a car on Aug 3, 2013
Journal CurrentDMV Scenario
History
Immutability
ID Version Manufacturer Model Year VIN Owner Date of Purchase
1 0 Tesla Model S 2012 123456789 Traci Russell
8/3/2013
ID Version Manufacturer Model Year VIN Owner Date of Purchase
1 0 Tesla Model S 2012 123456789 Traci Russell
9/10/2014
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1Tracy buys a car on Aug 3, 2013
2
Tracy sells car to Ronnie on Sept 10, 2014
Journal CurrentDMV Scenario
Immutability
ID Version Manufacturer Model Year VIN Owner Date of Purchase
1 0 Tesla Model S 2012 123456789 Traci Russell
8/3/2013
1 1 Tesla Model S 2012 123456789 Ronnie Nash
9/10/2014
ID Version Manufacturer Model Year VIN Owner Date of Purchase
1 1 Tesla Model S 2012 123456789 Ronnie Nash
9/10/2014
History
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1Tracy buys a car on Aug 3, 2013
2
Tracy sells car to Ronnie on Sept 10, 2014
Journal CurrentDMV Scenario
3Ronnie’s car gets in an accident and gets totaled
ID Version Manufacturer Model Year VIN Owner Date of Purchase
ID Version Manufacturer Model Year VIN Owner Date of Purchase
1 0 Tesla Model S 2012 123456789 Traci Russell
8/3/2013
1 1 Tesla Model S 2012 123456789 Ronnie Nash
9/10/2014
1 2 Deleted
Immutability
History
DELETE
DATE: 09/02/2016
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
数学的なデータ結合性
Journ
al INSERT cars
ID:1Manufacturer: TeslaModel: Model SYear: 2012VIN: 123456789Owner: Traci Russell
Metadata: {Date:08/03/2013 }
H (T1)UPDATE carsID:1Owner: Ronnie Nash
Metadata: {Date:09/10/2014 }
H(T2)DELETE cars ID:1
Metadata: {Date: 09/02/2016
}
H(T3)
H(T1) H(T1) + Update= H(T2)
H(T2) + Update= H(T3)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Thank you !