Тёмный

Virtual BEAM Meetup GMT, August 19 - Saša Jurić - Parenting Children 

Erlang Solutions
Подписаться 18 тыс.
Просмотров 2,5 тыс.
50% 1

Join our Meetup group at www.meetup.com/erlangusergroup
Upcoming virtual conferences: Code BEAM V - codesync.global/conferences/c...
ElixirConf EU Virtual -
www.elixirconf.eu/
Code Mesh V -
codesync.global/conferences/c...
Saša Jurić, Author of Elixir in Action hosted the talk at this month's Meetup.
Abstract
In a supervision tree, non-terminal (parent) nodes should usually be supervisors, while leaf nodes are workers powered by behaviours such as GenServer. However, it occasionally makes sense to run child processes directly under a worker process. In this talk, we'll examine a couple of such scenarios, and discuss the mechanics of manual parenting of child processes. Finally we'll look at an Elixir library called Parent, which can help simplifying the task of manual process parenting.
Bio
Saša is a freelancer helping companies with the adoption of Elixir. He has many years of experience building server systems, as well as desktop applications using various languages and technologies. For the past nine years, his focus has been on building backend systems using Elixir and Erlang. He is the author of "Elixir in Action", and an occasional blogger at theerlangelist.com.

Наука

Опубликовано:

 

1 сен 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@noozo
@noozo 3 года назад
"Being the author of parent makes me officially a grandparent" xD
@adam.millerchip
@adam.millerchip 3 года назад
Great talk. I will definitely have to come back to this and look at the examples again. I could probably work this out by reading the Parent docs and trying it out, but for the benefit of others thinking the same thing: how does this differ from Task.Supervisor?
@sasajuric5850
@sasajuric5850 3 года назад
Task.Supervisor, like any other supervisor is "non-interactive", which means you can't perform custom logic inside the supervisor process. If, for example, you want to run some custom logic when the task terminates, you'll need another process (probably GenServer) which monitors the task. This is basically the query manager/runner example from the talk. With `Parent.GenServer` you can perform both, parenting and the custom logic, inside the same process.
@adam.millerchip
@adam.millerchip 3 года назад
@@sasajuric5850 Great, thanks.
@unknownsingerofficial4964
@unknownsingerofficial4964 3 года назад
@@sasajuric5850 will u provide any ur premium course ?
@annamiller8441
@annamiller8441 3 года назад
Have you noticed this page ?!, Thanks for the note! You can also check www.google.com
Далее
Virtual BEAM Meetup GMT, July 29 - Clojerl on the BEAM!
47:03
СОБАКИ ГОЛОДАЮТ ИЗ-ЗА ЛЕРЫ 🥲
01:00
80 Year Olds Share Advice for Younger Self
12:22
Просмотров 1,4 млн
iPhone 15 Pro в реальной жизни
24:07
Просмотров 432 тыс.