Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Heroku + Java

Heroku + Java

A talk on What is Heroku and how Heroku+Java for St. Louis Java Users Group

Clint Shryock

November 14, 2013
Tweet

More Decks by Clint Shryock

Other Decks in Programming

Transcript

  1. ❖ What is Heroku ❖ 12 Factor Apps ❖ Working

    With Heroku ❖ Heroku + Java Contents:
  2. 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
  3. 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
  4. Supporting: ❖ Ruby ❖ Python ❖ ->Java<- ❖ Node.js ❖

    Clojoure ❖ PHP …and basically anything with 3rd Party Buildpacks
  5. HOW

  6. 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
  7. 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:
  8. 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:
  9. ❖ Consistent packaging: RubyGems, pip, npm, Maven ❖ Declaration: Gemfile,

    requirements.txt ❖ Execution isolation: bundle exec, Virtualenv Dependencies:
  10. ❖ Resource handles ❖ Credentials ❖ Things you used to

    use constants for ❖ All your secrets Config:
  11. ❖ Datastores: MySQL, Postgres ❖ Queueing systems: RabbitMQ ❖ Some

    local, other remote ❖ Can be attached/detached Backing Services:
  12. ❖ Treat logs as event streams ❖ Visibility into running

    app ❖ write to stdout ❖ collected by execution environment Logs:
  13. 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
  14. ❖ git push ❖ slug compilation ❖ dyno provisioning ❖

    api/routing updates ❖ CLI for management (overly simplistic) This:
  15. ❖ Data Stores: Postgres, MongoHQ, Redis ❖ Search: Websolr, Flying

    Sphinx ❖ Logging: Paptertrail, Loggly ❖ Analytics: New Relic, Blitz ❖ Queue Managers: IronMQ, Pusher ❖ Cache: Memcache, RedisGreen Add-ons:
  16. Pricing: ❖ Based on usage ❖ 750 free dyno hours

    ❖ Add-ons are prorated based on plan ❖ One-off dynos accrue too
  17. 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
  18. RECAP: • Spend time solving app problems, not infrastructure •

    Add things as needed • Pay by usage • 99.9% uptime
  19. ❖ No application server ❖ Linked libraries ❖ Minimal external

    configuration ❖ Still have Servlet, JSP, JDBC Heroku Approach:
  20. ❖ Deployment ❖ Start/stop/restart ❖ Deployment of changes ❖ Clustering

    (scaling) Application Servers: ❖ Load-balancing ❖ Failover ❖ Logging ❖ Service binding
  21. ❖ Deployment ❖ Start/stop/restart ❖ Deployment of changes ❖ Clustering

    (scaling) Application Servers: ❖ Load-balancing ❖ Failover ❖ Logging ❖ Service binding Heroku
  22. Heroku Java Recap: ❖ Build for deployment, not packaging ❖

    Version control for distribution ❖ Heroku is the Application Server ❖ Think Applications, not systems