Erjulix
Connect Erlang, Julia and Elixir
Documentation for Erjulix.
Erjulix.ErjulixErjulix.EvalServerErjulix.deserializekErjulix.eServerErjulix.genpasswdErjulix.getHostPortErjulix.getPortErjulix.pServerErjulix.serializek
Erjulix.Erjulix — ModuleErjulixJulia module for communicating with Erlang and Elixir.
Erjulix.EvalServer — MethodEvalServer(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): wheretermis aSymbolor aString,(:call, term, args): withtermas above andargsaVector{Any},(:set, atoms, vals): whereatomsis aSymbolor a vector of them andvalsis a valueAnyor a vector of them.
It then evaluates the messages in its namespace as
- strings to parse or symbols to evaluate,
- functions to execute with arguments or
- 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.
Erjulix.deserializek — MethodDeserialize a binary, sha-256 decoded with key if it is not empty.
Erjulix.eServer — MethodeServer(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.
Erjulix.genpasswd — MethodReturn a Base64 encoded random passwort of length len.
Erjulix.getHostPort — MethodReturn the Sockets.InetAddr of a socket sock.
Erjulix.getPort — MethodReturn an available port number ≥ start.
Erjulix.pServer — MethodpServer(port::Integer)
pServer(host::IPAddr, port::Integer, key::AbstractString)Start a server listening to an UDP port and starting parallel EvalServers if requested.
Erjulix.serializek — MethodSerialize data, sha-256 encoded with key if it is not empty.