Open mottosso opened 6 years ago
From https://github.com/getavalon/docker/pull/21#issuecomment-401173561
I was thinking the syncing daemon would be part of the docker container?
It could be.. but the problem is that it's a little inverted. See, CGWire is a container, so is Mongo. So we can either:
For (1), that's another container to manage for a simple task. For (2) and (3) it's not as clean as I'd like.
I expect lots more container to be part of this setup, so odds are we either bite this bullet, or bite the bullet of requiring a docker-compose template..
Personally I don't mind going with option 2 and 3.
In the future with other trackers like Ftrack, the synchronization from tracker > Avalon will need to be custom anyways, so keeping it separate might actually be cleaner in the end.
Uncleanliness will come from Mongo > tracker, but could that not also be in the tracker container? That would keep all tracker based code inside the tracker container.
I also think there should be an option to rescan for missing data.
I have seen a lot of times with event handlers, that events are dropped or missed somehow. This can happen in any number of ways, but frequently it happens due to connection issues.
What we could have is a rescan at startup and maybe at an hourly interval.
The sync python script is getting larger and becoming unorganized. Even worse is that there are no tests to ensure consistency.
How about a syncing
module in bin/pythonpath
?
Would be nice to start having a specific cgwire
namespace as well, to anticipate other trackers.
Yeah, might be time for a cgwire-sync repo even. Should I make one? Then we can add it to the git/
dir.
Sure, that might be even better.
Actually come to think about it, would it not be better to keep it in avalon-docker repository?
Testing already happens here, where all the components for CGWire <> Avalon syncing are accounted for. Also issue tracking would might be confusing as well.
That would solve the immediate issue, but I expect we'd be delaying the inevitable; which is managing issues and features specific to CGWire.
For testing, what we've got going is positive in that it has access to all of Avalon to perform tests. But it's negative in that we haven't yet considered how to trigger these tests on updating any of the submodules. For example, I expect we'll want to update core, and test it during a PR, prior to merging. But using the strategy we've got here, we wouldn't be able to actually trigger these tests until after a merge, and after an update of the submodule here. (Unless we jump through hoops setting up parallel branches, cross-repository? :S)
How about we start the Docker container from the CGWire project? That way:
How about we start the Docker container from the CGWire project?
Do you mean in the cgwire-sync repository, we use the container from here to test with?
Looks like Zou has an event table we could use for syncing; https://github.com/cgwire/zou/pull/92
Trying to make a start on it; https://github.com/getavalon/cgwire-sync/pull/1
Goal
Fast, accurate and bi-directional synchronisation between CGWire and Avalon.
At the moment,
python a:\sync.py
does one-way synchronisation from CGWire to Avalon with a 10 second interval. But it is flawed.