All Projects → Tubitv → ex_loader

Tubitv / ex_loader

Licence: MIT license
Load a single beam file, apps (a set of beams), or an erlang release (a set of apps) to a node.

Programming Languages

elixir
2628 projects
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to ex loader

sizeof-loader
Webpack loader that works like url-loader (or file-loader) but with extracted information such as image dimensions and file-size.
Stars: ✭ 20 (+66.67%)
Mutual labels:  loader
importtool
General data import tool for IgorPro
Stars: ✭ 19 (+58.33%)
Mutual labels:  loader
minerva
Elixir framework for easily writing koans.
Stars: ✭ 13 (+8.33%)
Mutual labels:  elixir-library
Fileloader
A library for managing file downloads on the Android platform
Stars: ✭ 27 (+125%)
Mutual labels:  loader
icon-maker-loader
Webpack loader to use icon font, easiest solution!
Stars: ✭ 16 (+33.33%)
Mutual labels:  loader
permission ex
No description or website provided.
Stars: ✭ 23 (+91.67%)
Mutual labels:  elixir-library
fat ecto
Query mechanism for Ecto
Stars: ✭ 20 (+66.67%)
Mutual labels:  elixir-library
gdmod
A mod loader and modding API for GDevelop games.
Stars: ✭ 15 (+25%)
Mutual labels:  loader
jsx-compress-loader
⚛️JSX optimisation loader to reduce size of React application
Stars: ✭ 40 (+233.33%)
Mutual labels:  loader
favloader
Vanilla JavaScript library for loading animation in favicon (favicon loader)
Stars: ✭ 20 (+66.67%)
Mutual labels:  loader
sftp client
An Elixir SFTP Client that wraps Erlang's ssh and ssh_sftp.
Stars: ✭ 29 (+141.67%)
Mutual labels:  elixir-library
loading
Laravel package to add loading indicator to pages while page is loading.
Stars: ✭ 38 (+216.67%)
Mutual labels:  loader
libsalty
Elixir bindings for libsodium (NIF)
Stars: ✭ 20 (+66.67%)
Mutual labels:  elixir-library
vkel
Simple Dynamic Vulkan Extension Loader
Stars: ✭ 39 (+225%)
Mutual labels:  loader
elfloader
ARMv7M ELF loader
Stars: ✭ 71 (+491.67%)
Mutual labels:  loader
phaser-manifest-loader
Phaser Manifest Loader
Stars: ✭ 28 (+133.33%)
Mutual labels:  loader
image-minimizer-webpack-plugin
Webpack loader and plugin to compress images using imagemin
Stars: ✭ 180 (+1400%)
Mutual labels:  loader
spinners-angular
Lightweight SVG/CSS spinners for Angular
Stars: ✭ 21 (+75%)
Mutual labels:  loader
director
Director is a production-ready supervisor and manager for Erlang/Elixir processes that focuses on speed, performance and flexibility.
Stars: ✭ 62 (+416.67%)
Mutual labels:  elixir-library
ngx-translate-module-loader
Highly configurable and flexible translations loader for @ngx-translate/core
Stars: ✭ 31 (+158.33%)
Mutual labels:  loader

ExLoader

Load a single beam file, an app (a set of beams), or an erlang release (a set of apps) to a remote node. It is useful for distribute the binary to dynamically created remote node.

Things to do:

  • load sys.config to remote node
  • better error logging if remote node failed to load modules or apps
  • support upgrade release

Installation

ex_loader is available in hex, it can be installed by adding ex_loader to your list of dependencies in mix.exs:

def deps do
  [{:ex_loader, "~> 0.3.0"}]
end

Usage

After adding ex_loader as a dependency, you can easily call the following API:

# load a single module to a remote node, say "hello.beam" provide a func called ``say(msg)``
{:ok, module} = ExLoader.load_module("hello.beam", :"test-node@hostname")

# then the module is available. You can access it in remote node, or call it with RPC.
"hello world" = :rpc.call(:"test-node@hostname", module, :say, ["hello world"])

# load a list of apps from a release (generated by distillery). Say example_app.tar.gz contains an app called :example_app.
:ok = ExLoader.load_apps("example_app.tar.gz", [:example_app], :"test-node@hostname")

# now :example_app is started in :"test-node@hostname" (dependencies are resolved automatically). Let's assume this app will automatically start a GenServer called ExampleApp.Server, and it has a function ``hello(msg)``.
"hello world" = :rpc.call(:"test-node@hostname", ExampleApp.Server, :hello, ["world"])

# load a release. 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")

Full documentation can be found at https://hexdocs.pm/ex_loader.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].