EMx 075: Live View Implementation With Jeff Kreeftmeijer
Jeff Kreeftmeijer works at Appsignal where they create a tool for application monitoring that works in Ruby and Elixir. He works specifically with integrations focusing in Elixir and also writes articles for their Elixir and Ruby newsletters. Jeff started as a Ruby programmer but had an interest in functional programming which lead him to gain an interest in Elixir. When he started at Appsignal they were already considering an Elixir integration and that made it a perfect fit.
Jeff then shares more details about his involvement in Appsignal’s two newsletters called Ruby magic and Elixir alchemy, both of which are aimed at more experienced programmers. He also details his experience with articles that he wrote on Live Share and how he came to write them. The panelists also introduce the Go game that is written about in these articles.
The panelists then discuss how Jeff maintains the game state. In the first version of the implementation he keeps it in the Live View process and when he implemented multiplayer he had to move the game state to a GenServer. He also shares some of the details of why using a GenServer is necessary for multiplayer. Jeff is then asked what his experience was like using a dynamic supervisor and he shares the technical ideas of how this helped him in the project.
Next the conversation moves to how the game is able to communicate moves between players to each other. The issue with connecting two sessions to the same Live View is that one player won’t be updated if the other makes a move. Jeff details how using a Pub/Sub helps to overcome this issue. The panelists also discuss ideas of how the game could be implemented in a multi server instance.
Jeff shares how his article series still has many more installments that can come out, specifically citing that they haven’t even covered assigning player connections with different player callers. This kind of functionality would handle the assignment of which players controlled which pieces. Jeff closes with highlighting the convenience that comes from using the libraries that they are using as they natively come with technologies they find helpful for building out an interactive, collaborative project.
Lastly, the panelists discuss what Jeff is currently doing to work more with these same technologies. Jeff shares that he has a side project where he tries to build a fish tank with artificial intelligence and how he uses Live View for this project.
- Mark Ericksen
- Eric Oestrich
- Josh Adams
- Michael Ries
- Jeff Kreeftmeijer
- Sentry.io use code “devchat” for two months free.
- ElixirCasts | Get 10% off with the promo code "elixirmix"
- Live View article
- Computers and Go
- Building the Go Game in Elixir: Time Travel and the Ko Rule
- Multiplayer Go with Elixir’s Registry, PubSub and Dynamic Supervisors
- Dynamic Supervisor
- Hayago Github
- Functional Web Development With Elixir, OTP, and Phoenix
- Terminal Asciiquarium
- The NeuroEvolution of Augmenting Topologies User Page
- The NeuroEvolution of Augmenting Topologies
- Jeff Kreeftmeijer Twitter
- Jeff Kreeftmeijer.com
What is Live View?
Live View is a library that leverages server rendered HTML.
What is a GenServer?
A GenServer is an Elixir process that can be used to keep state.
What is a Pub/Sub?
Pub/Sub is short for publish/subscribe and is a messaging pattern that publishes messages to a topic rather than sending them directly to receivers.
What is a Dynamic Superviser
A supervisor is a process that supervises other processes. A dynamic superviser starts with no children and they are created on demand.