otp


How to create a distributed application on elixir?


I'm a bit new to elixir and i'm not entirely sure what i'm doing wrong. I'm looking to create a distributed application (runninng on one of several nodes)
I've been looking at the erlang documentation and the elixir documentaiton but i don't seem to be able to get it working.
Any help would be greatly apreciated
Application
defmodule ShortCode do
use Application
require Stout
# for more information on OTP Applications
def start do
:application.start(:short_code)
end
def start(_type, _args) do
ShortCode.Supervisor.start_link
end
end
Supervisor
defmodule ShortCode.Supervisor do
require Stout
use Supervisor
#worker_name :short_code_generator
def start_link do
:supervisor.start_link({:global, __MODULE__}, __MODULE__, [])
end
def init([]) do
children = [
worker(ShortCode.Generator, [], [restart: :permanent])
]
# for other strategies and supported options
supervise(children, strategy: :one_for_one)
end
def generate_short_code do
ShortCode.Generator.generate_short_code
end
end
Worker
defmodule ShortCode.Generator do
require Stout
use GenServer
def start_link() do
:gen_server.start_link({:global, :short_code_generator}, __MODULE__, [], [])
end
def generate_short_code do
:gen_server.call({:global, __MODULE__}, :generate)
end
...
end

Related Links

How to build a release archive with rebar3 together with lager
Open trip planner internal algorthim
What are the architectural differences between Erlang/OTP and OpenResty?
GTFS fares allocation depending on time
Using GTFS real time feed
How to run Elixir Supervisor in escript
Online Users Storing Elixir
How to create a distributed application on elixir?
What version of .NET does OTP.NET use? [closed]

Categories

HOME
android
phpword
ggplot2
3d
themes
web-hosting
echo
python-multithreading
angularfire2
drop-down-menu
startup
resultset
ycsb
esoteric-languages
searchview
video-editing
ksh
r-mice
roslyn
strongname
tiki-wiki
itunes
moses
ms-access-web-app
fragment-backstack
soot
calculation
volatile
python-2.6
cart
turfjs
dm-script
sessionstorage
release
password-protection
linq-to-objects
laravel-elixir
apollostack
http-request
optimizely
flask-restful
reindex
cpu-cache
structuremap4
flex4.6
burrows-wheeler-transform
macaulay2
x-tag
vorpal.js
riot
bizagi
yajsw
avisynth
file-move
user-permissions
gamekit
filesplitting
formview
mdichild
personalization
cancellation
radiant
clickbank
drupal-nodes
ora-06550
mt4j
gtm-oauth2
process-explorer
joomla-template
os.system
relative
luabind
massive
inline-formset
silent
web-garden
opml
nstokenfield
feasibility
asynchronous-wcf-call
alsb
dsoframer
image-capture
wspbuilder

Resources

Encrypt Message