[erlang-questions] Mnesia, disk_log and dets

wde wde@REDACTED
Wed Feb 17 08:38:11 CET 2010

ok thank you.

With Mnesiaex we can have our own storage backend for the  new "external_copies" type. 

But instead of specifying a new copy type, I'm currently trying to understand how I can integrate a wrapper module
like "mnesia_disc_backend" that handle all disc access (for disc_copies and disc_only_copies) , and do the same thing for the "ram_copy" type, by using a "mnesia_ram_backend" module.

The idea is to offer more flexibility and easily change the backend for ram and disc I/O.

Do you think I'm wasting my time or that there is no interest for something like that ?

>wde wrote:
>> hello,
>> I'm reading the source code of Mnesia to understand how things work
>> :+) If I have understood correctly, for "disc_copies" tables, data
>> are written to disc by using the "disk_log" module. For
>> "disc_only_copies" tables, Mnesia uses "dets".
>> What not use the same disk backend ?
>Originally, they did use the same back-end, but it turned out,
>from experimentation, that dumping the entire table using disk_log
>was /much/ faster than writing out the individual changes into
>a dets file.
>Ulf W
>Ulf Wiger
>CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd
>Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.

More information about the erlang-questions mailing list