@michaelneale
         www.CloudBees.com




Monday, 13 June 2011
Hosted build-time to Runtime - the full cycle




Monday, 13 June 2011
Monday, 13 June 2011
Tasty dog food
          - we practice continuous deployment
          - carefully...
          (especially after that one time I...)
          - bootstrapping !




Monday, 13 June 2011
Monday, 13 June 2011
CI in the cloud
         - git push --> run tests, promote
         - bees app:deploy
         - BYO repo or use ours (even SVN ??)




Monday, 13 June 2011
Anyway... you can use it free
         - signup www.cloudbees.com
         - free FOSS Jenkins CI hosting
         - free general Apps hosting
         - “public cloud” or private edition (hybrid?)
         - thousands of apps hosted already



Monday, 13 June 2011
Why a PaaS ?
         - System administration challenged
         - Make it someone else’s problem
         - why not? just PLEASE think about lock in


Monday, 13 June 2011
My experience
         - fell in love with GAE, force.com
         - terrified of any and all lock in at the time
         - had nothing better to do ... so cloudbees...


Monday, 13 June 2011
Heaven to use
         Hell to build **
         Purgatory to manage **


         ** Not Your Problem.

Monday, 13 June 2011
Some things we use to get it done:
         - scala (back end apps)
         - ruby (chef, rails, proxymachine, lots)
         - java (jenkins and plugins)
         - erlang (“agents” and lots more..)

Monday, 13 June 2011
But what I really want to talk quickly about ...




Monday, 13 June 2011
Exceptions. Errors.
         What The Hell Is That Process Doing?
         and how it relates to..




Monday, 13 June 2011
Keeping things running without falling into a
         weeping trembling mess in the corner every time
         you hear an SMS sound or a phone ring or an
         email chime etc etc etc.....



Monday, 13 June 2011
Exception handling is wrong...




Monday, 13 June 2011
But it seems harmless...



Monday, 13 June 2011
Monday, 13 June 2011
Monday, 13 June 2011
Erlang says no no no...




Monday, 13 June 2011
Question: a process on server not responding
         Answer:
         1) panic
         2) take time thinking about underlying cause
         3) bounce the bastard and pray **

Monday, 13 June 2011
FACT: Answer#3 will often work so well, you
         often don’t really spend time to think about #2**



         ** FibreError?

Monday, 13 June 2011
Imagine a programming environment:
          - unlimited process spawning
          - concurrency someone else’s problem
          - don’t try to handle errors - let it fail


Monday, 13 June 2011
Erlang


         Built for stability, and not bothering me.


         Anything else is gravy.

Monday, 13 June 2011
Process isolation
         - it works so well
         - nothing shared
         - has worked so well for so long with OSes
         - in erlang - each ‘process’ is like a process !

Monday, 13 June 2011
nginx    Example: My Host OS

                       haproxy             Erlang process

                                          supervisor
                                             ...
                                        p1         p999



           Each: own heap, garbage collector


Monday, 13 June 2011
Erlang processes, like OS processes


            - Can only send messages to each other
            - Can fail independently
            - Can be restarted, safely
            - Easy to write apps for - Old School !


Monday, 13 June 2011
Better


            - Tiny overhead (can have 100K+ of them !)
            - perfect for supervisory agents
            - distribute: run on every box if you like !
            - lots of processes == lots of concurrency
            - if you need to block, block !

Monday, 13 June 2011
We use them for


           - Supervisory agents - controllers
           - Autoscaling services (realtime data analytics)
           - misc backend systems
           - fun command line tools !


Monday, 13 June 2011
Supervisor configuration


           - Declare rules for restarting, failure
           - So you don’t have to intervene !
           - can hot reload changes
           - can have dependent processes


Monday, 13 June 2011
Restart just busted process




Monday, 13 June 2011
Anyway, that is why we use Erlang, also...
         - RabbitMQ
         - Riak (nosql DB)
         - CouchDB (nosql DB)
         - Probably your telephone exchange




Monday, 13 June 2011
Thank you




Monday, 13 June 2011

Errors and handling them. YOW nights Sydney 2011

  • 1.
    @michaelneale www.CloudBees.com Monday, 13 June 2011
  • 2.
    Hosted build-time toRuntime - the full cycle Monday, 13 June 2011
  • 3.
  • 4.
    Tasty dog food - we practice continuous deployment - carefully... (especially after that one time I...) - bootstrapping ! Monday, 13 June 2011
  • 5.
  • 6.
    CI in thecloud - git push --> run tests, promote - bees app:deploy - BYO repo or use ours (even SVN ??) Monday, 13 June 2011
  • 7.
    Anyway... you canuse it free - signup www.cloudbees.com - free FOSS Jenkins CI hosting - free general Apps hosting - “public cloud” or private edition (hybrid?) - thousands of apps hosted already Monday, 13 June 2011
  • 8.
    Why a PaaS? - System administration challenged - Make it someone else’s problem - why not? just PLEASE think about lock in Monday, 13 June 2011
  • 9.
    My experience - fell in love with GAE, force.com - terrified of any and all lock in at the time - had nothing better to do ... so cloudbees... Monday, 13 June 2011
  • 10.
    Heaven to use Hell to build ** Purgatory to manage ** ** Not Your Problem. Monday, 13 June 2011
  • 11.
    Some things weuse to get it done: - scala (back end apps) - ruby (chef, rails, proxymachine, lots) - java (jenkins and plugins) - erlang (“agents” and lots more..) Monday, 13 June 2011
  • 12.
    But what Ireally want to talk quickly about ... Monday, 13 June 2011
  • 13.
    Exceptions. Errors. What The Hell Is That Process Doing? and how it relates to.. Monday, 13 June 2011
  • 14.
    Keeping things runningwithout falling into a weeping trembling mess in the corner every time you hear an SMS sound or a phone ring or an email chime etc etc etc..... Monday, 13 June 2011
  • 15.
    Exception handling iswrong... Monday, 13 June 2011
  • 16.
    But it seemsharmless... Monday, 13 June 2011
  • 17.
  • 18.
  • 19.
    Erlang says nono no... Monday, 13 June 2011
  • 20.
    Question: a processon server not responding Answer: 1) panic 2) take time thinking about underlying cause 3) bounce the bastard and pray ** Monday, 13 June 2011
  • 21.
    FACT: Answer#3 willoften work so well, you often don’t really spend time to think about #2** ** FibreError? Monday, 13 June 2011
  • 22.
    Imagine a programmingenvironment: - unlimited process spawning - concurrency someone else’s problem - don’t try to handle errors - let it fail Monday, 13 June 2011
  • 23.
    Erlang Built for stability, and not bothering me. Anything else is gravy. Monday, 13 June 2011
  • 24.
    Process isolation - it works so well - nothing shared - has worked so well for so long with OSes - in erlang - each ‘process’ is like a process ! Monday, 13 June 2011
  • 25.
    nginx Example: My Host OS haproxy Erlang process supervisor ... p1 p999 Each: own heap, garbage collector Monday, 13 June 2011
  • 26.
    Erlang processes, likeOS processes - Can only send messages to each other - Can fail independently - Can be restarted, safely - Easy to write apps for - Old School ! Monday, 13 June 2011
  • 27.
    Better - Tiny overhead (can have 100K+ of them !) - perfect for supervisory agents - distribute: run on every box if you like ! - lots of processes == lots of concurrency - if you need to block, block ! Monday, 13 June 2011
  • 28.
    We use themfor - Supervisory agents - controllers - Autoscaling services (realtime data analytics) - misc backend systems - fun command line tools ! Monday, 13 June 2011
  • 29.
    Supervisor configuration - Declare rules for restarting, failure - So you don’t have to intervene ! - can hot reload changes - can have dependent processes Monday, 13 June 2011
  • 30.
    Restart just bustedprocess Monday, 13 June 2011
  • 31.
    Anyway, that iswhy we use Erlang, also... - RabbitMQ - Riak (nosql DB) - CouchDB (nosql DB) - Probably your telephone exchange Monday, 13 June 2011
  • 32.