multiply matrices using erlang and mnesia
Fri Oct 21 02:39:18 CEST 2005
I'm playing with mnesia right now and am wondering the best way to
solve this problem with it. The idea is to multiply matrices by
adding jobs of rows to complete to the database which workers will
take on and complete, putting the resulting row back in the database
for retrieval by the initiator.
Putting work up is easy. The trick is to get work out to the workers
(really, letting them know a job has arrived) and let the process that
posted the work know it's done. What's the best way to go about this
using mnesia? It has pattern matching, which allows picking the
correct entries but I'm not sure how to let the workers know about the
job short of polling the db periodically for new jobs.
The program is just a toy based on a lecture at uni on tuplespaces.
We went through an example use to multiply large matrices. I want to
adapt this to erlang and mnesia to see what it'd look like.
More information about the erlang-questions