Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Update README.md #21

Closed
wants to merge 1 commit into from
Closed

Update README.md #21

wants to merge 1 commit into from

Conversation

ruanpienaar
Copy link

Simplify mnesia cluster demo

@michalslaski
Copy link
Member

Please add $ ./erlangpl --node a@127.0.0.1 --cookie mnesia_cluster to your example, so that the right cookie is used to observe the cluster.

@ruanpienaar
Copy link
Author

@michalslaski - Do you approve Sensei? ;)

Copy link
Member

@michalslaski michalslaski left a 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
Copy link
Member

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'

@ruanpienaar
Copy link
Author

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:
Copy link
Member

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

Copy link
Author

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
Copy link
Member

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?

Copy link
Author

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

@baransu baransu modified the milestones: 0.6, 0.7 Apr 6, 2017
baransu added a commit that referenced this pull request Apr 10, 2017
@baransu baransu removed this from the 0.7 milestone Apr 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants