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

concurrency.world em Elixir

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for Quil Quil
February 02, 2018

concurrency.world em Elixir

Um breve sumário sobre actors e promises como ferramentas de concorrência, e como esses conceitos aparecem dentro de Elixir.

Links:
- History of Actors: https://eighty-twenty.org/2016/10/18/actors-hopl
- How do Promises Work: https://robotlolita.me/articles/2015/how-do-promises-work/
- Elixir Language Guides: https://elixir-lang.org/getting-started/introduction.html

Avatar for Quil

Quil

February 02, 2018

More Decks by Quil

Other Decks in Programming

Transcript

  1. They’re complaining they need to wait “too long”... *pushes* Shall

    we give ‘em chairs? Slap a progress bar on it Inspired by @HEJIBITS
  2. Irene Greif Contributed significantly to this concept by formalising Actors

    in her doctoral thesis! (she was also the first woman to get a MIT PhD)
  3. SPAWN is used to create processes. \ c-cute... / But

    another SPAWN. Spawn is (c) Todd McFarlane
  4. We’ve defined a process, but not how to process the

    incoming messages. WHICH MEANS: Accumulated messages
  5. NOW, every time we process a message, we’ll go back

    to process more. (which is why this is generally called a loop)
  6. Promises “Instead of just waiting for things that may take

    a long time, why not just give out a numbered ticket and pick it up later?”
  7. Barbara Liskov Invented one of the most interesting concepts in

    distributed computing with promises: PROMISE PIPELINES
  8. \ nani the fudge / And we get back an

    identifier for the task, not an actor!
  9. RECOMMENDED LITERATURE History of Actors (Tony Garnock-Jones, 2016) How Do

    Promises Work? (Quil, 2015) The Elixir Documentation N/A