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

Channel:ElixirConf · Length:38:53 · Published:2018-09-07 · Views:16321

Watch on YouTube

Summary

Daniel Azuma's ElixirConf 2018 talk on whether Docker and OTP conflict. He shows they can coexist and uses Horde and DeltaCrdt, with a live tank-game demo, to keep state alive across container kills.

Why HN recommends it

Recommended for its practical strategy for preserving state on ephemeral containers, and for the live demo.

I would recommend watching Dan Azuma's fantastic video (stick around for the live demo) — HN, 2020

Functional programming · Distributed systems · Cloud, DevOps & reliability

Subtitles (excerpt)

[Music] so this is us the session is docker and OTP friends or foes my name is Daniela Zuma it started great a few years ago back in 2015 I think it was I got together with a few friends of mine we were from a local meetup group as a ruby meetup and we were learning a lick sir together and so we did a little project as part of our just kind of getting some practice with elixir I wanted to show you some of that really quick so let me get out of here and let's see if I can do this okay this project is actually a Google game as you can see it's a tank game it's its online multiplayer I've got so one of my colleagues on online with me and you've run around this maze and shoot down your opponent's tanks so we're gonna come down here and try to kill each other here and we both died but as you can see it's online it's multiplayer and it's real-time and so we wrote this in the lick sir and there we go so when we wrote this we kind of made a few design decisions I'm going to set this back here we've made a few design decisions and one of the key decisions we made was the game state and the logic was going to be implemented server-side so we implemented it all in elixir and the client-side JavaScript that you see here is

On Hacker News

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 de… — dnautics, 2020-02
Horde is indeed a really interesting Elixir library. It's based on the CRDT library, DeltaCrdt [0], also by Derek Kraan. He discusses DeltaCrdt here [1] and Horde here [2]. BTW, Horde is a distributed supervisor, i.e. analogous to what regular Elixir OTP supervisors do, except that it can restart processes on different cluster nodes. It also provides a distributed process registry. Daniel Azuma o… — qohen, 2019-11
> 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 [VIDEO] — h0l0cube, 2022-11
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 distri… — dnautics, 2020-07
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]: [VIDEO] — pg_bot, 2018-11

Related videos