erlanglab / erlangpl

Tool for developers working with systems running on the Erlang VM (BEAM). It helps with performance analysis.
http://www.erlang.pl/
Apache License 2.0
546 stars 40 forks source link

Make the plugins Erlang/Elixir applications #28

Open mentels opened 7 years ago

mentels commented 7 years ago

Are there any advantages by treating *EPL.beam files as plugins over making plugins valid Elixir/Erlang applications? The web socket handlers could be configured via the config file.

michalslaski commented 7 years ago

*EPL.beam allows us to automatically configure cowboy routes and automatically register in the UI.

How do you suggest to address these?

arkgil commented 7 years ago

Each plugin could configure its application environment (e.g. via env tuple in .app file), and point us to websocket handler.

mentels commented 7 years ago

Exactly, that was my idea.

Have a look at erl_cowboy and how it's being used in dobby_rest. If I understand the problem correctly, you could have tuples like {"/path/to/my_resource", handle_module} passed to the Erl/Ex application env either through the .app file or .config files (mix.exs or config/*.exs files respectively for Elixir).

arkgil commented 7 years ago

I think it's related to both #27 and #26 .