Ex_loader: Load a release to a remote node for distributed erlang

Hi folks,

I’m pleased to announce ex_loader. ex_loader provide high-level API to load a module (beam), a list of apps, or a release to a remote node in the cluster. The idea behind ex_loader is that we want to dynamically create dummy worker nodes (e.g. bring up spot instances in AWS), and then load the code we want the worker nodes to execute.


load a release to a node called :"test-node@hostname". Say example_complex_app.tar.gz.
:ok = ExLoader.load_release("example_complex_app.tar.gz", :"test-node@hostname")

# all applications in this release are started in node :"test-node@hostname". The configuration ``sys.config`` in the release will be honored and loaded with ``Application.put_env`` so that you don't need to worry about configuration. If the release depends on environment variable, please set them before loading the release.
# you can interact with the functionality provided by the release now. Let's assume it contains an API server which handles the request to http://hostname:8888/hello/?msg=xxx.
{:ok, %HTTPoison.Response{body: "hello world"}} = HttpPoison.get("http://hostname:8888/hello/?msg=world")

Let me know what you thought. Any suggestions, criticism, ideas welcome!



Heh, that looks quite useful on initial glance, I tend to do similar things by pushing applications across nodes on demand for a couple of fun cases I do. :slight_smile:

Good idea. Missed this post earlier and am looking forward to try this out