I have 10 sites each with a server geographically separated over a WAN
with a VPN mesh making it look like all the systems are on one
network. Some of the basic tables containing global configuration need
to be identical across all systems. Other tables which foreign key
into the base tables occur at all sites but the data is site specific
with no data shared between sites. The common across all sites tables
are not going to change much, typically when a new site is added or
possibly if one is removed, months could go by without a change.

After reading many posts I put uuid and last_modified fields in the
common across all sites tables and any "foreign keys" needed in other
common tables are uuid strings with requires rules. There are no
database enforced foreign keys in these tables. For the local only
data tables I use the auto-generated id field of the common tables as
the foreign key reference field to get referential integrity for the
data in the local data tables and use the standard practice that would
be used for a single database for any relations between local tables.

Is this the best practice for this situation? Did I miss something in
the definition of the global data tables.

BTW, I am fairly new to web2py and am very happy with what I have
worked with.

Thanks for any pointers,

Ron

Reply via email to