what is a good way to do 'maintaining data distribution'
Sat Apr 12 17:15:00 CEST 2003
hp> On of my responsibilities is to make sure that all databases
hp> generated on a few master machines get distributed to other machines
hp> in a timely and reliable fashion.
hp> Scale: machine number is around 240.
hp> Dependence: intertwining.
There aren't enough information to answer your question correctly but I try.
1) If you could switch to Mnesia it did all work for you. Some
sophisticated rules could be solved using Ulf Wiger's `rdbms' package
(available at contributions page).
2) If you must use SQL database the simplest solution would be
database triggers on insert/update/delete to store key information of
changed records in log table with timestamps and periodic update on
remote nodes using erlang `odbc' and `rpc' modules.
hp> Here are two approaches that I can think of.
hp> (1) Write down the 'dependence rules'
hp> --- in analogous to an erlang makefile.
hp> Then, a sync-engine (in analogous to ermake.erl)
hp> should gather data and execute functions to maintain rule's integrity.
hp> (2) More general way (?).
hp> we can have a list of entities,
hp> [entity1, entity2, ...]
hp> Each entity has its value (representing its state)
hp> and has associated with it a rule (one or more functions) which may
hp> depend on other entities.
hp> ---> sort of like a Spreadsheet model.
hp> If the value of one entity gets changed, all other entities
hp> that depend on it will be updated too.
More information about the erlang-questions