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

write documentation #1

Open
uwiger opened this issue Feb 5, 2010 · 5 comments
Open

write documentation #1

uwiger opened this issue Feb 5, 2010 · 5 comments

Comments

@uwiger
Copy link
Owner

uwiger commented Feb 5, 2010

No description provided.

uwiger added a commit that referenced this issue Jan 22, 2012
Small Makefile modifications
@phedders
Copy link

I'd be delighted to see some notes or even documentation on how to use unsplit with ejabberd to automatically resolv network splits.

With ejabberd I normally dont mind losing a little info if it means I can maintain a coherent cluster - and users on all nodes can continue to communicate with each other.

@joudinet
Copy link

Hi, I'm new to Erlang and Mnesia but I have set up a cluster of 3 ejabberd XMPP servers. In my context, these 3 servers are suppose to encounter netsplits quite often. That's why I'm very interested in your framework. I'd like to give it a try but I have no idea how to install it. Could you provide me a simple step-by-step instructions? Thanks.

@uwiger
Copy link
Owner Author

uwiger commented Feb 10, 2014

Can't say that the documentation is stellar, but:

... and the README.md

There is also some detail in http://www.erlang-factory.com/upload/presentations/286/MnesiaEFLondon2010.pdf

That is, in order to use unsplit, just make sure it's started. Then, add an 'unsplit_method' user property for tables that you want to be able to merge.

For example:

mnesia:create_table(
        test,[{ram_copies,[n1@debian,n2@debian]},
              {attributes,record_info(fields, test)},
              {user_properties,
               [{unsplit_method {unsplit_lib,vclock, [#test.vclock]}}]
             ]).

@joudinet
Copy link

Thanks for the links. It does help me but how can I add an 'unsplit_method' to an existing table? The tables are created by ejabberd and I would like to add the user_properties field to these tables, without having to modify ejabberd source code so it does it when creating the tables.

Alternative question: Since I plan to use the same method for every table, how can I set the default method as mention in the README.md:
{default_method, {Module, Function, ExtraArgs}}

@uwiger
Copy link
Owner Author

uwiger commented Feb 17, 2014

I discovered that the functions mnesia:add_table_property/2, mnesia:read_table_property/1 and mnesia:delete_table_property/1 aren't documented. Too bad. They are the ones you should use.

E.g. mnesia:add_table_property(test, {unsplit_method, {unsplit_lib,vclock,[#test.vclock]}})

The default method can be set via an unsplit application environment variable, default_method, e.g.:

  {default_method, {unsplit_lib, vclock, [vclock]}}

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

No branches or pull requests

3 participants