Skip to content
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

Improve multi node support and control #8

Open
jbernardo95 opened this issue Oct 3, 2017 · 4 comments
Open

Improve multi node support and control #8

jbernardo95 opened this issue Oct 3, 2017 · 4 comments
Labels
Milestone

Comments

@jbernardo95
Copy link
Owner

Currently if cronex is started in multiple nodes, cron jobs will run several times in different nodes.

The desired behaviour is to have multiple cronex instances that coordinate between them which one should run the cron jobs.

@jbernardo95 jbernardo95 added the bug label Oct 3, 2017
@manuel-rubio
Copy link

@jbernardo95 in Erlang you can fix this using the distribution configuration for the kernel application. Actually you can use it in Elixir as well:

https://dockyard.com/blog/2016/01/28/running-elixir-and-phoenix-projects-on-a-cluster-of-nodes

And the configuration could be:

config :kernel,
  sync_nodes_mandatory: [:"node1@host", :"node2@host"],
  distributed: [{:cronex, [:"node1@host", :"node2@host"]}]

This way cronex will run only in one of the nodes. If the node where is running is turned off then the application is started in the other one.

@jbernardo95
Copy link
Owner Author

@manuel-rubio I didn't know about this.

Seems to be very nice way to handle this problem. I will definitely look into this.

Thank you !

@jbernardo95 jbernardo95 added this to the Version 0.5 milestone May 16, 2018
@pggalaviz
Copy link

Maybe multi node functionality can be improved with something like a CRDT?
This project looks really promising: https://github.com/derekkraan/delta_crdt_ex
Great explanation about it here.

@jbernardo95
Copy link
Owner Author

Thank you for the insight @pggalaviz ! Definitely something to look into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants