Building Java Apps on
Heroku and Force.com

James Ward, Heroku
@_JamesWard
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 July 31, 2012. 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.
Why Heroku?
YOUR APP
             Cloud Machines
   Logging        Deployment        Indexing

  Messaging         Scaling     Security Updates


  Monitoring       Backups      Disaster Recovery


             Virtual Machines
 File Servers     Web Servers     IP Assignmet


Load Balancers      Routing         Firewall


            Physical Machines
    Power          Network       Physical Space
Let's Deploy Some Apps!
heroku.com/java
2,308,940+ Apps Running on Heroku
Heroku Terminology

                                  Process                      Dyno
                                                 0..*

                                       0..*
                                                              Env Var
                                                 0..*

                                                     0..*
    Owner                          App                        Add-on
                    0..*

                                                 *..*
                                      1..1
                                                            Collaborator
                           *..1
                                  git repo    *..1
    Load Balancer                                             Logplex
Zero-Error Deployment
User              Slug Compiler               Buildpack             Dyno Manifold           Load Balancer

   git push heroku master
                              create slug
                                                    mvn package
                                  slug file

                                                    shutdown existing dynos
                                                                                pause routing

                                                     deploy slug on dynos
                                                                              start processes



                                                                                resume routing
Unlimited Real-Time   Granular Security &    Programmable       Real-Time Workflow    Programmable
                   Customization            Sharing            Cloud Logic          & Approvals        User Interface


cloud platform

                 Real-Time Mobile                            Real-Time Content
                                                                                                       850+ Integrated
                   Deployment          Real-Time Websites         Library        Real-Time Analytics
                                                                                                        Applications
eclipse-plugin.herokuapp.com
Environment Variables

 • Zero intervention deployment
 • Running systems only differ through env vars
 • Add-ons own their config
OAuth Setup

 • Create Remote Access Application for App
 • Set:
    • SFDC_OAUTH_CLIENT_ID
    • SFDC_OAUTH_CLIENT_SECRET
No Proprietary APIs. BYOC.




<dependency>
    <groupId>com.github.jsimone</groupId>
    <artifactId>webapp-runner</artifactId>
    <version>7.0.22</version>
    <scope>provided</scope>
</dependency>
Run Anything



web:             java -jar target/web.jar --port $PORT
worker1:         java -jar target/somejar.jar
scheduledjob1:   java -jar target/another.jar
                                                         Procfile
Logging

 • Logplex is Heroku's central logging system
 • Stream of STDOUT from Dynos, load balancer requests, slug
   compiler
 • Stream is pipe-able
 • Accessible via API
 • Heroku Add-ons can receive logs
Collaborators

 • Can push changes to an app
 • Could be a CI build system
addons.heroku.com

 • Use the Memcache Add-on for simple session externalization
 • Many other Heroku Add-ons
Scale == "allocating Dynos a process"

 Methods:
 • API
 • CLI
 • Eclipse Plugin
 • Third-Party Auto-Scaling Tools
Individual Developers
 • $0.05 / Dyno Hour
 • 750 free Dyno hours / app / month


New Enterprise Package!
• heroku.com/enterprise
heroku.com/java
Building Java Apps on Heroku and Force.com
Building Java Apps on Heroku and Force.com

Building Java Apps on Heroku and Force.com

  • 1.
    Building Java Appson Heroku and Force.com James Ward, Heroku @_JamesWard
  • 2.
    Safe harbor Safeharbor 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 July 31, 2012. 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.
  • 3.
  • 5.
    YOUR APP Cloud Machines Logging Deployment Indexing Messaging Scaling Security Updates Monitoring Backups Disaster Recovery Virtual Machines File Servers Web Servers IP Assignmet Load Balancers Routing Firewall Physical Machines Power Network Physical Space
  • 6.
  • 7.
  • 8.
  • 9.
    Heroku Terminology Process Dyno 0..* 0..* Env Var 0..* 0..* Owner App Add-on 0..* *..* 1..1 Collaborator *..1 git repo *..1 Load Balancer Logplex
  • 10.
    Zero-Error Deployment User Slug Compiler Buildpack Dyno Manifold Load Balancer git push heroku master create slug mvn package slug file shutdown existing dynos pause routing deploy slug on dynos start processes resume routing
  • 11.
    Unlimited Real-Time Granular Security & Programmable Real-Time Workflow Programmable Customization Sharing Cloud Logic & Approvals User Interface cloud platform Real-Time Mobile Real-Time Content 850+ Integrated Deployment Real-Time Websites Library Real-Time Analytics Applications
  • 12.
  • 13.
    Environment Variables •Zero intervention deployment • Running systems only differ through env vars • Add-ons own their config
  • 14.
    OAuth Setup •Create Remote Access Application for App • Set: • SFDC_OAUTH_CLIENT_ID • SFDC_OAUTH_CLIENT_SECRET
  • 15.
    No Proprietary APIs.BYOC. <dependency> <groupId>com.github.jsimone</groupId> <artifactId>webapp-runner</artifactId> <version>7.0.22</version> <scope>provided</scope> </dependency>
  • 16.
    Run Anything web: java -jar target/web.jar --port $PORT worker1: java -jar target/somejar.jar scheduledjob1: java -jar target/another.jar Procfile
  • 17.
    Logging • Logplexis Heroku's central logging system • Stream of STDOUT from Dynos, load balancer requests, slug compiler • Stream is pipe-able • Accessible via API • Heroku Add-ons can receive logs
  • 18.
    Collaborators • Canpush changes to an app • Could be a CI build system
  • 19.
    addons.heroku.com • Usethe Memcache Add-on for simple session externalization • Many other Heroku Add-ons
  • 20.
    Scale == "allocatingDynos a process" Methods: • API • CLI • Eclipse Plugin • Third-Party Auto-Scaling Tools
  • 21.
    Individual Developers •$0.05 / Dyno Hour • 750 free Dyno hours / app / month New Enterprise Package! • heroku.com/enterprise
  • 22.