Questions tagged [mnesia]

A distributed DataBase Management System used in Erlang applications.

Mnesia is a distributed DataBase Management System (DBMS), appropriate for telecommunications applications and other Erlang applications which require continuous operation and exhibit soft real-time properties.

414 questions
5
votes
3 answers

Eventually consistent mnesia database with erlang. Best practices anyone?

I'm writing a bittorrent tracker in erlang. Given the nature of the service, I won't need absolute consistency (ie. a client can be perfectly happy with a slightly outdated list of peers or torrent status). My strategy so far has been to create…
Matteo Caprari
  • 2,869
  • 4
  • 27
  • 35
5
votes
1 answer

Mnesia exception exit: {aborted,{bad_type, Record}}

I create a table whose name is NOT the same as its record name. Here below is the code snippet %% ---- record definition -------------------------------- -record(object,{key,value}). %% ---- create table…
Muzaaya Joshua
  • 7,736
  • 3
  • 47
  • 86
4
votes
2 answers

How to update a Mnesia table in Erlang

I have a little problem with my code. I have a table containing car details, name, price and quantity, so I am trying to create a function called buy which will be used to buy a specific car. When a user buys eg 5 BMW cars, they will call…
Onty
  • 141
  • 2
  • 10
4
votes
2 answers

Number of seconds since January 1, 1970 00:00:00 GMT Erlang

I am interacting with a Remote Server. This Remote Server is in a different Time Zone. Part of the Authentication requires me to produce the: "The number of seconds since January 1, 1970 00:00:00 GMT The server will only accept requests where the…
Muzaaya Joshua
  • 7,736
  • 3
  • 47
  • 86
4
votes
1 answer

Unintentionally intercepting Mnesia's transactional retries with try/catch results in all kinds of weirdness

So, I was having all kinds of trouble with CRUD operations on sets of records in one transaction. It lead me to post 2 questions here, Trouble and MoreTrouble. However, I think that both those issues where created by the following: Within my…
Jr0
  • 2,131
  • 13
  • 23
4
votes
2 answers

Cant setup Mnesia

setup_mnesia(Name) -> ?VALUE(application:start(mnesia)), ?VALUE(mnesia:create_schema([node()|[Name]])), ?VALUE(mnesia:create_table(muppet, [ {attributes, record_info(fields, muppet)}, …
Yola
  • 18,496
  • 11
  • 65
  • 106
4
votes
1 answer

How is Mnesia disc_copies table stored in ram when application starts?

I have a table A of type disc_copies. It has two files on the disk. A.DCD - last modified time 30th Aug A.DCL - today(7th Sep) As per my understanding, A.DCL is log file and A.DCD has all the data. Today I have done multiple operations on A,…
Arpit A.
  • 109
  • 1
  • 6
4
votes
2 answers

Does MNesia support synchronization after disconnected operation?

I'm starting to architect a project with the following requirements: The overall system will be distributed across multiple physical nodes on a WAN Each node will be using and manipulating a common set of data records Operations on these records…
G__
  • 7,003
  • 5
  • 36
  • 54
4
votes
1 answer

erlang node not responding

I received such message in erlang condose at first@localhost node =ERROR REPORT==== 1-Jan-2011::23:19:28 === ** Node 'second@localhost' not responding ** ** Removing (timedout) connection ** My question is - what is timeout in this case? How much…
vinnitu
  • 4,234
  • 10
  • 41
  • 59
4
votes
2 answers

How do I create and use (or simulate) multi-column indexes in Erlang Mnesia

I have looked through the Mnesia documentation and the 3 popular Erlang books. It seems only single column primary and secondary indexes can be created and used. Or maybe it is just what the examples cover? If I create a separate index on each of…
user557513
  • 117
  • 1
  • 5
4
votes
2 answers

ejabberd clustering, Slave doesn't work when master goes down

I have setup ejabberd clustering, one is master and other is slave as described here. I have copied .erlang.cookie and database files from master to slave. Everything is working fine. The issue is when I stop master node: Then no request getting…
Dharmraj
  • 164
  • 1
  • 15
4
votes
2 answers

Erlang - Is there anything in Mnesia similar to ORDER BY in mysql?

I am able to order the obtained data from mnesia but was wondering if it was possible to sort the data while querying from mnesia, similar to using ORDER BY in mysql
Anto Joy
  • 135
  • 1
  • 7
4
votes
1 answer

Sending messages among erlang processes: Atoms vs Binaries

Are atoms copied from one process to another when i send an atom as a message ? My thinking is that since this atom is already existing in the VM is doesnot have to make a copy. I understand that binaries are more efficient when sending from one…
Muzaaya Joshua
  • 7,736
  • 3
  • 47
  • 86
4
votes
2 answers

Erlang - Standard location of mnesia database

Is there a standard place to put the mnesia database within erlang? At the moment I am putting it in the priv directory.
Ken Robinson
  • 153
  • 2
  • 5
4
votes
5 answers

Suitable data storage backend for Erlang application when data doesn't fit memory

I'm researching possible options how to organize data storage for an Erlang application. The data it supposed to use is basically a huge collection of binary blobs indexed by short string ids. Each blob is under 10 Kb but there are many of them. I'd…
Ilya Martynov
  • 396
  • 1
  • 8