I've got an experimental module that does between-instance syncronisation of data objects
Each content item is assigned a GUID in addition to its standard SS assigned ID. When mapping relationships, these are converted into an item that just references the Giud and type of the object being related to. So in the list of items being sync'd, the raw object appears, then comes a list of 'relations' that need syncing in a structure like
{
"SYNCROREL": true,
"Type": "TimesheetRecord",
"ContentID": "23a78c73-64d0-43e4-aad3-0038a836ef69",
"MasterNode": "74451b1a-aa04-4ddc-b1b4-dc517ad9e712",
"has_one": {
"Project": {
"ContentID": "107b5149-ccf5-4653-ac58-9d144cda9513",
"Type": "Project"
},
"WorkItem": {
"ContentID": "5e03894a-71f6-445b-bee8-b57f0e7faa4f",
"Type": "WorkItem"
}
}
}
Many many items can be sync'd in a similar manner just by pointing at the relevant objects in an array.