Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

BEAM architecture handbook - Andrea Leopardi | Elixir Club Ukraine

29 views

Published on

Slides of Andrea Leopardi, member of the @elixir-lang core team, at Elixir Club Ukraine, Kyiv, 28.09.2019
Next conference - http://www.elixirkyiv.club/

Description of presentation
If you are writing a stateless web application backed up by a database, there is a good chance Elixir is a great fit. However, this is not where it shines. In this talk, we will discuss how to architect Elixir applications in order to leverage the features of the language and of its runtime.

We will look at this both from a lower level, talking about the architecture of processes inside an Elixir application, as well as from a higher perspective of writing Elixir services and architecting systems to play to Elixir's strengths.
We will see practical use cases and discuss design patterns.


Follow us on social networks @ElixirClubUA and #ElixirClubUA
Announce and materials from conf - https://www.fb.me/ElixirClubUA
News - https://twitter.com/ElixirClubUA
Photo and free atmosphere - https://www.instagram.com/ElixirClubUA
*Organizer’s channel - https://t.me/incredevly

Published in: Technology
  • Be the first to comment

  • Be the first to like this

BEAM architecture handbook - Andrea Leopardi | Elixir Club Ukraine

  1. 1. receive do :some_message -> # ... :other_message -> # ... end
  2. 2. def handle_info(:some_message, state) do # ... end def handle_info(:other_message, state) do # ... end def handle_info(unknown, state) do Logger.warn("Unknown message") {:noreply, state} end
  3. 3. Node.monitor(consumer_node, true) monitor_ref = Process.monitor(consumer_pid) send(consumer_pid, {monitor_ref, message}) receive do {:ack, ^monitor_ref} -> Process.demonitor(monitor_ref, [:flush]) {:DOWN, ^monitor_ref, _, _, _} -> give_to_another_consumer(message) {:nodedown, ^consumer_node} -> give_to_another_consumer(message) end

×