platform by salesforce.com and their development process

52
セセセセセセセセ セセセセセセ セセセセセセセセ ( セセセセセセセセセ ) 株株株株株株株株株株株株 株株株株株 株株 株株

Upload: mitsuhiro-okamoto

Post on 18-Nov-2014

3.060 views

Category:

Technology


2 download

DESCRIPTION

2009年8月7日 クラウド研究会での発表資料(一部削除)

TRANSCRIPT

Page 1: Platform by Salesforce.com and their development process

セールスフォース・ドットコムのプラットフォーム ( とその開発プロセス )

株式会社セールスフォース・ドットコム岡本 充洋

Page 2: Platform by Salesforce.com and their development process

Salesforce のプラットフォームについて

Overview

Page 3: Platform by Salesforce.com and their development process

CRM を中心としたビジネスアプリケション群

開発プラットフォーム、コアフレームワーク

インフラストラクチャ

Overview : Force.com のスタック

Page 4: Platform by Salesforce.com and their development process

マルチテナントカーネル

信頼性信頼性

自由自在にカスタマイズ

きめ細かいセキュリティ、共有ルール

クラウドロジックのプログラミング

ワークフロー、承認 プログラム制御可能な UI

モバイル端末への展開 Web サイト コンテンツ

ライブラリ 分析機能750 以上の連携済みアプリケーション

クエリの最適化高い信頼性

アップグレードISO 27001 認定 柔軟な拡張性

システムの稼働状況の公開

3 ヶ所のグローバルデータセンター、障害復旧インテグレーション Sandbox 環境

Salesforce to Salesforce

1 1 日 日 1 1 億件超の億件超のAPI API コールを処理コールを処理

99.9%99.9% のの稼働率稼働率

300ms300ms 以下以下のレスポンのレスポンスス

Overview : Force.com のスタック

Page 5: Platform by Salesforce.com and their development process

運用データセンター、アーカイブ用データセンター

運用データセン ター ( バックアッ

プ )

運用データセンター( メイン )

ラボラトリ用データセンター( 運用レベルの開発 ) 、アーカイブ用データセンター

セールスフォース・ドットコムのデータセンター所在地

お客様はイノベーションに注力インフラは当社が管理

複数の拠点に分散、ミラーリングされたデータセンター

ほぼリアルタイムで実行されるデータ複製

シームレスな障害復旧

パスダイバシティを利用した専用のネットワークバックボーン

単一障害点を回避

特定の通信業者に依存しないネットワーク戦略

Overview : データセンターの所在地

Page 6: Platform by Salesforce.com and their development process

Overview : Force.com Podアーキテクチャ

検索

データベースクラスタ

サーバ

マルチテナントクラスタ

APIAPP

スケーラブル “ Pod” アーキテクチャ

Pod アーキテクチャマルチテナントクラスタを一定ノード毎に分けて管理コードベースは単一Podの追加によって事実上無制限にスケールアップ

NA4NA1 NA2 NA3 NA5 NA6 EMEA AP0 “N”Pod

Page 7: Platform by Salesforce.com and their development process

Overview : データリカバリーストラテジー

データセンタ内リアルタイムレプリケーション データセンタ間もほぼリアルタイムに

レプリケーション Disk-To-Disk-To-Tape 戦略

– レプリケートディスクにバックアップ

– 基本的にはディスクのバックアップで事足りる

– テープドライブへの保存にも対応

– テープは弊社設備から持つ出され事は無い ディザスタリカバリストラテジ : フェイルオーバー用の

バックアップデータセンタ設備を Northern Virginiaに施設

Production Data Center

Data replication between data centers

Main Disk

Shadow Disk

Main Disk

Shadow Disk

Lab and Tape ArchiveMain Disk

Shadow Disk

Dedicated OC-48 Backbone

Tape Archive

San Jose

San Francisco

Backup Data CenterMain Disk

Shadow Disk

Main Disk

Shadow Disk

Northern Virginia高い冗長性、パフォーマンス

Page 8: Platform by Salesforce.com and their development process

アプリケーション• 全てのパスワードは暗号化• よりセキュアなセッションキー管理• マルチテナントデータアクセスコントロール• アプリケーション自身のセキュリティ違反モニタリン

ファイヤーウォール• 強固なファイアーウォール群• 侵入検知• プロアクティブなログ監視

インターネット•全てのトランザクションが 128-bit SSLで暗号化 • Verisignによる Certificates

物理的• 完全にセキュアなデータセンタ• 24x7のオンサイトセキュリティガード• バイオメトリクス認証• 物理アクセスは常に監視される

企業• セールスフォース社員はエン

ドユーザーのパスワードやデータを見ることは出来ない

ユーザー• パスワードポリシー• アクセスコントロール• ログイン履歴の追跡• 優れたデータの共有モデル• フィールドレベルのセキュリティ

ネットワーク / ホスト•最小の IPをルーティンング •強固なオペレーティングシステム•セキュアサービス

Overview : Security

Page 9: Platform by Salesforce.com and their development process

Force.com の動作原理

Page 10: Platform by Salesforce.com and their development process

Force.com の動作原理

共有データベース

アプリケーション描画

共有マルチテナント

カーネル

Page 11: Platform by Salesforce.com and their development process

すべてのカスタマイズはデータベースに保存

共有データ

カスタマイズ

ピボットデータ

Page 12: Platform by Salesforce.com and their development process

全ての企業のデータは共有データベースへ

The Telegraph’s Advertisers

BT’s Accounts

Dell’s Products

Page 13: Platform by Salesforce.com and their development process

共有データベース

Page 14: Platform by Salesforce.com and their development process

Index はどうする?

ID Data 1 Data 2

10002 unus erat toto

naturae

10003 vultus in orbe

10004

quem dixere chaeos

10005 rudis indigestaq

ue

10006 meis perpetuum

10007 deducite temopra

10008 carmen ante

10009 mare et terras

10010 tegit et quod

10011 omnia caelum

10012 unus erat toto

naturae

10013 vultus in orbe

10014

quem dixere chaeos

10015 rudis indigestaq

ue

10016 meis perpetuum

10017 deducite temopra

10018 carmen ante

10019 mare et terras

10020 tegit et quod

10021 omnia caelum

10022 unus erat toto

naturae

Multi-Tenant IndexMulti-Tenant Table

Optimization

Page 15: Platform by Salesforce.com and their development process

Question

Michael Dell が英国でどれぐらいサーバが売れているのかを知りたい場

どのようにしてこの要求を処理するか ?

Page 16: Platform by Salesforce.com and their development process

SharedVisibility

SharedIndexes

ID Data 1 Data 2

10002 unus erat toto naturae

10003 vultus in orbe

10004 quem dixere chaeos

10005 rudis indigestaque

10006 meis perpetuum

10007 deducite temopra

10008 carmen ante

10009 mare et terras

10010 tegit et quod

10011 omnia caelum

10012 unus erat toto naturae

10013 vultus in orbe

10014 quem dixere chaeos

10015 rudis indigestaque

10016 meis perpetuum

10017 deducite temopra

10018 carmen ante

10019 mare et terras

10020 tegit et quod

10021 omnia caelum

10022 unus erat toto naturae

10023 vultus in orbe

10024 quem dixere chaeos

10025 rudis indigestaque

10026 meis perpetuum

10027 deducite temopra

10028 carmen ante

10029 mare et terras

10030 tegit et quod

10031 omnia caelum

10032 unus erat toto naturae

10033 vultus in orbe

ID Data 1 Data 2

10002 unus erat toto naturae

10003 vultus in orbe

10004 quem dixere chaeos

10005 rudis indigestaque

10006 meis perpetuum

10007 deducite temopra

10008 carmen ante

10009 mare et terras

10010 tegit et quod

10011 omnia caelum

10012 unus erat toto naturae

10013 vultus in orbe

10014 quem dixere chaeos

10015 rudis indigestaque

10016 meis perpetuum

10017 deducite temopra

10018 carmen ante

10019 mare et terras

10020 tegit et quod

10021 omnia caelum

10022 unus erat toto naturae

10023 vultus in orbe

10024 quem dixere chaeos

10025 rudis indigestaque

10026 meis perpetuum

10027 deducite temopra

10028 carmen ante

10029 mare et terras

10030 tegit et quod

10031 omnia caelum

10032 unus erat toto naturae

10033 vultus in orbe

Run pre-queriesユーザーのアクセス権

抽出条件の確認

pre-queries の結果に基づいてクエリを発行

実クエリの実行

Stop

GoMulti-tenant Optimizer

Multi-Tenant Query Optimizer

Multi-tenant optimization

Page 17: Platform by Salesforce.com and their development process

Visibility

Indexes

ID Data 1 Data 2

10002 unus erat toto naturae

10003 vultus in orbe

10004 quem dixere chaeos

10005 rudis indigestaque

10006 meis perpetuum

10007 deducite temopra

10008 carmen ante

10009 mare et terras

10010 tegit et quod

10011 omnia caelum

10012 unus erat

10013 vultus in orbe

10014 quem dixere chaeos

10015 rudis indigestaque

10016 meis perpetuum

10017 deducite temopra

10018 carmen ante

10019 mare et terras

10020 tegit et quod

10021 omnia caelum

10022 unus erat toto naturae

10023 vultus in orbe

10024 quem dixere chaeos

10025 rudis indigestaque

10026 meis perpetuum

10027 deducite temopra

10028 carmen ante

10029 mare et terras

10030 tegit et quod

10031 omnia caelum

10032 unus erat toto naturae

10033 vultus in orbe

ID Data 1 Data 2

10002 unus erat toto naturae

10003 vultus in orbe

10004 quem dixere chaeos

10005 rudis indigestaque

10006 meis perpetuum

10007 deducite temopra

10008 carmen ante

10009 mare et terras

10010 tegit et quod

10011 omnia caelum

10012 unus erat toto naturae

10013 vultus in orbe

10014 quem dixere chaeos

10015 rudis indigestaque

10016 meis perpetuum

10017 deducite temopra

10018 carmen ante

10019 mare et terras

10020 tegit et quod

10021 omnia caelum

10022 unus erat toto naturae

10023 vultus in orbe

10024 quem dixere chaeos

10025 rudis indigestaque

10026 meis perpetuum

10027 deducite temopra

10028 carmen ante

10029 mare et terras

10030 tegit et quod

10031 omnia caelum

10032 unus erat toto naturae

10033 vultus in orbe

Multi-tenant Query Optimizer

Millions of Sales

Line Items

The fastest path to the answer

M. Dell

Servers

England

Page 18: Platform by Salesforce.com and their development process

Force.com のデータモデル

Page 19: Platform by Salesforce.com and their development process

メタデータ , 実データ , ピボットテーブルを格納する仮想データ構造

Page 20: Platform by Salesforce.com and their development process

Objectsテーブルはカスタムオブジェクトのメタデータを格納

Page 21: Platform by Salesforce.com and their development process

Fieldsテーブルはカスタムフィールドのメタデータを格納

Page 22: Platform by Salesforce.com and their development process

Dataヒープテーブルはカスタムオブジェクト内の全ての構造化データを格納する

Page 23: Platform by Salesforce.com and their development process

単一のテーブルに様々なタイプのデータを格納し、組織毎に別個のオブジェクトを管理

Page 24: Platform by Salesforce.com and their development process

Indexesピボットテーブルは組織毎のインデックスを管理

Page 25: Platform by Salesforce.com and their development process

UniqueFields ピボットテーブルはカスタムフィールドのユニーク性を担保

Page 26: Platform by Salesforce.com and their development process

Relationshipsピボットテーブルは参照関係の定義と joinの最適化を行う

Page 27: Platform by Salesforce.com and their development process

Force.comのコアフレームワーク

Page 28: Platform by Salesforce.com and their development process

コアフレームワーク

強力な Force.comに備え付けのフレームワーク– Builder機能 ( マウスクリックによる画面作成 )– バルクプロセス

– ゴミ箱

– フルテキストサーチ

– バルク DML– Webサービス API– 等

Page 29: Platform by Salesforce.com and their development process

Force.comBuilderコーディングレスの宣言的開発を提供

Page 30: Platform by Salesforce.com and their development process

バリデーションルールとシンプルな数式ビジネスユーザーが“ code”を書ける

Page 31: Platform by Salesforce.com and their development process

簡単すぎず強力 : オブジェクトをまたがる集計によってフィールド合計値の算出も可能

Page 32: Platform by Salesforce.com and their development process

バルクプロセスオプティマイザはデータロードのオーバヘッドを軽減

Page 33: Platform by Salesforce.com and their development process

データ定義処理はパフォーマンス低下や並列性を下げない様に最適化処理を行う

例えば :– DMLの前に主キーによる全レコードのソートを行う

– 順番にデータを処理

– フィールドのデータタイプ変更でスロット再配分

– 新しいロールアップサマリフィールドの遅延計算処理

– 大規模変更のバックグラウンド処理

Page 34: Platform by Salesforce.com and their development process

ゴミ箱 : 誤って消した物を戻す

Restore

個々のオブジェクトインスタンス 関連オブジェクトのインスタンス ( 親 / 子レコード )

全てのフィールドとオブジェクト( 削除したカラムやテーブル )

Page 35: Platform by Salesforce.com and their development process

Force.com フルテキスト検索エンジン

非同期に全てのテキストフィールドのインデクシングを行う

MRUキャッシュは直近のアップロードしたオブジェクトを含む

現在のユーザーの編集履歴や設定情報から検索結果にランク付けを行う

Page 36: Platform by Salesforce.com and their development process

クエリの最適化

クエリ最適化エンジン

Web クライアント

API コール複数ディメンションにまたがる場合も高い処理能力を発揮•企業•役職•メタデータ•セキュリティ

•共有ルール

•検索機能

300 ミリ秒以下のレスポンスタイム

高速データアクセス大規模データにも対応

Page 37: Platform by Salesforce.com and their development process

クエリオプティマイザは内部データ間をまたがるデータの最適化を行う

Multi-tenant optimizer statistics

Page 38: Platform by Salesforce.com and their development process

オプティマイザはデータの実際のクエリを実行する前に組織の統計値によってロジッックを選択

Pre-Query Selectivity

Measurements

… use of index related to filter.HighHigh

… ordered hash join; drive using Data table.LowHigh

… use of index related to filter.HighLow

… nested loops join; drive using view of rows that the user can see.LowLow

Write final database access query, forcing …FilterUser

Page 39: Platform by Salesforce.com and their development process

Apex : Force.com上のプログラミング言語

Page 40: Platform by Salesforce.com and their development process

Apexの実行原理

Page 41: Platform by Salesforce.com and their development process

Apexはプラットフォームと深く統合

バルク DML Emailとメッセージング 非同期処理 (Futures) XmlStream / HTTP (RESTful)サービスクラス 新規 Webサービスの宣言的な作成

Page 42: Platform by Salesforce.com and their development process

Salesforce の開発についてオマケ

Page 43: Platform by Salesforce.com and their development process

ADM とは ?

ADM は Salesforce 内で利用されている Scrum/XP スタイルのプロダクト開発スタイル。 Scrum のプロジェクト管理手法に XP のプラクティスを追加したもの。

Page 44: Platform by Salesforce.com and their development process

Scrum Lifecycle

Daily Scrum Meeting

Sprint Review: Demo Potentially Releasable New Functionality

Product Backlog

Sprint Backlog

Retrospective

24 Hours

2 - 4 Weeks

Page 45: Platform by Salesforce.com and their development process

Autobuild Page

Page 46: Platform by Salesforce.com and their development process

Scrumforce : Easy way to manage your Agile Teams

Page 47: Platform by Salesforce.com and their development process

All-in-one view of your Scrum Team and Sprints

Page 48: Platform by Salesforce.com and their development process

Salesforce は継続的にアップグレード = Agile

29 Major ReleasesEvery Customization & Integration Automatically UpgradedAlways have the Latest Innovations & Technology

Painless, No Hassle Upgrades

Page 49: Platform by Salesforce.com and their development process

マルチテナントカーネル

信頼性信頼性

自由自在にカスタマイズ

きめ細かいセキュリティ、共有ルール

クラウドロジックのプログラミング

ワークフロー、承認 プログラム制御可能な UI

モバイル端末への展開 Web サイト コンテンツ

ライブラリ 分析機能750 以上の連携済みアプリケーション

クエリの最適化高い信頼性

アップグレードISO 27001 認定 柔軟な拡張性

システムの稼働状況の公開

3 ヶ所のグローバルデータセンター、障害復旧インテグレーション Sandbox 環境

Salesforce to Salesforce

1 1 日 日 1 1 億件超の億件超のAPI API コールを処理コールを処理

99.9%99.9% のの稼働率稼働率

300ms300ms 以下以下のレスポンのレスポンスス

Force.com のスタック

Page 50: Platform by Salesforce.com and their development process

マルチテナントカーネル

信頼性信頼性

自由自在にカスタマイズ

きめ細かいセキュリティ、共有ルール

クラウドロジックのプログラミング

ワークフロー、承認 プログラム制御可能な UI

モバイル端末への展開 Web サイト コンテンツ

ライブラリ 分析機能750 以上の連携済みアプリケーション

クエリの最適化高い信頼性

アップグレードISO 27001 認定 柔軟な拡張性

システムの稼働状況の公開

3 ヶ所のグローバルデータセンター、障害復旧インテグレーション Sandbox 環境

Salesforce to Salesforce

1 1 日 日 1 1 億件超の億件超のAPI API コールを処理コールを処理

99.9%99.9% のの稼働率稼働率

300ms300ms 以下以下のレスポンのレスポンスス

ただの Platform では様々な部分にコストがかかる

Page 51: Platform by Salesforce.com and their development process

マルチテナントカーネル

信頼性信頼性

自由自在にカスタマイズ

きめ細かいセキュリティ、共有ルール

クラウドロジックのプログラミング

ワークフロー、承認 プログラム制御可能な UI

モバイル端末への展開 Web サイト コンテンツ

ライブラリ 分析機能750 以上の連携済みアプリケーション

クエリの最適化高い信頼性

アップグレードISO 27001 認定 柔軟な拡張性

システムの稼働状況の公開

3 ヶ所のグローバルデータセンター、障害復旧インテグレーション Sandbox 環境

Salesforce to Salesforce

1 1 日 日 1 1 億件超の億件超のAPI API コールを処理コールを処理

99.9%99.9% のの稼働率稼働率

300ms300ms 以下以下のレスポンのレスポンスス

生産性のコアは強力なフレームワーク群

Page 52: Platform by Salesforce.com and their development process