Skip to content
0:00 / 0:00

#elixir#docker#otp

ElixirConf 2018 - Docker and OTP Friends or Foes - Daniel Azuma

ElixirConf

13K subscribers • 28 videos on Hallway

YouTube
  • Recommended by 4 people: 4 on Hacker News.
  • A classic. People kept recommending it from 2018 to 2022.
  • Presented by Daniel Azuma

Intermediate. Assumes working knowledge.

16K views8 years ago4 recommendations

Programming languagesDistributed systemsElixir and ErlangDocker and containersConcurrency and parallelism

Daniel Azuma demonstrates how to run Elixir OTP applications in Docker containers, using CRDTs to persist state across container restarts.

The uploader added no description.

Why it's here

4 people recommend this

What people say. Highly recommended for showing how to successfully combine Elixir's stateful OTP features with ephemeral container environments like Kubernetes.

qohenon Hacker News • Recommends

On “CRDT: Conflict-free replicated data type”

…hile the Docker container it's running in gets killed and and the Elixir processes get respawned on another container. The state is persisted across Elixir nodes in other containers in an instance of DeltaCrdt. (Again, the talk is really good -- if the above sounds interesting, you'll want to check it out 3). 0 link 1 link 2 link 3 link to this video…

dnauticson Hacker News • Recommends

On “My favorite Erlang program (2013)”

Honestly, in most scenarios, you kill the vm and let it restart with new code (just like you would in a kubernetes pod, and in fact using kubernetes pods with BEAM languages is also a valid strategy). If you must keep some state preserved, there's even ways to do it without erlang's hot code reloading strategies, I would recommend watching Dan Azuma's fantastic video (stick around for the live demo): link to this video

pg_boton Hacker News • Recommends

On “Phoenix 1.4.0 released”

You can use Docker + containers with OTP, they are not mutually exclusive. Daniel Azuma gave a talk at the most recent Elixirconf about this subject.0 0: link to this video

dnauticson Hacker News • Recommends

On “An Introduction to Conflict-Free Replicated Data Types”

In the elixir community CRDTs are well known for various HA; AP distributed state strategies, Phoenix Presence uses CRDTs to track processes and broadcast them over pubsub channels. This makes it trivial to represent "user state" in chat rooms, Sophie DiBenedetto describes using it for writing a trivial chat app: link For something a bit wilder, you can track your state machines across a distributed cluster and be able to pass and preserve state across the cluster using CRDTs, as is done in Dan Azuma's (live) demo of a tank game: link to this video (worth it for the demo at 29m)

h0l0cubeon Hacker News • Recommends

On “An animated introduction to Elixir”

> you should store the state in the external system It's an old talk, but this one has a strategy for robustly persisting state across ephemeral containers. The example here is running a multiplayer game server while doing code updates etc. using Horde and CRDTs link to this video

u/dnauticsin r/elixir • Mentions

On “Choosing between Akka and Elixir”

…sks, which are implemented as actors under the hood in the BEAM (and honestly async-as-wrapped-by-actors is probably the best choice in the bestiary of async strategies, just as "webserver-wrapped-in-actors" is the best choice in the bestiary of webserver strategies ;-) If you want to get philosophical about it, I strongly recommend this video: [video which is by Gary Bernhardt (of WAT fame) which outlines, from years of experience, what are best practices around state and why state is hard problem. The video precedes Elixir by about 2 years but it's almost as if Elixir was built around the precepts of it. \> hot-code swap You probably don't need this, the use case (on-metal deploymen…

u/broziumin r/elixir • Mentions

On “Is it (somewhat) redundant to use Kubernetes and Elixir together?”

Couple of talks that I watched on this topic which might be useful for you: link to this video link to this video

u/flummox1234in r/elixir • Mentions

On “Scaling beyond a single container and where does it leave elixir”

This was a pretty good talk about these concepts. link to this video

u/lekkerwafelin r/elixir • Mentions

On “What do you think of my Elixir promo document?”

Moreover you can use something like libcluster. This is a great talk about Docker but also touches on K8s integrations: link to this video

throwawaymathson Hacker News • Mentions

On “A LiveView Is a Process”

…erant to client or client connection failures, you should design to be able to repopulate state sanely in the on_mount call. If you want some sort of ephermal network state that lives on one node and not the database only (e.g. a game), the liveview should connect into that. If you want to store that in a genserver, a strategy like this is doable: link to this video…

u/OneOlCrustySockin r/elixir • Mentions

On “Can you hot reload a Phoenix app running inside a Docker container?”

Daniel Azuma gave a really great talk about using Elixir in Docker last year at ElixirConf. link to this video

u/ZFLloydin r/elixir • Mentions

On “We love Erlang, Elixir and....dogs!!!”

[video This talk comes to mind, but combining the two doesn't seem trivial for stateful apps ( which is the problem tackled in this talk).

u/taelorin r/elixir • Mentions

On “How to mitigate a long restart in production?”

link to this video

u/ExasperatedLadybugin r/elixir • Mentions

On “Is Docker not used as much with Phoenix Liveview stack as other stacks? If so, why?”

Here's a great talk on the subject: link to this video

u/lovebesin r/elixir • Mentions

On “Distributed Elixir made easy with Spawn”

We use Horde and eventually would use DeltaCRDT to sync up the state. This is imho the solution for using concurrency side of Elixir in distributed BEAM managed under Kubernetes. See: link to this video

u/Beginning_Frosting_8in r/elixir • Mentions

On “Any app tutorials using Oban?”

We use Horde at my current job, it works flawlessly. I recommend watching this video to see it in action: link to this video The video goes about state-handoff, but is equally useful for what we are talking about now.