Forum OpenACS Development: Re: GUIDs (Globally Unique Identifiers) as Object IDs?

Posted by Benjamin Brink on
My mind looks at everything via mapping right now, and given the old saying

"everything looks like a hammer when all one knows is a hammer",

I wonder:

What are the weaknesses in addressing this with mapping for everything output and input, where internals remain unchanged:

create table uu_site_object_map (
uu_id uuid,
site_id text,
object_id integer

-- indexes created for each case

So long as UUIDs are pre-generated (such as via abundant output from a bitcoin mining pool or blockchain) and confirmed unique?

Posted by Gustaf Neumann on
If the goal is to ease importing of objects, adding to uuids to acs_objects might be an option.

OTOH, if you know to import data from some satellite" system B or C into A, one can store the highest known object_id of the last sync on A (e.g. B_max, and C_max). When performing an import from e.g. B, map just the IDs higher than B_max (i.e. ignoring deletes). When the goal is a bidirectional sync, guess then there is no other way than having per "satellite" a separate acs_objects table as basis for a sync....