pnoltes commented on PR #441:
URL: https://github.com/apache/celix/pull/441#issuecomment-1241138001

   > > Currently the bundle symbolic name and version can only be read from the 
zip, so some though how to solve this nicely (and without too much overhead) is 
needed.
   > 
   > Suppose we have file-lock protected global cache at hand, then we can 
first unzip the bundle to `~/.celix/staging` temporarily, and then `mv` to its 
final destination. Under the protection of our locking scheme, there is only 
one user concurrently of the global cache and thus of the staging 
sub-directory. Given 'mv' is fairly cheap when within the same filesystem, the 
situation is nearly ideal.
   
   Yes, for unpacking and then moving a staging area will work.  I think the 
challenge is more in how to decide if a bundle does not need to be extracted, 
because it is already in the cache. This can be done with a hash and hash 
index, but maybe a hash is already too expensive.
   
   An other option could be to only extract the MANIFEST.MF file from a bundle 
and use that to see if the rest needs to be extracted. This can work 
efficiently (also memory wise) if the bundle are created with the java jar 
command, because a jar is technically a zip file but ensure that the MANIFEST 
is the first entry in the zip file.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to