Genstage in theory
Thomas Depierre
@DianaO
Diana Olympos
Twitter :
Github :
Number of tasks in the system
Arrival rate
Average time spent in the system
A queue is a buffer
It distributes load and/or smooth load
Queues tend to be used to introduce asynchronicity to a synchronous system...
But that generate a problem : how do you handle pathological load ?
Backpressure
Load-shedding
I am not going to talk about load-shedding, but it is an interesting area
Wait what if...
Producer
Consumer
Consumer
Consumer
Consumer side
handle_events(events, from, state)
Producer side
handle_demand(demand, state)
Data flow
GenStage.async_subscribe(stage, opts)
GenStage.sync_subscribe(stage, opts, timeout \\ 5000)
Producer
Consumer
Consumer
Consumer
Producer
ConsumerProducer
Consumer
Consumer
ConsumerProducer
ConsumerProducer
Only make sense if you need different workload behaviour...
Producer
ConsumerSupervisor
Consumer
Consumer
Stay for more on that subject with Evadne.