bitwalker/swarm

Refactoring

Open

#101 建立於 2018年8月25日

在 GitHub 查看
 (3 留言) (0 反應) (1 負責人)Elixir (1,249 star) (109 fork)batch import
featurehelp wanted

描述

Swarm needs some refactoring to better support testing, configuration and to better integrate with other applications.

The biggest change that needs to occur is that we need to move Swarm away from a "singleton" application/process, which runs on boot, to a supervison tree that is added to a supervision tree, is namespaced, and joins with other members of a cluster that share that namespace. I already have a branch where I've done much of this work, but I'm probably going to rework it when #94 is merged.

In addition, I want to rewrite the tests to make use of ex_unit_clustered_case, and to run asynchronously.

In short:

  • Rework Swarm into a library application providing a supervision tree
  • Rather than a "singleton" process, require configuration which applies a namespace to the Swarm supervision tree, this allows us to still a priori know the process name on other nodes, but it allows running multiple swarms simultaneously - this is particularly useful in tests, but has practical applications as well.
  • Rework existing tests to use ex_unit_clustered_case

/cc @beardedeagle @arjan - since you two are the most active contributors, I'd love your feedback, and if you are interested in becoming committers so we can keep this project moving along at a nice clip, let me know!

貢獻者指南