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

OTP, Concurrency and Testing Strategies

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

OTP, Concurrency and Testing Strategies

An introduction to OTP, concurrency and, testing strategies for sync and async server requests in Elixir. As presented in Montreal Elixir, April 12th, 2017. Code examples are available on GH. https://github.com/xymbol/otp-examples

Avatar for Adrian Mugnolo

Adrian Mugnolo

April 12, 2017
Tweet

Other Decks in Programming

Transcript

  1. OTP

  2. • Erlang interpreter and compiler • Erlang standard library •

    Dialyzer, a static analysis tool • Mnesia, a distributed database • ETS, and in-memory database • A debugger • An event tracer • A release-management tool
  3. • Start as a new process • Wait for requests

    • Handle requests • Update state if needed • Rinse, repeat
  4. TDD

  5. • Distribute processing across cores 1:n • Coordinate work one

    message at a time n:1 • Keep long-running concurrent state • Need processes supervised • Want state upgraded in place