Integration plugin framework

In one of the FamilySearch integration threads, @dsblank suggested the idea of a new plugin type for integration. I thought it would be interesting to discuss what that could look like.

In my mind this is a plugin framework to allow synchronisation and sharing of data with other online systems such as FamilySearch, Geneanet, Ancestry or WikiTree and potentially with offline applications. This would be an alternative to the usual method of exporting/exporting GEDCOM which usually requires careful alignment of identifiers and patching up duplicate objects.

My initial thoughts and questions to kick things off:

  • What API surface would an integration plugin need from the framework?
  • What objects should be tracked. All of them or just Person/Family/Event?
  • We could offer an Sync API that records object ID mappings, timestamps of last change on both sides and time/status of last sync.
  • What changes for one-way vs two-way sync?
  • Plugin manages the mapping of fields, and data conversions, but that mapping needs to be stored in config.
  • What would we do about conflicts? Maybe that’s up to the plugin.
  • My assumption is that all communication with the external system is handled by the plugin.
  • What integration with Gramps data model is needed? The FamilySearch integration doesn’t currently make it easy to find which person matches a particular FS identifier. That could/should be added as an attriibute on the person?
  • What support is needed for merge or delete against Gramps objects?

Good ideas (and questions)!

That was the first rough spot that I identified when using the new FS integration, and talking with @SourceAirbender. What I imagined was a fairly simple batch operation that, given a FS identifier attached to the currently edited Gramps person, it would attempt to find matches in the relationships in FS, and merely add the FS identifier to them.

What constitutes a “match” is the big question here. But I imagine that such a function could be used by all integrations, given a standard representation of a person.