Erjulix

Connect Erlang, Julia and Elixir

Documentation for Erjulix.

Erjulix.EvalServerMethod
EvalServer(port::Integer, mod::Module, key::AbstractString)

An EvalServer runs as a task with its own module namespace. It receives UDP message tuples from Erlang:

  • (:eval, term): where term is a Symbol or a String,
  • (:call, term, args): with term as above and args a Vector{Any},
  • (:set, atoms, vals): where atoms is a Symbol or a vector of them and vals is a value Any or a vector of them.

It then evaluates the messages in its namespace as

  1. strings to parse or symbols to evaluate,
  2. functions to execute with arguments or
  3. variables to create or to assign values to.

It sends a result tuple back to the Erlang client.

The server finishes if it gets an "exit" or :exit message.

If !isempty(key), the UDP packages get sha-256 encoded/decoded with that key as JSON Web tokens.

source
Erjulix.eServerMethod
eServer(host::IPAddr, port::Integer, key::AbstractString)
eServer(port::Integer)

Create a module and spawn an EvalServer listening to an UDP port in its namespace and return the module.

source
Erjulix.pServerMethod
pServer(port::Integer)
pServer(host::IPAddr, port::Integer, key::AbstractString)

Start a server listening to an UDP port and starting parallel EvalServers if requested.

source