Heroku in Real Life

  • 2,041 views
Uploaded on

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

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

Licensed under Creative Commons Attribution license.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,041
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • I’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’t use Heroku
    A wall arises.

    <poll> Production code in Heroku? Live toy code in production? Have played with it/read about it? Haven’t heard of it?

    Next: What is Heroku?
  • What is Heroku? Components version, a flyover. From a developer’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’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’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’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 ‘generator’ (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

Transcript

  • 1. Heroku in Real Life jimmy thrasher <jimmy@brownbirdlabs.com> @jimmythrasher
  • 2. My Thesis
  • 3. Stuff you know already
  • 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. Stuff that’s already set up
  • 6. A Constrained Environment
  • 7. Gratuitous and Pointless, but nonetheless required DEMO
  • 8. 867-5309
  • 9. (919) 555-5555
  • 10. Rapid Development
  • 11. A Constrained Environment
  • 12. (Lazy) Control
  • 13. Real Life: Action Mailer
  • 14. Real Life: Asynchronous Jobs
  • 15. Real Life: Emergency Migration
  • 16. Real Life: Personal site
  • 17. Real Life: Bundler and RVM
  • 18. Real Life: hassle (R/O FS)
  • 19. Real Life: Support
  • 20. Real Life in the Future? Amazon SNS/SQS
  • 21. Real Life in the Future? Heterogeneous Deployment
  • 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/