❖ What is Heroku
❖ 12 Factor Apps
❖ Working With Heroku
❖ Heroku + Java
Contents:
Slide 7
Slide 7 text
What Is
Heroku
Slide 8
Slide 8 text
Heroku is a Cloud!
Slide 9
Slide 9 text
Heroku is a PaaS:
“Platform as a service (PaaS) is a category of cloud computing services
that provide a computing platform and a solution stack as a service [...]
The consumer controls software deployment and configuration settings.
The provider provides the networks, servers, storage and other services."
!
- https://en.wikipedia.org/wiki/Platform_as_a_service
Slide 10
Slide 10 text
WE RUN
FOR YOU
~YOUR CODE~
Slide 11
Slide 11 text
History:
❖ Founded June 2007, supporting Rack-compatible
projects
❖ December 2010: acquired by Salesforce.com
❖ July 2011: Yukihiro "Matz" Matsumoto joined as
Chief Architect, Ruby
❖ May 2011: Cedar stack announced
❖ <3 August 2011: Java support <3
Slide 12
Slide 12 text
Supporting:
❖ Ruby
❖ Python
❖ ->Java<-
❖ Node.js
❖ Clojoure
❖ PHP
…and basically
anything with
3rd Party
Buildpacks
Slide 13
Slide 13 text
HOW
Slide 14
Slide 14 text
This:
Slide 15
Slide 15 text
This:
Apps
Slide 16
Slide 16 text
Apps:
❖ application, not infrastructure
❖ dynamic and distributed runtime
❖ utilizes process-based execution model
❖ strict separation of apps and their
dependencies
❖ embodiment of 12 Factor methodology
Slide 17
Slide 17 text
RECAP: What is Heroku?
Platform
+
Apps
Slide 18
Slide 18 text
12 Factor
Apps
Slide 19
Slide 19 text
Architecting
Apps for
Heroku
Slide 20
Slide 20 text
Philosophy:
Slide 21
Slide 21 text
I. Codebase
II. Dependencies
III. Config
IV. Backing Services
V. Build, release, run
VI. Processes
VII. Port binding
VIII. Concurrency
IX. Disposability
X. Dev/prod parity
XI. Logs
XII. Admin processes
12 Factor Apps
Philosophy:
Slide 22
Slide 22 text
I. Codebase
II. Dependencies
III. Config
IV. Backing Services
V. Build, release, run
VI. Processes
VII. Port binding
VIII. Concurrency
IX. Disposability
X. Dev/prod parity
XI. Logs
XII. Admin processes
12 Factor Apps
Philosophy:
Slide 23
Slide 23 text
Codebase
Slide 24
Slide 24 text
❖ Single repo
❖ One codebase tracked in
revision control
❖ Many deploys
Codebase:
❖ Treat logs as event streams
❖ Visibility into running app
❖ write to stdout
❖ collected by execution environment
Logs:
Slide 35
Slide 35 text
RECAP: Twelve-Factors Apps
I. Codebase
II. Dependencies
III. Config
IV. Backing Services
V. Build, release, run
VI. Processes
VII. Port binding
VIII. Concurrency
IX. Disposability
X. Dev/prod parity
XI. Logs
XII. Admin processes
Pricing:
❖
Based on usage
❖
750 free dyno hours
❖
Add-ons are prorated based on plan
❖
One-off dynos accrue too
Slide 53
Slide 53 text
^ Up Time ^
Slide 54
Slide 54 text
Uptime:
Slide 55
Slide 55 text
Uptime:
❖ 99% since December 2012
❖ 99.9% for all of 2013 (so far)
❖ Based on # of apps affected
❖ https://status.heroku.com
❖ https://status.heroku.com/uptime
Slide 56
Slide 56 text
RECAP:
• Spend time solving app problems, not
infrastructure
• Add things as needed
• Pay by usage
• 99.9% uptime
Slide 57
Slide 57 text
Heroku
JAVA
Slide 58
Slide 58 text
❖ Development
❖ Packaging
❖ Distribution
❖ Install
❖ Deployment
Classic Approach:
Slide 59
Slide 59 text
❖ Development
❖ Packaging
❖ Distribution
❖ Install
❖ Deployment
Heroku Approach:
Slide 60
Slide 60 text
❖ No application server
❖ Linked libraries
❖ Minimal external
configuration
❖ Still have Servlet, JSP,
JDBC
Heroku Approach:
Heroku Java Recap:
❖ Build for deployment, not packaging
❖ Version control for distribution
❖ Heroku is the Application Server
❖ Think Applications, not systems
Slide 67
Slide 67 text
What
Now?
Slide 68
Slide 68 text
1.Sign up at www.heroku.com
2.toolbelt.heroku.com
3.devcenter.heroku.com/categories/java
4.$ heroku create
5.$ git push heroku master
6.discussion.heroku.com/category/java