bitwalker/swarm

Refactoring

Open

#101 aberto em 25 de ago. de 2018

Ver no GitHub
 (3 comments) (0 reactions) (1 assignee)Elixir (109 forks)batch import
featurehelp wanted

Métricas do repositório

Stars
 (1.249 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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!

Guia do colaborador