beardedeagle / mnesiac

Mnesia autoclustering made easy!
MIT License
130 stars 21 forks source link

Replication factor #9

Open madshargreave opened 5 years ago

madshargreave commented 5 years ago

Would it be possible to add a replication factor? Ie. only replicate this table on N nodes in the entire cluseter

beardedeagle commented 5 years ago

Like at random or do you want to control where they land?

beardedeagle commented 5 years ago

I am thinking of these two scenarios:

And I think I have an idea of how to implement both in one go.

madshargreave commented 5 years ago

Exactly the above :)

beardedeagle commented 5 years ago

@madshargreave I've been thinking about this some more and I'm unsure if I want this table to only exist on these specific nodes is a concern of the library. I say this for a couple of reasons:

Now I could still be convinced of this if the usecase makes sense, but as of the moment I don't think it's a concern of Mnesiac.

I want this table to only exist in N nodes has some use, though this type of check would only happen at startup.

beardedeagle commented 5 years ago

I've begun work on this in the replication_factor branch for at least a partial implementation of this request.

beardedeagle commented 5 years ago

as a heads up, @astutecat suggested also adding a 3rd option for replicating by percentage, so:

beardedeagle commented 5 years ago

Sorry, I've been away for some time. I'm getting back to this. Apologies for the inconvenience.

beardedeagle commented 2 years ago

I'm hoping to have #53, which this is part of by EOY