heroku inside
DESCRIPTION
TRANSCRIPT
![Page 1: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/1.jpg)
Heroku Inside
![Page 2: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/2.jpg)
Heroku Outside
![Page 3: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/3.jpg)
Dining
![Page 4: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/4.jpg)
Living room
![Page 5: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/5.jpg)
Bar
![Page 6: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/6.jpg)
Basement
![Page 7: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/7.jpg)
Heroku Inside
Ayumu Aizawa Heroku Inc.,
Developer Marketing Advocate
![Page 8: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/8.jpg)
Safe harbor: Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and
assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results
of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking
statements we make. All statements other than statements of historical fact could be deemed forward-
looking, including any projections of product or service availability, subscriber growth, earnings, revenues,
or other financial items and any statements regarding strategies or plans of management for future
operations, statements of belief, any statements concerning new, planned, or upgraded services or
technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with
developing and delivering new functionality for our service, new products and services, our new business
model, our past operating losses, possible fluctuations in our operating results and rate of growth,
interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual
property and other litigation, risks associated with possible mergers and acquisitions, the immature market
in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our
employees and manage our growth, new releases of our service and successful customer deployment, our
limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise
customers. Further information on potential factors that could affect the financial results of salesforce.com,
inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended April 30, 2011.
This documents and others containing important disclosures are available on the SEC Filings section of the
Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public
statements are not currently available and may not be delivered on time or at all. Customers who purchase
our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking
statements.
![Page 9: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/9.jpg)
自己紹介
Ayumu Aizawa
Heroku Evangelist @ Salesforce.com
Developer Marketing Advocate @ Heroku
twitter: @ayumin
Fb: www.facebook.com/ayumu.aizawa
![Page 10: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/10.jpg)
Heroku
![Page 11: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/11.jpg)
What is Heroku?
Why Heroku?
Who are using Heroku?
How to use Heroku?
When should I try Heroku?
Where are resources of Heroku?
![Page 12: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/12.jpg)
What is Heroku?
• Herokuは、Ruby、Java、Python、Scala、Node.js、Clojure など、複数のプログラミング
言語・フレームワークに対応した、クラウドアプリケ
ーションの開発を支援する PaaS(Platform-as-a-Service)です。
![Page 13: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/13.jpg)
What is Heroku
Agile Polyglot Tool
2-4w
24h
![Page 14: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/14.jpg)
Why Heroku?
• Herokuは、優れた開発者の生産性を
最大化するプラットフォーム。
サーバーの存在を意識しなくてよい
スケーラビリティについて考慮しなくてよい
プロセス単位で可視化できる
信頼性・可用性の高いアーキテクチャ
アドオンシステムによる機能拡張
![Page 15: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/15.jpg)
The 12 Factor App
• Codebase • Dependencies • Config • Backing Services • Build, release, run • Processes
• Port binding • Concurrency • Disposability • Dev/prod parity • Logs • Admin processes
Herokuは良いWebサービスをつくるための 方法論をカバーしている。
http://www.12factor.net
![Page 16: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/16.jpg)
Sample App (sinatra) $ ls
Gemfile Procfile app.rb config.ru
$ cat Gemfile
source ‘http://rubygems.org’
gem ‘sinatra’
gem ‘thin’
$ cat config.ru
require ‘./app.rb’
run Sinatra::Application
$ cat app.rb
require ‘sinatra’
get ‘/’ do
“hello world”
end
$ cat Procfile
web: bundle exec thin –p $PORT –e $RACK_ENV start
![Page 17: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/17.jpg)
Deploy to Heroku $ git init
Initialized empty Git repository in /path/to/app/.git/
$ git add –A
$ git commit –m ‘initial commit’
[master (root-commit) 5cf507d] initial commit
4 files changed, 14 insertions(+), 0 deletions(-)
create mode 100644 Gemfile
create mode 100644 Procfile
create mode 100644 app.rb
create mode 100644 config.ru
$ heroku apps:create –s cedar
http://growing-summer-1456.herokuapp.com/ | [email protected] …
Git remote heroku added
$ git push herokumaster
![Page 18: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/18.jpg)
How to use Heroku?
• Herokuクライアントツールをインストール
Heroku Toolbelt
https://toolbelt.heroku.com/
![Page 19: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/19.jpg)
Who are using Heroku?
• コンシューマー向けWebアプリケーション
• ソーシャル・メディア連携サービス
• 動画配信サービス
• スマートフォンゲームのサーバーサイド
![Page 20: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/20.jpg)
When should I try Heroku?
Now! http://www.heroku.com
![Page 21: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/21.jpg)
Where are resources of Heroku?
• 導入事例 sucsess.heroku.com
• プランと価格 heroku.com/pricing
• 技術資料、サポート devcenter.heroku.com
• ニュース news.heroku.com
• オフィシャルブログ blog.heroku.com
• ユーザーコミュニティ www.facebook.com/herokujp
• 困ったときは [email protected]
![Page 22: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/22.jpg)
Heroku Inside
![Page 23: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/23.jpg)
Architecture Overview
Developer
Control Surface APIs
Dyno Manifold
User
Logprex
Elastic Load barancer
![Page 24: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/24.jpg)
Architecture Overview
Dyno
• Herokuアーキテクチャを理解するために、 最も重要な要素のひとつ
![Page 25: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/25.jpg)
Dyno
![Page 26: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/26.jpg)
What is Dyno?
Dyno Features
How’s Dyno created
![Page 27: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/27.jpg)
What is Dyno
通常のサーバーにおけるプロセスとほぼ同じ。
いろいろな役割(Process Type)のDynoがある。
Web Process
Batch Process
Background Process
![Page 28: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/28.jpg)
• ひとつひとつのDynoには完全な実行環境が含まれる。
What is Dyno
• アプリケーション本体 • メモリ • 設定(環境変数など) • 依存ライブラリ • アプリケーション実行環境 (アプリケーション・コンテナなど)
![Page 29: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/29.jpg)
Dyno Features
• Elasticity 柔軟な拡張・縮退が可能
• Intelligent Routing インテリジェントな経路選択
• Process Management プロセス管理
• Distribution & Redundancy 分散処理と冗長化
![Page 30: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/30.jpg)
Elasticity
heroku ps:scale web=5
• プロセス単位での拡張、縮退制御が可能
![Page 31: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/31.jpg)
Elasticity
heroku ps:scale web=1
• プロセス単位での拡張、縮退制御が可能
![Page 32: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/32.jpg)
Intelligent Routing
• Routing Mesh による適切な経路選択
![Page 33: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/33.jpg)
Process management
• 不安定になったDynoは自動的に再起動される
![Page 34: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/34.jpg)
Process management
• 不安定になったDynoは自動的に再起動される
![Page 35: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/35.jpg)
Distribution & Redundancy
• それぞれのDynoはAWS上に分散配置され、 完全に独立したリソースを使用している。
![Page 36: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/36.jpg)
How’s Dyno created
![Page 37: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/37.jpg)
Procfile
• Dyno = アプリケーションの実行プロセス
• アプリケーションをリリースした際に、 Procfileの定義に基づいて生成される
web: bundle exec rails server -p $PORT -e $RACK_ENV worker: bundle exec rake job:work
worker web
![Page 38: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/38.jpg)
Dyno scaling
Process Type毎に独立して拡張可能。
worker web clock
![Page 39: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/39.jpg)
Slug
• Slug = Dynoの元になるオブジェクト
• アプリケーションコードをpushした際に 各アプリケーションごとに生成される
![Page 40: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/40.jpg)
Slug compiler
• pushされたコードからSlugを生成する。
• 言語・フレームワーク独特のファイル有無によって 実行環境を判断。
-buildpackオプションにより明示的に指定することも可能。
![Page 41: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/41.jpg)
Conclusion
![Page 42: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/42.jpg)
Conclusion
• Herokuはアプリケーション開発者の 生産性を高めることにフォーカスしたPaaS。
• アプリケーションの全ての動作環境を含むDyno単位でプロセス制御が可能。
• デプロイされたコードはSlugオブジェクトに
変換され、アプリケーションごとに永続化される。
![Page 43: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/43.jpg)
When should I try Heroku?
Now! http://www.heroku.com
![Page 44: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/44.jpg)
Where are resources of Heroku?
• 導入事例 sucsess.heroku.com
• プランと価格 heroku.com/pricing
• 技術資料、サポート devcenter.heroku.com
• ニュース news.heroku.com
• オフィシャルブログ blog.heroku.com
• ユーザーコミュニティ www.facebook.com/herokujp
• 困ったときは [email protected]
![Page 45: Heroku Inside](https://reader034.vdocument.in/reader034/viewer/2022050720/54b6b9e74a795916748b4596/html5/thumbnails/45.jpg)
Thank you! http://www.heroku.com