Enabling Experimentation

711 views

Published on

The talk that Nick, Paul and myself gave at the first Forward developer day.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
711
On SlideShare
0
From Embeds
0
Number of Embeds
265
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • don’t know- there’s an infinite amount of stuff you don’t know, probability of something better within that is much stronger than in the stuff you know Next slide: concrete examples from energy
  • these are symptoms/examples of where experimentation is difficult. next slide: what can we do to achieve more experimentation
  • distinct concepts: easier to manoeuvre and try out better ways of solving problem utility: focus on what’s needed, not what’s ‘real’. tube map is a good way to navigate london, terrible way to understand the geography. also ancient map that world is flat.
  • follows from an emphasis on model utility allows contexts to be played with individually recognise that there’s a mapping to be done, deal with it in the right place, rather than everywhere! so let’s look at our contexts...
  • rate cards distinct from plans + pricing, in turn distinct from dealing with customers and getting them through the switch. we’ve done bits of experimentation in all, although the pricing and comparison is where the action is so lets talk about that a bit more about one...
  • so energy comparison is our context. lets look at what it needs to do and look at the experimentation we did. lets take a look at the physical (and logical) app separation and our end result (so far)
  • pretty normal stuff- sinatra, mysql and ruby around the edges. in the middle we’re using some new stuffs. thats been beneficial (we’ll come to it in a minute), but lets take a look at some risks we considered at the outset
  • not sufficient to just learn during the day, needs a keen interest from people
  • so turns out, a lot of tools in clojure have sprung up inspired from ruby counterparts. and, our experience of ruby deploys meant clojure deploys were little effort.
  • Comparison took 3 weeks to write in Clojure
  • 2 bullets- what you get. final point, you won’t know unless you try- so experiment!! make it possible
  • Enabling Experimentation

    1. 1. Embracing Experimentation <ul><li>Enabling and exploiting a culture of experimentation within Energy </li></ul>24 Sept 2010
    2. 2. Why is it Important? <ul><li>Not experimenting means you’re not learning </li></ul><ul><li>Don’t know what you don’t know </li></ul><ul><li>Mediocrity </li></ul><ul><li>Stifle innovation and competitiveness </li></ul><ul><li>Only way to achieve significant improvements </li></ul>
    3. 3. Lack of Experimentation <ul><li>Energy’s overarching domain </li></ul><ul><li>Complex admin tool </li></ul><ul><li>THE DATA PUSH (ongoing) </li></ul><ul><li>Untouchable code </li></ul><ul><li>Simple (complex) release process </li></ul><ul><li>“Why change it? You’ll only rewrite it the same.” </li></ul>
    4. 4. Enabling Experimentation <ul><li>Less-coupled more modular structure </li></ul><ul><li>Distinct domain concepts </li></ul><ul><li>Model utility rather than reality </li></ul><ul><li>Ensure clear separation </li></ul>
    5. 5. Example: Bounded Context <ul><li>Logically and physically separated </li></ul><ul><li>Appropriate domain language </li></ul><ul><li>Acknowledge and isolate interaction </li></ul>
    6. 6. Bounded Contexts <ul><li>Importing Rate Cards </li></ul><ul><li>Pricing plans and performing comparisons </li></ul><ul><li>Switching a customers energy supplier </li></ul>
    7. 7. Experimenting with Comparison <ul><li>Price energy plans based on user profiles </li></ul><ul><li>Lots of calculations </li></ul><ul><li>Transforming a lot of data </li></ul><ul><li>Can’t be a bottle neck </li></ul>
    8. 8. Experimenting with Tools varnish Mongo compojure Tariff Editor mysql sinatra Home Movers sinatra Comparison
    9. 9. Issues with Experimentation <ul><li>New language idioms </li></ul><ul><li>New development environment </li></ul><ul><li>Deployment </li></ul><ul><li>Demands your own interest and investment </li></ul><ul><li>#fail? </li></ul>
    10. 10. Clojure Tools <ul><li>Actually lots of similarity to Ruby </li></ul><ul><ul><li>rake/gem -> lein </li></ul></ul><ul><ul><li>irb -> lein repl </li></ul></ul><ul><ul><li>rack -> ring </li></ul></ul><ul><ul><li>sinatra -> compojure </li></ul></ul><ul><li>Capistrano still works for deploys </li></ul>
    11. 11. Experimentation Rewards <ul><li>Functional programming (and Clojure) great fit for our problem </li></ul><ul><li>Resulting code is smaller and more succinct </li></ul><ul><li>Higher-order functions provide powerful composition </li></ul><ul><li>More to come... protocols, partial fns, macros etc. </li></ul><ul><li>Fast enough : >100 requests/second </li></ul><ul><li>No complex AOT caching </li></ul><ul><li>Simpler deployments </li></ul>
    12. 12. #win <ul><li>Modularity exposed way to break down problem </li></ul><ul><li>Break problems apart and you can solve everything in the most effective way </li></ul><ul><li>Small composable services with bounded contexts encouraged experimentation </li></ul><ul><li>Produced a tighter codebase with simpler deployment </li></ul><ul><li>No caching needed : performance allows realtime updates </li></ul>
    13. 13. #win <ul><li>Good people , experimentation , and technology has built a far more capable , flexible , scalable solution than with ‘obvious’ tools </li></ul><ul><li>You don’t know unless you try </li></ul>
    14. 14. Clojure #win <ul><li>Coming soon to a project near you </li></ul><ul><li>Demo/up-and-running with Clojure later this afternoon </li></ul>
    15. 15. Questions?
    16. 16. k’thx bye... until this afternoon

    ×