[erlang-questions] Support for newcomers and the popularity of Erlang
Ulf Wiger
ulf@REDACTED
Mon Mar 19 18:07:16 CET 2012
On 19 Mar 2012, at 17:59, Wojciech Knapik wrote:
> For now a quick answer - we're aiming for a fully distributed setup, where every node is equal. We'd like the system to be able to function as long as at least a single node is up. We're just starting to work on the code, so we might change the approach to achieving this, but the goal will likely remain in place. There won't be much data stored in mnesia. For the larger sets of data, there will be a regular SQL database.
There are definitely advantages to having each node being identical to every other node, but when it comes to a replicated database, there are some issues to consider.
- Mnesia uses a simple broadcast algorithm for locking, and 2-phase commit protocols, so running transactions across a large number of replicas will become increasingly expensive. Ironically, I've often heard people become frustrated with mnesia's performance when running fully replicated, and instead switch to PostgreSQL, which until very recently, couldn't replicate at all. This suggest that replication wasn't a requirement in the first place (for them, I don't know enough about your requirements to know if it applies in this case).
- You should not use dirty writes on replicated tables, _especially_ not if you have a large number of copies. Mnesia doesn't ensure consistency with dirty writes. You have to use transactions for that.
I assume the SQL database is not running in fully replicated mode? If so, perhaps you have a layered architecture after all?
BR,
Ulf W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120319/eb15a3bc/attachment.htm>
More information about the erlang-questions
mailing list