[erlang-questions] Knowledge base in Erlang

Joel Reymont joelr1@REDACTED
Sat Jan 6 15:57:10 CET 2007


Folks,

I'm tasked with rewriting a project from Lisp to Erlang. The project  
has a frames system where "objects" are represented as collections of  
properties. The "schemas" are kept separate from the data and schemas  
can inherit from other schemas.

The complication in my case is that updates are versioned. Each  
update is time-stamped and old data is pushed away. This makes it  
easy to see the state of the system at any given point in time.

I'm thinking of using a table per object property and indexing it on  
{object id, timestamp}. I know that I can use ordered_set but I'm  
wondering about the order. Can I retrieve the data matching the  
highest index value which in my case would be the last value pushed?  
What about the lowest index value?

How many tables can you keep in Mnesia? Would it make more sense to  
have a table per property _and_ object instance, i.e. call the table  
property_object_id and keep the index just on timestamp? This would,  
of course, exponentially increase the number of tables in the system.

	Thanks, Joel

--
http://wagerlabs.com/








More information about the erlang-questions mailing list