[wroc_love.rb] Migrating to Clojure. So much fn.

[wroc_love.rb] Migrating to Clojure. So much fn.

Slides from a talk I delivered on 15.03.2014 at wroc_love.rb in Wrocław, Poland.

Migrating a technology stack to a new language is rarely a simple task. It's getting even more challenging when what is changed is not only the language but the whole paradigm. This talk covers a story of stylefruits, where we've been gradually replacing a Ruby-based technology stack serving five million monthly visitors with Clojure. What are the costs and benefits of such a transition? How to make the migration gradual and painless? How to make Ruby and Clojure work with each other on the way? How easy is it to switch from a dynamic, object-oriented language to a functional one based on immutability and laziness? These are just some takeaways from this straight-from-the-trenches report.

Video: https://www.youtube.com/watch?v=Hv4slaRydRM

Ae7a42fb716793697b1d222f3cc753b8?s=128

Jan Stępień

March 15, 2014
Tweet

Transcript

  1. 4.
  2. 8.
  3. 10.

    ↓ ╭────────────╮ │ http proxy │ ╰────────────╯ ↓ ↓ ╭───────────────╮

    ╭─────────────╮ │ ruby on rails │ ← │ widgets! │ ╰───────────────╯ ╰─────────────╯ ↓ ╭──────╮ │ db │ ╰──────╯
  4. 11.

    ↓ ╭────────────╮ │ http proxy │ ╰────────────╯ ↓ ↓ ╭───────────────╮

    ╭─────────────╮ │ ruby on rails │ │ widgets! │ ╰───────────────╯ ╰─────────────╯ ↓ ↓ ╭──────╮ ╭─────────────╮ │ db │ ← │ data acc. │ ╰──────╯ ╰─────────────╯
  5. 12.

    ↓ ╭───────────────────────╮ │ │ │ ╭───────╯ │ ruby on rails

    │ ↓ │ │ ╭─────────────╮ │ │ │ widgets! │ ╰───────────────╯ ╰─────────────╯ ↓ ↓ ╭──────╮ ╭─────────────╮ │ db │ ← │ data acc. │ ╰──────╯ ╰─────────────╯
  6. 14.

    ↓ ╭───────────────────────╮ │ │ │ ╭───────╯ │ ruby on rails

    │ ↓ │ │ ╭─────────────╮ │ │ │ widgets! │ ╰───────────────╯ ╰─────────────╯ ↓ ↓ ╭──────╮ ╭─────────────╮ │ db │ ← │ data acc. │ ╰──────╯ ╰─────────────╯
  7. 15.

    ↓ ╭───────────────────────╮ │ │ │ ╭───────╯ │ ruby on rails

    │ ↓ │ │ ╭─────────────╮ │ │ │ clojure │ ╰───────────────╯ ╰─────────────╯ ↓ ↓ ╭──────╮ ╭─────────────╮ │ db │ ← │ data acc. │ ╰──────╯ ╰─────────────╯
  8. 16.

    +

  9. 19.

    => (def vector [1 2 3]) => vector [1 2

    3] => (conj vector 4) [1 2 3 4] => vector [1 2 3]
  10. 27.

    => (def vector [1 2 3]) => vector [1 2

    3] => (conj vector 4) [1 2 3 4] => vector [1 2 3]