Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elixir. There and Back Again

Elixir. There and Back Again

Ee8543e8f5554aaeabb6d140fa07b919?s=128

Nikolay Sverchkov

March 06, 2018
Tweet

Transcript

  1. None
  2. None
  3. EVIL MARTIANS

  4. EVIL MARTIANS

  5. Nikolay Sverchkov @ssnickolay

  6. Battle of facts

  7. Dependencies

  8. ??? “Welcome email” ???

  9. Sidekiq (Redis) “Welcome email” ???

  10. GenServer defmodule EmailSender do use GenServer def handle_cast({:send, email}, state)

    do # send email {:noreply, state} end end # Start the server {:ok, pid} = GenServer.start_link(EmailSender, []) # This is the client GenServer.cast(pid, {:send, “user@example.com"}) #=> :ok
  11. Sidekiq (Redis) “Welcome email” [OTP] GenServer

  12. Sidekiq (Redis) ??? “We love cashcache” [OTP] GenServer ???

  13. Sidekiq (Redis) Memcached “We love cashcache” [OTP] GenServer ???

  14. Memcached vs ETS

  15. Sidekiq (Redis) Memcached “We love cashcache” [OTP] GenServer [OTP] ETS

  16. Sidekiq (Redis) Memcached ??? “Where is my long polling?” [OTP]

    GenServer [OTP] ETS ???
  17. Sidekiq (Redis) Memcached AnyCable “Where is my long polling?” [OTP]

    GenServer [OTP] ETS ???
  18. Sidekiq (Redis) Memcached AnyCable “Where is my long polling?” [OTP]

    GenServer [OTP] ETS Phoenix Channels
  19. Sidekiq (Redis) Memcached AnyCable ??? Message broker [OTP] GenServer [OTP]

    ETS Phoenix Channels ???
  20. Sidekiq (Redis) Memcached AnyCable RabbitMQ Message broker [OTP] GenServer [OTP]

    ETS Phoenix Channels RabbitMQ
  21. None
  22. Wait, it's like…

  23. None
  24. Erlang -> Java BEAM -> JVM Elixir -> ???

  25. None
  26. Development

  27. ??? Speed ???

  28. Spring + Bootsnap Speed By Design

  29. Spring + Bootsnap ??? Architecture [DDD] By Design ???

  30. Spring + Bootsnap Trailblazer\Dry(Hanami?) Architecture [DDD] By Design By Design

  31. Spring + Bootsnap Trailblazer\Dry(Hanami?) ??? Umbrella By Design By Design

    ???
  32. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? Umbrella By Design By Design

    By Design
  33. Flawless Victory?

  34. I have to rewrite everything with Elixir

  35. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? ??? Debugging By Design By

    Design Umbrella ???
  36. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? Pry Debugging By Design By

    Design Umbrella IEx.pry
  37. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? Pry ??? Deploy By Design

    By Design Umbrella IEx.pry ???
  38. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? Pry Docker\Capistrano Deploy By Design

    By Design Umbrella IEx.pry Mix\Distillery
  39. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? Pry Docker\Capistrano ??? Tests tooling

    By Design By Design Umbrella IEx.pry Mix\Distillery ???
  40. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? Pry Docker\Capistrano Rspec\Capybara Tests tooling

    By Design By Design Umbrella IEx.pry Mix\Distillery Espec\Hound
  41. Overtime

  42. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? ActiveRecord (Rom?) Docker\Capistrano Rspec\Capybara Upload

    Image By Design By Design Umbrella Ecto Mix\Distillery Espec\Hound
  43. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? ActiveRecord (Rom?) Docker\Capistrano Rspec\Capybara Send

    Email with attachment By Design By Design Umbrella Ecto Mix\Distillery Espec\Hound
  44. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? ActiveRecord (Rom?) Docker\Capistrano Rspec\Capybara Authorization

    By Design By Design Umbrella Ecto Mix\Distillery Espec\Hound
  45. Spring + Bootsnap Trailblazer\Dry(Hanami?) Hanami? ActiveRecord (Rom?) Docker\Capistrano Rspec\Capybara Update

    deps By Design By Design Umbrella Ecto Mix\Distillery Espec\Hound
  46. Summary

  47. Good for: Monolith Microservice Terrible for: Concurrency Key points Good

    for: Microservice Concurrency Terrible for: CMS Admin panel
  48. Why exactly Elixir?

  49. Why exactly Elixir? • Fast learning • A lot of

    job offers • http://erlangjobs.ru/ • High salary (Ruby < Elixir < Go) https://t.me/proelixir https://wunsh.ru/