-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
Please add |
@michalslaski - Do you approve Sensei? ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the issue that may cause the "failed to connect to remote node 'a@127.0.0.1'" error and you will be awarded the Shodan rank.
README.md
Outdated
@@ -56,6 +56,7 @@ You can generate messages between nodes by querying a distributed database Mnesi | |||
|
|||
To setup a Mnesia cluster, start several Erlang nodes with unique names e.g. `a@`, `b@`, `c@`, etc. and start the database on all of them: | |||
``` | |||
$ ./erlangpl --node a@127.0.0.1 --cookie mnesia_cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this line, because if you try to start the ./erlangpl script before starting the a@ node, it fails with ERROR: failed to connect to remote node 'a@127.0.0.1'
Ok- improved it once more, at a slower pace this time 🥇 |
$ $ ./erlangpl --node a@127.0.0.1 --cookie mnesia_cluster | ||
``` | ||
|
||
Here's some mnesia activities to add some information the performance lab dashboard: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please improve grammar in this sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes- i missed *on
on the
``` | ||
[begin mnesia:transaction(fun() -> mnesia:write({test_table, Key, "value"}) end), timer:sleep(10) end || Key <- lists:seq(1,2000)]. | ||
[begin mnesia:sync_dirty(fun() -> mnesia:write({test_table, Key, "value"}) end), timer:sleep(10) end || Key <- lists:seq(1,2000)]. | ||
[begin mnesia:dirty_write({test_table, Key, "value"}), timer:sleep(10) end || Key <- lists:seq(1,2000)]. | ||
``` | ||
|
||
Stopping the demo mnesia cluster: | ||
``` | ||
ps aux | grep "[a|b|c|d]@127.0.0.1" | awk '{ print $2 }' | xargs kill |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it work on Windows too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's within a virtualbox running NIX on windows :)
Adding some notes for the windows users might be helpful.
Even starting it would be a lot different, you'd need to change Target on a shortcut of werl.erl/erl.exe to run with -sname and -cookie. make a issue, ( Add windows demo HOW-TO ) and then i can assist writing some docs
Simplify mnesia cluster demo