-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of How to Start Children like a Regular Supervisor #268
Comments
@derekkraan, would it be possible to add this feature to Horde, similar to what you did in Highlander? |
Is there a reason to not just use Highlander in this situation? It is what I would recommend in any case. |
@derekkraan It seems that Highlander doesn’t rebalance or distribute processes across the cluster; it only ensures that a process will run on a single node and, if the process dies, brings it back up. I’m not sure if Horde was designed for this purpose, but we observe that services are well-distributed across the cluster. In my case, I'm using Broadway with RabbitMQ, and I need to have only one instance of Broadway running across the entire cluster. I have a few workflows with this limitation. Using Highlander, it seems they are spawned only on a single node. Maybe I'm doing something wrong, and this could be achieved with Highlander... |
Aha, I see what you are getting at now. Highlander does not indeed solve this use case. Horde can do it, but only with a little bit of hacking, since DynamicSupervisor was meant for dynamic children, not static ones. I would not call it a durable solution however.
So actually it wasn't, although I understand why you want this. |
Do you have any suggestions on how we can achieve this behavior? |
I unfortunately don't have any suggestions at this point in time. You could continue to use Horde like you are right now. I will think about providing something to solve for this problem in HordePro. If you would be interested in beta testing that, you can sign up for the beta here. |
@derekkraan, is this the correct way to start workers with the application? I was wondering if there is a better approach to initiate some jobs and automatically restart these jobs if they crash.
If so, can I add this to the documentation?
application.ex
supervisor.ex
I've made this inspired in this test:
horde/test/nested_supervision_test.exs
Lines 29 to 46 in 065ffd4
The text was updated successfully, but these errors were encountered: