hugolnx
Hey!
I created a simple project using GenStage only to study more deeply how the processes comunicate with each other. Instead of using the default erlang tracer, I implemented a prettier tracer and also added some extra logging stuff, that help me understand better how the stages behave with different max_demand and min_demand configurations.
The Stages
[Stock] ----------> [Chef] ------------> [Checkout] >>>>>>>>> Checkout.Task
A example of the tracing logs
15:50.768 trace: :chef => :stock {:subscribe, nil, [min_demand: 3, max_demand: 5]}
15:50.768 trace: :chef => :stock {:ask, 5}
15:50.769 trace: :checkout => :chef {:subscribe, nil, [min_demand: 0, max_demand: 2]}
15:50.769 trace: :checkout => :chef {:ask, 2}
15:52.031 trace: :stock => :chef {:snt, 5}
15:53.037 trace: :chef => :checkout {:snt, 2}
15:53.038 trace: :chef => :stock {:ask, 2}
15:53.039 trace: :checkout => {:task, #PID<0.255.0>} :acai1029
15:53.039 trace: :checkout => {:task, #PID<0.256.0>} :acai1093
15:53.543 trace: :stock => :chef {:snt, 2}
15:54.039 trace: :checkout => :chef {:ask, 1}
...
Repository: https://github.com/HugoLnx/acai-restaurant
Hope it help. ![]()
PS.: I created a few issues with some ideas.
Trending in Guides/Tuts
# ~/src/livebook/.iex.exs
System.cmd("xdg-open", [ LivebookWeb.Endpoint.access_url() ] )
Because Livebook requires a unique passcode on ...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










