Heroku in Real Life
jimmy thrasher <jimmy@brownbirdlabs.com>
              @jimmythrasher
My Thesis
Stuff you know already
James-Thrashers-MacBook-Pro:frogs jjthrash$ git push heroku
Counting objects: 5, done.
Delta compression using up to 4 thr...
Stuff that’s already set up
A Constrained Environment
Gratuitous and Pointless, but nonetheless required

                 DEMO
867-5309
(919) 555-5555
Rapid Development
A Constrained Environment
(Lazy) Control
Real Life:
Action Mailer
Real Life:
Asynchronous Jobs
Real Life:
Emergency Migration
Real Life:
Personal site
Real Life:
Bundler and RVM
Real Life:
hassle (R/O FS)
Real Life:
Support
Real Life in the Future?
  Amazon SNS/SQS
Real Life in the Future?
   Heterogeneous
    Deployment
questions?
•   Attribution

    •   Huntington Library Japanese Rock Garden Wall 0075, Pamla J. Eisenberg: http://
       ...
Heroku in Real Life
Heroku in Real Life
Upcoming SlideShare
Loading in …5
×

Heroku in Real Life

2,245 views
2,181 views

Published on

Slides from Raleigh.rb presentation, wherein I introduce Heroku and I share my experiences with it.

Licensed under Creative Commons Attribution license.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,245
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • I&amp;#x2019;m a software consultant from Efland
    Rails dev since last year, Ruby dev since the turn of the millenium
    Credibility: MBP, iPod Touch
    Not an employee of Heroku, just a fan

    Next: Thesis
  • Code flows like the wind.
    If you don&amp;#x2019;t use Heroku
    A wall arises.

    &lt;poll&gt; Production code in Heroku? Live toy code in production? Have played with it/read about it? Haven&amp;#x2019;t heard of it?

    Next: What is Heroku?
  • What is Heroku? Components version, a flyover. From a developer&amp;#x2019;s perspective.. Heroku architecture is interesting, but out of scope.

    Next: Stuff you know already
  • Rack, Thin, Varnish, Linux, PGSQL, git
    Varnish will use Cache-Control headers and static content is automatically cached.

    Next: git workflow
  • Next: Stuff that&amp;#x2019;s already set up
  • Stack, Memcached, SendGrid, New Relic, /dev/ops

    Next: constrained environment
  • 30s hard limit on request length, R/O FS, no SSH

    Next: Demo

  • Just kidding
  • Next: What is Heroku, take 2
  • What is Heroku? Principles version.

    Next: Rapid Development
  • Up and running in no time with a real URL. This is why it&amp;#x2019;s my GOTO service.

    Next: Constrained environment
  • Very easy to migrate *from* Heroku, code becomes the focus (e.g. Rake tasks)

    Next: Lazy control
  • Most decisions are late-binding. How many nodes? What kind of caching? Etc. Couple of iOS mgmt apps (Nezumi, Doppler).

    Next: Real Life
  • Action Mailer. No code, configuration, just heroku addons:add sendgrid:free.
  • SimpleGeo (3rd-party), long-running tasks
    Delayed::Job, Async Jobs controller, AsyncResults model
  • Emergency Migration: Had a site where we lost access to the admin, and needed to get up and running again. Took 30 minutes. Could have been faster if I&amp;#x2019;d automated app setup.
  • Bucketwise
    Simple personal site, deployed with free Heroku support. Gets shut down occasionally, but no problem.
  • Bundler and RVM: They are the man.
    require &amp;#x2018;generator&amp;#x2019; (Ruby 1.8.6)
    Getting app set up and telling Heroku your dependencies become the same operation
  • hassle: Using Compass, which renders CSS, but Heroku has a read only FS.
    hassle renders to tmp FS. Works locally, works on Heroku.
  • Hint: Become a paying customer and use tickets. Freenode and email list covered by other devs.
  • Long-polling is impossible in Heroku. This may be a simple way to enable it.
  • Zynga deployment = known core of real machines, variable group of virtual servers to handle bursts

  • Heroku in Real Life

    1. 1. Heroku in Real Life jimmy thrasher <jimmy@brownbirdlabs.com> @jimmythrasher
    2. 2. My Thesis
    3. 3. Stuff you know already
    4. 4. James-Thrashers-MacBook-Pro:frogs jjthrash$ git push heroku Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 311 bytes, done. Total 3 (delta 2), reused 0 (delta 0) -----> Heroku receiving push -----> Sinatra app detected -----> Gemfile detected, running Bundler version 1.0.0 All dependencies are satisfied Compiled slug size is 1.6MB -----> Launching.... done http://blooming-stream-31.heroku.com deployed to Heroku To git@heroku.com:blooming-stream-31.git 3d13669..54a688e master -> master
    5. 5. Stuff that’s already set up
    6. 6. A Constrained Environment
    7. 7. Gratuitous and Pointless, but nonetheless required DEMO
    8. 8. 867-5309
    9. 9. (919) 555-5555
    10. 10. Rapid Development
    11. 11. A Constrained Environment
    12. 12. (Lazy) Control
    13. 13. Real Life: Action Mailer
    14. 14. Real Life: Asynchronous Jobs
    15. 15. Real Life: Emergency Migration
    16. 16. Real Life: Personal site
    17. 17. Real Life: Bundler and RVM
    18. 18. Real Life: hassle (R/O FS)
    19. 19. Real Life: Support
    20. 20. Real Life in the Future? Amazon SNS/SQS
    21. 21. Real Life in the Future? Heterogeneous Deployment
    22. 22. questions? • Attribution • Huntington Library Japanese Rock Garden Wall 0075, Pamla J. Eisenberg: http:// www.flickr.com/photos/27398485@N08/3279507695/ • MG Gundam Exia, _Chag: http://www.flickr.com/photos/_chag/3827822037/ • And yet another apple pie, Benny Mazur: http://www.flickr.com/photos/benimoto/ 2109973292/ • The walled garden of Hever Castle in Kent, Anguskirk: http://www.flickr.com/ photos/anguskirk/3209898354/ • ¡¡Caza Fantasmas..!!, Jaime el Andrés: http://www.flickr.com/photos/heraclito/ 3561566486/ • Spring Peeper 1, Keith Robinson: http://www.flickr.com/photos/kjrob/4509343567/ • Chainsaw Art (1), Chuck Walker: http://www.flickr.com/photos/ cwalker71/1083376338/ • One. Lazy. Cat., Jess Loughborough: http://www.flickr.com/photos/

    ×