manhvu
I try to make new supervisor for developer can easy to add & manage processes.
For current supervisors, that is based on OTP & suitable for telecom application and need to think too much for design.
I made a all in one & flat supervisor for newbies can jump and use easily.
Basic idea in here is separated process follow group/chain/standalone.
Support for add all processes from config or by runtime.
Supervisor now can work in basic, you can get it from hex.pm or access source code from Github.com
Basic example:
# Start a supervisor with 2 partitions & 2 groups:
alias SuperWorker.Supervisor, as: Sup
# Config for supervisor
opts = [id: :sup1, number_of_partitions: 2, link: false]
# Start supervisor
Sup.start(opts)
# Add group in runtime, you also can add group in config.
Sup.add_group(:sup1, [id: :group1, restart_strategy: :one_for_all])
Sup.add_group_worker(:sup1, :group1, {Dev, :task, [15]}, [id: :g1_1])
Sup.add_group(:sup1, [id: :group2, restart_strategy: :one_for_one])
Sup.add_group_worker(:sup1, :group2, fn ->
receice do
msg ->
:ok
end
end, [id: :g2_2])
I’m still working on this and update more details in later!
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
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 all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #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
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
asianfilm
All I’m gonna say is that you missed the golden opportunity of creating a library called ÜberWorker.
manhvu
Do you have a link of that library?
asianfilm
Sorry. I mean if you dodge lawsuits and Hex can manage umlauts, it would be a cooler name. I forget if it is Ruby that is particularly into puns when naming libraries/packages.
manhvu
oh, I think I named my library a long time ago when I start my project. Maybe another name is better for library. Thank you!
dimitarvp
This looks nice, thank you. I would use the chain workers but would be worried about lack of persistence i.e. if we have a chain of 5 steps and the app is restarted while step 3 is executing, I would want step 3 to begin executing anew after the app starts again.
I realize this is no longer a “normal” supervisor logic and goes into the territory of persistent job queues. I am sharing what I would find useful.
manhvu
Yes, persistence is lacked. I think in the future I will add a new feature to store state of chain to Ets table or external db.
The idea of supervisor came from my basic use cases and still have a lot of thinks to do.