Slides from Raleigh.rb presentation, wherein I introduce Heroku and I share my experiences with it.
Licensed under Creative Commons Attribution license.
23. Real Life in the Future?
Heterogeneous
Deployment
24. 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/
Notes de l'éditeur
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&#x2019;t heard of it?
Next: What is Heroku?
What is Heroku? Components version, a flyover. From a developer&#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&#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&#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&#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 &#x2018;generator&#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