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

Ets cluster view #63

Merged
merged 48 commits into from
Jun 21, 2017
Merged

Ets cluster view #63

merged 48 commits into from
Jun 21, 2017

Conversation

mkacper
Copy link
Contributor

@mkacper mkacper commented Jun 21, 2017

This PR introduces ETS cluster view. It appears as a new tab in the web UI. The view shows all nodes in the cluster with basic infromation about ETS tables on a particular node.

mkacper added 30 commits May 20, 2017 13:31
Create the skeleton of an OTP application.
  - add the epl_ets gen_server module which provides information
    about number of ets from observed node
  - modify main supervisor to start and supervise epl_ets module
  - start epl_ets gen_server, wait until epl app is started, then
    subscribe for epl
  - provide epl_json:encode/2 with correct args
  - improve code style
Add subscribe/0 and unsubscribe/0 to the epl_ets module to make
things easier.
Implement necessary callbacks in order to send received ets info
throught websocket.
Establish websocket connection between the epl and a web browser
and present basic ets information through the browser.
Provide docs and specs for paritcular modules and their public API
functions.
…5bff'

git-subtree-dir: apps/epl_ets
git-subtree-mainline: 740c3bc
git-subtree-split: f5d9b08
Create new epl-ets plugin which is a clone of the existing
epl-vizceral one.
Modify epl-ets ui plugin to render nodes with information about
ETS count and ETS memory usage on them.
Move and export some useful functions from epl_traffic module to
epl_viz_map module. It provides public API for creating and
manipulating Vizceral map data structure.
  - create epl_ets_viz_map module which provides API for
    manipulating Vizceral map in terms of ETS data.
  - modify epl_ets module to prepare proper Vizceral map.
Refactor some functions; add specs and docs.
mkacper added 12 commits May 30, 2017 15:09
  - modify epl_viz_map module
  - add spec and docs
  - change license
  - change functions calls in epl_ets module
  - export push_additional_node_info/2
  - modify epl_ets module in order to dynamicly create Vizceral
    data structure for multiple nodes
  - move common functions from epl_traffic to epl_viz_map
  - export common fuction from epl module
  - periodically check state of the observed nodes (handle_info)
  - add functions for removing outdated records in Vizceral map
  - export needed function from epl_viz_map module
  - improve code style
  - change vizceral configuartion in epl-ets React plugin
  - add additional data structure to Vizceral map
  - tidy ets related data in Vizceral map
Thanks to this change Traffic view and ETS view do not interfere
with each other.

get_ets_basic_info(Node) ->
ETSCount = get_all_ets_count(Node),
ETSMemUsage = get_ets_mem_usage(Node),
Copy link
Contributor Author

@mkacper mkacper Jun 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of calling erlang:memory/0 through epl_tracer:command(), change epl_tracer:handle_info() so that it collects all memory statistics.

@baransu
Copy link
Contributor

baransu commented Jun 21, 2017

@mkacper I've conected two nodes together with net_kernel:connect('a@127.0.0.1'). (and connect_node) but erlangpl shows warrning in console:

=WARNING REPORT==== 21-Jun-2017::14:54:47 ===
global: 'erlangpl@127.0.0.1' failed to connect to 'a@127.0.0.1'

Why can be that? Am I doing something wrong?

EDIT: They are perfectly connected within /traffic view.

@baransu
Copy link
Contributor

baransu commented Jun 21, 2017

It's not related to this PR but previously we were displaying erlangpl node only in development mode but after release it wasn't part of the cluster. Did something changed in this matter?

@baransu baransu added this to the 0.7 milestone Jun 21, 2017
@mkacper
Copy link
Contributor Author

mkacper commented Jun 21, 2017

@baransu This warning is normal :) I haven't figured out yet why it is showed. What does the /ets view show in your browser? I've followed the steps you described and ets cluster view seems to work fine.

Here is the proper view:
epl_ets_cluster_view

When it comes to displaying erlangpl node in the cluster view in /traffic section I have not changed a way of creating Vizceral map for \traffic view. I've made a release from master branch and erlangpl node is also displayed in /traffic view. Asking your question - I haven't got a clue if somethig changed in this matter or not.

Thanks for your engagement! :)

EDIT: Something is wrong with ets cluster view when erlangpl is started from script. I will try to fix it.

@baransu
Copy link
Contributor

baransu commented Jun 21, 2017

I have 3 nodes in cluster. Every one connected with net_kernel:connect(node).

  • /ets view

screen shot 2017-06-21 at 16 06 46

  • /traffic view

screen shot 2017-06-21 at 16 06 37

  • terminal

screen shot 2017-06-21 at 16 08 30

@mkacper
Copy link
Contributor Author

mkacper commented Jun 21, 2017

Thanks for point the issue :) As I said in the previous comment something goes wrong when erlangpl is started from erlangpl script. I am working on it right now.

@baransu
Copy link
Contributor

baransu commented Jun 21, 2017

Sorry, I didn't saw your edit.
Also, did you managed to fix with switching between etc and traffic view?

@mkacper
Copy link
Contributor Author

mkacper commented Jun 21, 2017

@baransu

did you managed to fix with switching between etc and traffic view?

Yes, I did. It seems to work nice :)

Please try the \ets view now. Does it work correctly?

Make necessary changes to make it work.
@michalslaski michalslaski merged commit 28d507f into erlanglab:master Jun 21, 2017
@mkacper mkacper deleted the ets-cluster-view branch June 22, 2017 11:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants