Mnesia and the Erlang message distribution model

Kurt Luoto kurt@REDACTED
Fri Feb 22 02:28:33 CET 2002


I'm a newcomer to Erlang/OTP, and I have a some Mnesia questions.  I'll post
each in a separate email so we can maintain separate threads for each.

>From reading the Mnesia user's guide I have the impression that all nodes
that participate in the same database, even if they are only "readers" of
the DB, must be "connected" to each other through the Erlang message
distribution layer.  So, for example, if I have 10 Erlang nodes sharing a
Mnesia database  (schema), then each node needs to maintain 9 sessions, one
with each of the other nodes.  Is this correct understanding?

I would like to hear that it is possible to set up a sparse connection
topology, a hierarchy of nodes where each node only needs to maintain
connections with a few other nodes, for example, it's immediate "parent" or
"master", it's immediate "children" or "slaves", and perhaps a few of it's
"siblings" or "peers".

The application I have to consider is one where the total number of Erlang
nodes in the system may be on the order of hundreds, but there is a natural
hierarchy to them.  We make communications equipment.  One chassis
(rack-mounted shelf) has a control processor for the chassis overall and
several line cards each with its own processor, let's say about ten
processors (Erlang nodes) per chassis.  A complete system has two or more
chasses; a large one may have 20 or 30 chasses.  We want to treat all these
as a single system for management & control purposes, so they all need
access to the (distributed Mnesia) database.

Obviously there are scaling problems if all 200 to 300 Erlang nodes must be
connected to each other.  However, in practice the line cards in one node
really don't have anything to say to processors outside their own chassis.
They only need to exchange data with the control processor in their local
chassis. And the control processors among the chassis need to talk to each
other, but each control processor only needs to talk to line cards in its
own chassis.

So I would like to know if it is possible to set up a sparse communications
topology to match the hardware configuration.  If necessary, I could live
with having Mnesia replicate tables such that each control processor has
local copies of all the data it needs for its chassis, with the hope that
within each chassis the line card's copy of Mnesia only needs to deal with
control processor's copy of Mnesia.

Is this possible today?

-- Kurt Luoto



More information about the erlang-questions mailing list