Dave Schoorl wrote:
> master database (mainly row insertions) be visible immediately in the 
> mmbase (slave) database. A timeout on the cache (assuming this is 
> supported) would be sufficient.

Caches do not default work with timeouts. Cache-implementations are
pluggable though, and a version based on oscache is availab.e Perhaps
that supports time-outs too. Periodically cleaning all caches would be a
matter of 5 lines of java.

> I am now thinking that I best create the necessary fields (otype, number 
> and owner) in the mmbase (slave) database -- not in the master database 
> -- and add a trigger that will fill the otype, number and owner fields 
> automatically on an insert. But I then still have the challenge with 
> regards to the VARCHAR primary keys. Because I think in the replication 
> process, adding a trigger in the slave database to retrieve the node 
> number of the record that the VARCHAR foreign key points to and place it 
> in a new foreign key column to point to the same record in the 
> referenced table for use by mmbase will be hard (if not impossible), 
> impracticable and too complex.
> 
> What would it take me to add support to mmbase for node identification 
> on the basis of (multiple fields) VARCHAR primary keys instead of a node 
> number? Would that  be a feasible option? -- please enlighten me when my 
> mmbase internals ignorance makes you wanna pull your hair out.

It sounds rather implicating, and you'd really have to change mmbase
itself, on many places, to add general support. Perhaps it would be
possible to make a custom builder with 'virtual' fields or so, but
you're essesntially doing the same thing (making up node numbers). I'm
not sure this has been done before. If you can get away with periodical
synchronization to a real mmbase database, it would probably be much
simpler.

Michiel


-- 
Michiel Meeuwissen                  mihxil'
Peperbus 107 MediaPark H'sum          [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US



_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to