I am looking to create an application which can be extended by adding plugins made by other people e.g a wordpress like plugin architecture, where you import a zip file and features are added.
Is there a way we could do this in Elixir Phoenix stack. My idea is to import some zipped beam files and Elixir can load these dynamically. Is it even possible ? If it is can someone give me a little hint how to begin with it ?
In theory it’s possible, just drop the modules BEAM files somewhere into the load path, you can even add or remove entries to the path during runtime, though I don’t remember the function names.
Though this will only make the BEAM able to find the modules, your application will not know about them. It’s still up to you to define the interface and discovery mechanisms.