[erlang-questions] OTP-EVA-MIB

Ulf Wiger ulf.wiger@REDACTED
Fri Dec 3 08:50:45 CET 2010


On 2 Dec 2010, at 18:44, Andrey Pampukha wrote:

> +1. Digging deeper into EVA's documentation, I've found very interesting thing:
> Handle = query [E.generated || E <- table(eventTable), E.name = Name] end
> 
> Usage of the 'query' keyword in R14B leads to the following output:
> 1> query [X*2||X<-lists:seq(1,10)] end.
> * 1: mnemosyne query, missing transformation
> 
> Googling for "erlang mnemosyne", the following link can be found:
> http://www.erlang.org/documentation/doc-5.5.5/lib/mnemosyne-1.2.7.1/doc/html/mnemosyne.html
> It's sayd that mnemosyne is some query language for Mnesia.
> This application is also can't be found in recent Erlang/OTP releases…

True. Mnemosyne was retired with the introduction of QLC, some years ago.

Mnemosyne was a research project running in parallel with Klacke's work
on Mnesia. It was an experiment in using list comprehensions for database
queries. When the project started, Erlang didn't support list comprehensions,
and it happened that two similar, but subtly different, syntaxes evolved in
parallel: the query list comprehensions used by Mnemosyne, written by 
Hans Nilsson, and the list comprehensions in Erlang, written by Robert 
Virding. Thus, the 'query' keyword.

Mnemosyne included fairly ambitious query optimisation code, and 
maintained metrics about each table in order to select the best strategy.
It also paid particular attention to recursive queries, exploring the idea 
that by delaying the recursive aspects during the optimisation phase,
sometimes the recursion could be eliminated - a worthy research task,
but ultimately not particularly useful in telecoms switching systems,
which is what Erlang was used for. Also, Mnemosyne was never 
actually productified - it just slipped into the first version of OTP (Hans
once told me how surprised he was when he got the first bug reports 
on his research project).

Since Mnemosyne was never meant for production use in the first place,
and therefore was not maintainable, it was important to find a replacement.
QLC has a different set of requirements too, hopefully more in line with 
the actual use of Erlang.

BR,
Ulf W


More information about the erlang-questions mailing list