-
Notifications
You must be signed in to change notification settings - Fork 32
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
Feature Request: Capability to use .zip files as .yml file store. #33
Comments
While it probably will not be .zip files, I am actually currently working on a form of big-file implementation. Will also benefit Azure deployments immensely, to deal with a very few big files rather than 1000s of individual small files. |
Nice to hear that some improvements are going to happen. The advantage of using zip over "just inventing of another package binary format" is significant. Direct serialization into .zip files isn't really the goal, because .yml file structure can be turned into .zip files in many other ways. So far I've seen, Unicorn is using "some kind of tree structure" for files, so it should be easy to tweak the part that reads the .yml files to look out for "virtual .yml files" that may exist in .zip files. Maybe I can invest some time to clone and try a proof-of-concept implementation myself. |
It's important to keep in mind here; the concepts currently being worked on would be to allow some form of "redistribution" of the file assets related to a configuration. Something like At the very core and foundation of Rainbow sits the original premise. The premise, the entire toolset is built upon. And that is, the change in Sitecore's original serialization format to the Changing this into a native .zip format just isn't going to happen. Not as it's default file store. That would have to live in a fork of your own if that's what you're after. It would completely shift the foundation of what Rainbow is and wants to achieve. |
I am also trying to pursue the same solution as proposed by @rbruelisauer - we have tons of tiny yaml files and theirs deployment on our production via MsDeploy takes up to an hour (looks like that's a problem of NTFS volume, mounted via NFS file storage, because sometimes it is rocket fast, especially on lower environments, where we have much faster deployment cadence). |
There are two things I am currently considering.
As for the specific question of zipping/unzipping, it might already be doable if you use the built-in powershell commandlets. For the record, I know the pain of deploying thousands of tiny yaml files onto upstream environments. I think it's more a case of thousands of files however than the actual size of these files. Zipping would help - sure - but getting the number of files down from say 8.000 to 8 - will mean a lot. |
I like idea of big yaml read-only yaml file for better portability between versions. |
If anyone is feeling adventurous, both the "big yaml" and "zipped yaml" could and should be implemented entirely by creating a new For read-only, methods such as Save, MoveOrRenameItem can be ignored. |
Finally, once again, consider the PowerShell commandlets. You could generate Sitecore packages at an earlier stage in your deployment process and send those upstream. PowerShell would not be needed to be active upstream, only in your dev environments. |
Idea
Currently, the Unicorn Rainbow Filesystem Provider uses the windows file system to store files.
It would be great, if the provider could also read and write .yml files from/to .zip files.
User Story
I'd like use .zip files to store Unicorn serialized .yml files on production systems.
Reserializing the content tree does not affect the .yml files in the .zip package.
This is helpful for content migration.
Concept
In a few words:
or
f.e. if an item is serialized under
C:\Projects\myproject\Unicorn\Feature\ModuleA\SomeLong\PathsWithin\ThatModule\MyItem.yml
then it's .yml contents can also be stored in Entry
SomeLong\PathsWithin\ThatModule\MyItem.yml
of a file namedC:\Projects\myproject\Unicorn\Feature\ModuleA.zip
.Read only?
It would be ok if the .zip file storage is read-only, since we're mostly having issues with long paths on production systems where we just sync items into the database, not vice-versa. And if we re-sync from prod it's ok to use a pure .yml store.
Performance Impact
It also seems ok to me, that .zip file store could be a bit slower than direct file access, since it needs to read the .zip file and decompress the files. But that can be done with memory efficient "in-memory" Streams using the System.IO.Compression namespace offered by .NET Framework.
In the end, it might turn out faster to read a single file from a storage into memory and then process it in-memory, than querying the filesystem for thousands of small .yml files.
Related Issues
issue #27: long paths would be solved for most situations too.
The text was updated successfully, but these errors were encountered: