MBrace.Core icon indicating copy to clipboard operation
MBrace.Core copied to clipboard

Request: RegisterNativeDependency on directories

Open kxxr opened this issue 9 years ago • 6 comments

RegisterNativeDependency works well on individual files. However we also have scenarios where we need to register a whole directory structure of native files and other data. Would it be possible to make RND accept a directory as an argument, copying the whole directory structure across recursively? Or to have RND accept an optional parameter which is a target subdirectory for a file?

kxxr avatar Jan 22 '16 14:01 kxxr

What would be the contents for this directory? If it's just native dll's it should be straightforward to call the existing function on all enumerated contents. If there's other stuff inside, RND is not an appropriate functionality. For this type of application I usually upload all the contents as a zip archive to blob storage, then download and extract the contents on each worker on-demand; I also wrap that logic inside a DomainLocal instance to ensure that it's only being downloaded once per worker.

eiriktsarpalis avatar Jan 25 '16 22:01 eiriktsarpalis

For the application I saw, it would be a massive mix of native DLLs, config files, data files, and goodness knows what else. Basically a situation where some native DLLs expect some data/config files in specific locations relative to their installation point.

dsyme avatar Jan 26 '16 18:01 dsyme

So basically the expectation would be to have those files exracted locally in a location inside PATH?

eiriktsarpalis avatar Jan 26 '16 18:01 eiriktsarpalis

Thanks for your response, yes I think that's what you're saying. Say in a "bin" folder there is a loader.dll that requires upon startup that a loader.config be found at relative path "conf", it would be useful to be able to say something like RND("bin/loader.dll") RND("conf", "bin/conf/loader.config") That way if "tmp" is the temp folder the .dlls are copied to by MBrace, loader.config will end up in "tmp/conf" instead of "tmp"

kxxr avatar Jan 27 '16 11:01 kxxr

@kxxr I know this is sometime back but if you would like to consider submitting a PR for this it would be most welcome.

dsyme avatar Jun 08 '17 16:06 dsyme

@dsyme I'd be glad to help on this and other issues but am currently on holiday and was also focusing on other interests for the time being... will mention this to Adam though who may well be more in the loop

kxxr avatar Jun 09 '17 20:06 kxxr