SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
業務システム
をRDBなしで
作れるのか?
2016/02/05
14:10-15:30 @C会場
セッションオーナー紹介
《経歴》
ロータス株式会社時代
  - Iris Associates社(ボストン)へ出向
  - Lotus Notesの開発に従事。
アリエル・ネットワーク株式会社時代
  - 創業メンバーとして参加
  - 現在CTO
株式会社ワークスアプリケーションズ時代
  - エグゼクティブフェローを兼任
     ・ 製品横断のパフォーマンス改善
     ・ 開発インフラの改善、
     ・ グローバル採用
     ・ 教育等に従事
【著書】
井上 誠一郎 (INOUE Seiichiro)
アリエル・ネットワークス株式会社 CTO 兼 株式会社ワークスアプリケーションズ エグゼクティブフェロー
人工知能型ERP「HUE」開発のアーキテクチャー責任者を務め、グローバルでの開発を指揮
スピーカー紹介
株式会社ワークスアプリケーションズ所
属。現在は新製品「HUE」のテクノロジー
開発Dept.にて主にバックエンドのチーム
を率いている。
Oracle等のRDBやCassandra等のKVS
の知識、クラウドの運用からインフラ、
DevOpsの構築まで様々な業務に携わ
る。
TSUTSUMI Hayato
アプリケーション実践派
2004年より大規模分散作業システムの開発
を始め、複数な分散システムの開発を経験
し、2006年来日。
2009年-2014年、国立情報学研究所で分散
・並列プログラミング分野の学術研究に従
事。
2014年に情報学博士号を取得、同年ワーク
スアプリケーションズに入社し、 Cloud-native
基盤システム、特に並列データ処理システ
ムの設計を担当。
研究興味は並列プログラミング言語、関数
型言語、並列アルゴリズム、大規模データ処
理システム等。
Yu Liu
理論派
前提知識
データベースの指標(1)
- データモデル
- クエリ言語
- トランザクション管理
データベースの指標(2)
- ストレージモデル(e.g. row/column/それ以外)
- ネットワークモデル(e.g. 分散/非分散。マスタ-マスタ/マスタ-ス
レーブ)
トランザクション管理とは?
- 障害時回復
- 同時実行性制御
の技術
障害時回復の技法
- ログ法(e.g. rollback/rollforward, a.k.a. WAL)
- シャドーページング
同時実行性制御の技法
静的
- 依存性解析
動的
- ロックベース
- タイムスタンプベース(e.g. Optimistic Concurrency Control)
- コンバージェントベース(e.g. CRDT)
NoSQLの定義?
- RDBMSでないもの全般
- 暗黙に
- リレーショナル以外のデータモデル
- 分散データベース
- 非ACIDなトランザクション管理(e.g. BASE, Relaxing
ACID)
なぜNoSQL?
- 高可用性
- 高スループット性能
- ジオレプリケーション
ユースケース
Case1 : 給与計算
● 開始時にデータを読んできて、
結果を計算する
● データには締切があり、締切後
のデータがそもそもエラーケース
● 計算は少し遅れても良いが、エ
ラーケースには気付きたい
エラーケース:
● 計算開始後に新しいデータが
入った場合に結果が正しくない
勤怠データ
人事データ
計算式データ
給与計算
Answer1 : 給与計算 実装例
● データ読み込み時に各データの
Timestampを取得しておく
● 計算終了時に各データの
Timestampを比較
● 読み込んだデータより新しいデー
タが見つかった場合はアラートを
出す
勤怠データ
人事データ
計算式データ
給与計算
Timestamp
Timestamp
Timestamp
Check!
Case2 : 総勘定元帳
● 大量の仕訳を総勘定元帳
に転記していく
● 担当者が勘定科目毎に
チェックを随時行う
● 合計・小計行を表示する
● 反映は遅れても良いが、
表示は遅らせたくない
エラーケース:
● 一つの仕訳が途中で表示
される
Answer2 : 総勘定元帳 実装例
● 一つの総勘定元帳への書
き込みを一箇所に集約し、
書き込まれる順序を制御
する
● 一つの仕訳が正しく転記さ
れたタイミングで画面表示
用データを作成する
Answer2 : 総勘定元帳 実装例
● 一つの仕訳をAtomicな更新
差分として扱う
● 更新差分をマージして表示
● 定期的にマージコストを下げ
るためにまとめる
仕訳 A
仕訳 B
仕訳 C
・・・
Snapshot
仕訳 D
仕訳 E
・・・
Case3 : シーケンス値発行
● システムで一意の番号を採番
していく
● 発行も早い方が良いが、
重複は絶対に避けたい
エラーケース:
● システムで重複した番号が採
番される
Answer3 : シーケンス値発行 実装例
● Lightweight transactionを利
用し、条件付きのステートメン
トを発行する
● 取得に失敗した場合はリトラ
イ
● 全リージョン、全データセン
ターに大してトランザクション
を発行する
Case4 : 在庫管理
● ある品物の在庫数を管理する
● 購入操作時に在庫を確認する
● 複数のユーザーが同時にアクセス
する
● 速度も重要、ある程度ならエラーも
許容できる
エラーケース:
● 在庫が無いのに購入できてしまう
または、在庫があるのに購入でき
ない
Answer4 : 在庫管理 実装例
● ロックテーブルを実装し、ロックが
得られなければリトライ
● ロックテーブルはLightweight
Transactionで実装
Case5 : Enterprise Spreadsheets
● 一つのSpreadsheetsを複数のユーザー
が相互に編集する
● 速度が重要、同時編集によりデータが失
われた場合、履歴表示可能である
エラーケース:
● 同じセルを複数人が同時に編集する
Answer5 : Enterprise Spreadsheets
● Masterを一つ選出
● 全ての変更はTimestampと共にMaster
に送られ、順番に適用される
● Masterに適用された変更は、Slaveに通
知される
● データベースはMasterのみが更新する
Master Slave Slave

Mais conteúdo relacionado

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

エンジニアCROSS 2016 02-05 業務システムをRDBなしで作れるのか?