[erlang-questions] OTP Design
Thu Aug 18 20:44:32 CEST 2011
On Thu, Aug 18, 2011 at 1:01 PM, Anchise Inzaghi <erlang@REDACTED> wrote:
> **As I read the documentation, there is no way to start_link a process on a
> different node, or am I missing something?**
> **What supervision strategy would you suggest?**
I personally would not supervise processes over a network connection,
unless it was some sort of cluster where the interconnect was
Apart from prototyping, I don't generally use distributed Erlang (i.e.
starting named nodes) but prefer to use other messaging protocols
(e.g. AMQP, 0MQ, REST, etc).
In any case, I'd recommend that you treat each server as an island
that explicitly handles "no response" cases from other servers rather
than rely on OTP supervision + restart patterns.
> I also dived a bit into distributed application docu, but I have the
> impression that it is more aimed at Takeover and Failover mechanisms. I
> fear, these won't help me much, as each slave can only run on the machine
> where its actual hardware device is connected.
You'd need to design "takeover" into your application.
I'd start with just getting the basic master/slave framework in place
and working. Your interim solution for recovering may simply be to
automate server startup/recovery. Once you have experience with your
specific problem set, you can gradually improve that SLA.
> **Please prove me wrong and show me the way how to use ditributed app?**
Distributed applications are hard.
You might poke around the 0MQ community -- in particular read this:
It's not Erlang specific, but it certainly presents a lot of concepts
that you're going to want to at least think about.
The Erlang bindings are solid with comprehensive examples:
More information about the erlang-questions