Processes / Concurrency
As easy as
spawn
to runs code specified at undefined time each with a process_idOnly communication is messages between processes
Supervisors often linked to processes and will restart on failure
Agent - Simple wrappers around genserver for state.
GenServer - “Generic servers” (processes) that encapsulate state, provide sync and async calls, support code reloading, and more. For ongoing background work
Task - Asynchronous units of computation that allow spawning a process and potentially retrieving its result at a later time.
DynamicSupervisors - Allow you to dynamically create and restart/supervise agents/genservers like if you need to spin one up per user or event
Registry - Allow strings to map to processes(instead of just atoms)
Spawn
Message Passing
messages are only one way, so if want response need to recieve
Messages will be put in process mailbox for future use
Process Investigate
Look at livedashboard or erlang observer or
Process Monitor
Last updated