Discussion about uses for Agent Processes

Yes absolutely! That is how my GenServer’s often are. The code that operates over the data and returns new data is elsewhere, the GenServer itself just handles the synchronization and messages to call the right commands and hold the state. :slight_smile:

EDIT: Just keep this in mind, the fundamental unit of Code Organization is not a Process on the BEAM, it is a Module. You should always jump to a new Module first and pass data around instead of a process until you really need a process, like for concurrency or so. :slight_smile:

9 Likes