-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concept 'magic': Think about implementing a OSXFS strategy architecture for 2 way sync #42
Comments
Which tool do you intend to use to to the sync ? I tried this approach not with OSXFS but with NFS in the dinghy project, see codekitchen/dinghy#197. The main issue I got was the lack of support of |
I would say, this concept is to achieve true transperency for 2 way sync for now - it yet not really change too much for rsync and, since it is docker for mac only, i would not like to switch the current strategies to it, rather add this on as an extra. I therefor tend to use unison as the local sync. So wie have Host --- OSXFS ---> sync-container /tmp[fswatch-trigger]--- local unison sync ---> sync-container /app/code[fswatch-trigger] ----- named volume mount -> app container |
After @mickaelperrin implemented unison-dualside we talked to let it "walk" for a while and then try this concept. A correction, OSXFS shall be replaced by "any native sync" and the limitation on docker-for-mac is also invalid, iw would work with all of those |
In fact, this concept only works with filemounts in docker that supports file events forwarding from the host to the mounted folder in the container. OSXFS supports this, but others solutions like Boot2docker don't, even |
I switched this week-end from Despite the hard work done on I tested several approaches (fswatch / unison, unison only...). Currently, the setup that performs the better is also the simpler with a pure I released my experiments in a separate project Feel free to give your impressions and how it could be used with/in This additional work with fswatch and unison make me understand how the implementation of |
Well what shall i say, thats the concept outlined above, so there is nothing to comment more from me. As stated on the project page, i asked people to not re-do projects again and again, i guess, thats what we have this now. The auto-discovery of mounts is a point is a clever thing, but probably can be done differently. To use this in docker-sync i would need to understand:
It is pretty easy to use with docker-sync:
And thats it. What is your plan in general, you want to keep docker-magic-sync as a new project or do you want to incorporate the changes / concept into docker-sync? |
To be clear, I think some people will be interested from this "only docker needed" approach, so it could be maintained as a project. But I would like As you may have noticed, I don't use external volumes. This is something I found useful as there is no additionnal step to clean up docker when removing / restarting a container. However, currently I don't see how to implement this with To answer your questions:
Before starting a ruby implementation, I will test it for a few days to see if the core concepts are working very well or at least with limited drawbacks. |
Simplifying docker-sync configuration: full opt in. Not only for magic, in general. But you know what that means, we will try to guess / automate assumptions leading to new issues when we are "wrong". If you also opt in helping with those, lets do it. Because auto-configration is mostly effort for the docker-sync developers and effort in maintainance. Great, ok so battle plan:
Does that sound reasonable? |
@mickaelperrin probably join https://gitter.im/EugenMayer/docker-sync?utm_source=share-link&utm_medium=link&utm_campaign=share-link to further discuss it |
Mmm, bad news here. It looks like there is an issue with OSXFS. As soon as the files increases, Some other users reports a similar issue on Docker forums. I will investigate this further and try to do a proper issue on Docker forums. :( |
Shall we delay this implementation until we know if it is "fixable" or shall we go forward with this one? Architectural / Conceptual wise things are set, i do not expect any big hurdles |
On my side I won't work on the implementation of this in Currently, I will see if the knowledge gained while working on this could benefit to the |
Some updates here. I created the issue on the Docker forums, hope we will have some update soon. I did also some new tests and what I can say it that as exepected the sync with |
Just did some tests with the latest release of Docker with magic-sync. Things got improved, basic sync is performed. But the |
ending this discussion for now, should i? I would stall this ticket and remove it if we move on, or do you have other ideas @mickaelperrin |
You can close it I think this strategy will work when OSXFS will improve performance and so... When we won't need syncing :) |
Mentioned here https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076/130?u=eugenmayer
Using OSXFS to sync from host to sync container "tmp folder" and then sync from this tmp folder to sync-container app-folder "locally".
This has some pros:
Cons:
a) still needs 2 fswatch processes : One the the sync container to watch the changes on the tmp folder, one on the app-mount folder in the sync container to get app-container changes on the share
b) docker for mac only and probably OSX only
Comments on the cons:
a) well, thats just the same number as we would have without OSXFS, so its rather on par, but, fswatch is more effective on linux due to inotify evens, so it might gain performance, sind we reduce the fswatch on OSX, shifting it into linux
b) Well we do support OSX with docker-sync yet only ( i guess, not tested on windows ). Secondly, since it would end up being a strategy only, we could say that some strategies are not available for some docker-types like docker-machine and stuff. So thats sovleable
the data flow would look like this
Host --- OSXFS ---> sync-container /tmp[fswatch-trigger]--- local unison sync ---> sync-container /app/code[fswatch-trigger] ----- named volume mount -> app container
The text was updated successfully, but these errors were encountered: