Questions tagged [otp]

OTP is a set of useful middle-ware, libraries and tools written in Erlang. It is an integral part of the open source distribution of Erlang. (For the one-time passwords, use [tag:one-time-password])

OTP is a set of useful middle-ware, libraries and tools written in Erlang. It is an integral part of the open source distribution of Erlang.
Erlang was originally developed in the Computer Science Laboratory at the Swedish Telecom company Ericsson. OTP stands for Open Telecom Platform which was a brand attempt before Ericsson released Erlang/OTP as open source. However neither Erlang nor OTP is specific to telecom applications.

It contains:

  • Erlang interpreter
  • Erlang compiler
  • A protocol for communication between servers (nodes)
  • Corba Object Request Broker
  • A static analysis tool called Dialyzer
  • A distributed database server (Mnesia)
  • Lots of libraries

Erlang/OTP has been used to build systems with 99.9999999% reliability (that’s nine nines).

Getting started

  1. Download the Erlang/OTP release for your platform.
  2. Check out Stack Overflow questions tagged and .
  3. Ask questions!

Community

Other places for discussing Erlang/OTP, beyond the question & answer format of Stack Overflow:

686 questions
11
votes
2 answers

How to create an event emitter with elixir, the otp way

What is the best way in elixir to create a foreground process that tick on every given amount of time? My main problem is that an approach like: defmoulde Ticker do def tick do do_something() :timer.sleep(1000) tick end end works,…
matteosister
  • 268
  • 2
  • 10
10
votes
0 answers

Distributed Erlang - network split recovery and using heart with distributed applications

I have a standard situation, two distributed Erlang nodes, one master one standby. When I stop the master the standby comes on - failover, when I start the master the standby stops - takeover. Everything works fine as long as heart is not turned on…
Roman Rabinovich
  • 780
  • 4
  • 13
10
votes
2 answers

In Erlang, what's the difference between gen_server:start() and gen_server:start_link()?

Can someone explain what's the difference between gen_server:start() and gen_server:start_link()? I've been told that it's something about multi threading stuff. EDIT: If my gen_server is called from multiple threads, will it execute them all at…
Guga Melkadze
  • 255
  • 1
  • 11
10
votes
3 answers

Why GenFsm is deprecated?

Why is the GenFsm behavior of elixir deprecated? I would like to implement finite state machine with GenFsm behavior. I think Agent is not sufficient to describe finite state machine. Because, Agent is not suitable for describing returning different…
tamagohan2
  • 415
  • 4
  • 13
10
votes
3 answers

How do I find the workers in my Elixir application?

Working through the Supervisor and Application part of the Getting Started tutorial, I'm writing a unit test for the supervision tree problem at the bottom. I tried starting the top-level supervisor but it failed with this error: 1) test all…
ijt
  • 2,259
  • 20
  • 28
10
votes
3 answers

erlang OTP Supervisor crashing

I'm working through the Erlang documentation, trying to understand the basics of setting up an OTP gen_server and supervisor. Whenever my gen_server crashes, my supervisor crashes as well. In fact, whenever I have an error on the command line, my…
drfloob
  • 2,805
  • 1
  • 21
  • 28
10
votes
1 answer

My supervisor crashes when I try to start it from eshell?

I'm very new to OTP, I'm trying to create simple example to understand supervisor behaviour: Here is simple increment server -module( inc_serv ). -behaviour( gen_server ). -export( [ start/0, inc/1, stop/0 ] ). -export( [ init/1, handle_call/3,…
stemm
  • 5,740
  • 2
  • 29
  • 63
9
votes
4 answers

Erlang: simple pubsub for processes — is my approach okay?

Disclaimer: I'm pretty new to Erlang and OTP. I want a simple pubsub in Erlang/OTP, where processes could subscribe at some "hub" and receive a copy of messages that were sent to that hub. I know about gen_event, but it processes events in one…
drdaeman
  • 9,968
  • 6
  • 53
  • 103
9
votes
1 answer

simple_one_for_one start_child() returns already_started

I have a supervisor which should start simple_one_for_one workers. When I call start_child() for the first time, everything goes excellent. But, when I do it the second time, I get {error,{already_started,<0.71.0>}}. Why would simple_one_for_one…
dijxtra
  • 2,411
  • 3
  • 21
  • 35
9
votes
2 answers

Erlang: Distributed Application Strange behaviour

I'm paying with distributed erlang applications. Configuration and ideas are taken from: http:/www.erlang.org/doc/pdf/otp-system-documentation.pdf 9.9. Distributed Applications We have 3 nodes: n1@a2-X201, n2@a2-X201, n3@a2-X201 We have application…
Anton Prokofiev
  • 867
  • 7
  • 23
9
votes
3 answers

Non-blocking TCP server using OTP principles

I'm starting to learn Erlang, so I'm trying to write the "hello, world!" of concurrent programming, an IRC bot. I've already written one using Erlang without any OTP niceties (supervisor, application, etc. behaviours). I'm looking to rewrite it…
rpkelly
  • 1,896
  • 18
  • 19
9
votes
1 answer

What does `runtime: false` mean in the Mixfile dependencies?

From the mix deps documentation: :runtime - whether the dependency is part of runtime applications. If the :applications key is not provided in def application in your mix.exs file, Mix will automatically included all dependencies as a…
toraritte
  • 4,130
  • 3
  • 26
  • 43
9
votes
3 answers

Erlang OTP application design

I am struggling a little coming to grips with the OTP development model as I convert some code into an OTP app. I am essentially making a web crawler and I just don't quite know where to put the code that does the actual work. I have a supervisor…
Toby Hede
  • 35,582
  • 27
  • 127
  • 161
9
votes
4 answers

Erlang workflow

How do you organize your erlang workflow? I'm learning some Erlang now and I'm using Rebar, recompiling, rebuilding and restarting an entire release (I'm trying to keep things OTP'ish) after each edit. I'm pretty sure that there is a smarter way to…
lambdadmitry
  • 141
  • 1
  • 3
9
votes
2 answers

Erlang: starting a remote node programmatically

I am aware that nodes can be started from the shell. What I am looking for is a way to start a remote node from within a module. I have searched, but have been able to find nothing. Any help is appreciated.
MulletDevil
  • 899
  • 2
  • 8
  • 14
1 2
3
45 46