Proposal: Settings and Data Replication and Redirection (SADR&R)

%3CLINGO-SUB%20id%3D%22lingo-sub-1639291%22%20slang%3D%22en-US%22%3EProposal%3A%20Settings%20and%20Data%20Replication%20and%20Redirection%20(SADR%26amp%3BR)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1639291%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EISSUE%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EI%20have%20been%20giving%20some%20thought%20as%20to%20how%20an%20enterprise%20can%20have%20packages%20where%20the%20main%20application%20doesn't%20update%20very%20often%2C%20but%20IT%20needs%20to%20apply%20updates%20settings%20or%20data%20on%20a%20constant%20basis%2C%20possibly%20monthly%2C%20weekly%2C%20or%20daily.%26nbsp%3B%20Quite%20often%20there%20is%20a%20back%20end%20service%20also%20involved%20in%20these%20updates%2C%20and%20the%20client%20piece%20must%20be%20kept%20in%20lockstep.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20proposal%20is%20an%20opining%20salvo%3B%20I%20have%20no%20intent%20to%20start%20on%20these%20proposed%20changes%20any%20time%20soon.%20But%20we%20need%20to%20start%20thinking%20about%20ways%20in%20which%20to%20better%20handle%20the%20enterprise%20need%20around%20this.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20proposal%20here%20is%20narrow%20-%20involving%20only%20the%20update%20of%20settings%20and%20data%20files%2C%20and%20not%20of%20updating%20the%20application%20executable%20bits.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EEXISTING%20OPTION%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EOne%20option%20available%20today%20would%20be%20to%20organize%20the%20main%20package%20so%20such%20files%20are%20referenced%20using%20VFS%20pathing%20within%20the%20package%2C%20and%20then%20create%20and%20distribute%20a%20modification%20package%20with%20the%20update%20and%20having%20the%20management%20automation%20remove%20the%20old%20modification%20package%2C%20if%20present.%26nbsp%3B%20Versioning%20on%20the%20modification%20package%20might%20actually%20do%20that%20for%20us%20automatically%2C%20but%20that%20would%20need%20to%20be%20tested.%26nbsp%3B%20The%20proposed%20goal%20is%20to%20eliminate%20the%20need%20to%20constantly%20package%20the%20changes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPROPOSED%20OPTION%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThis%20proposal%20would%20involve%20updates%20to%20the%20Package%20Support%20Framework%20PsfLauncher%2C%20and%20a%20new%20fixup%20shim%20(or%20integration%20into%20the%20existing%20FileRedirectionFixup).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20idea%20is%20to%20support%20the%20ability%20for%20the%20IT%20organization%20to%20update%20settings%20and%20data%20files%20using%20a%20technique%20very%20similar%20to%20what%20they%20often%20do%20today%3A%20utilize%20a%20server%20share%2C%20applying%20the%20updated%20files%20when%20needed%20to%20the%20files%20in%20this%20share.%26nbsp%3B%20This%20could%20mean%20overwriting%20the%20existing%20server%20share%20files%2C%20or%20using%20directory%20naming%20under%20the%20share%20that%20forms%20a%20version%20numbering%20system%20allowing%20the%20new%20data%20files%20to%20be%20added%20to%20new%20folders.%26nbsp%3B%20Such%20a%20share%20would%20be%20constructed%20as%20read-only%20for%20user%20accounts%20associated%20with%20the%20application.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20is%20a%20need%20to%20support%20two%20methods%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EReplication%3C%2FSTRONG%3E%3A%26nbsp%3B%20Replicate%20the%20latest%20files%20to%20the%20client%20locally%20upon%20launch.%20The%20PsfLauncher%20would%20be%20instructed%20(via%20new%20entries%20in%20the%20json.config)%20to%20detect%20and%20copy%20the%20new%20files.%20This%20would%20be%20handled%20at%20launch%20time%2C%20potentially%20slowing%20down%20that%20launch%20depending%20on%20the%20size%20of%20data%20to%20be%20downloaded.%26nbsp%3B%20The%20launcher%20would%20copy%20the%20necessary%20files%20into%20the%20per-user-per-package%20redirection%20area%20under%20the%20appropriate%20WritablePackageRoot%5CVFS%20folder.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ERedirection%3A%3C%2FSTRONG%3E%26nbsp%3B%20Redirect%20appropriate%20file%20requests%20to%20the%20share%20at%20runtime.%20The%20Psf%20Fixup%20dll%20(new%20or%20enhanced%20existing%20one)%20would%20intercept%20individual%20file%20I%2FO%20requests%20and%20when%20they%20match%20the%20regex%20pattern%20of%20the%20fixup%20configuration%20re-direct%20the%20request%20to%20the%20configured%20share%20location.%26nbsp%3B%20This%20does%20not%20slow%20down%20the%20launch%2C%20but%20potentially%20might%20be%20sub-optimal%20for%20accessing%20large%20files%20over%20a%20high-latency%20connection%20to%20the%20share.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20both%20scenarios%2C%20it%20would%20be%20highly%20advantageous%20for%20the%20JSON%20file%20itself%20to%20be%20located%20in%20a%20VFS%20path%20rather%20than%20the%20root%20folder.%26nbsp%3B%20In%20repackaging%20with%20the%20PSF%20and%20PsfTooling%2C%20we%20routinely%20work%20this%20way%20all%20the%20time%20and%20it%20works%20very%20well%3B%20software%20vendors%20creating%20their%20own%20package%20tend%20not%20to%20work%20this%20way%2C%20so%20additional%20instructions%20for%20them%20would%20be%20needed.%20The%20reason%20for%20this%20is%20that%20we%20would%20want%20the%20location%20of%20the%20server%20share%20to%20be%20indicated%20in%20the%20JSON%20file.%26nbsp%3B%20If%20the%20JSON%20file%20is%20located%20in%20the%20main%20package%20in%20a%20VFS%20folder%2C%20then%20it%20is%20possible%20for%20the%20vendor%20to%20supply%20a%20valid%20JSON%20file%20with%20a%20placeholder%20for%20the%20server%20share%20and%20have%20the%20customer%20create%20a%20modification%20package%20(once)%20to%20replace%20the%20JSON%20file%20with%20their%20own.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20plenty%20of%20options%20on%20how%20a%20solution%20to%20this%20problem%20could%20be%20implemented.%26nbsp%3B%20I%20am%20not%20suggesting%20that%20this%20is%20the%20only%2C%20or%20the%20best%2C%20solution.%20I%20do%2C%20however%2C%20want%20to%20start%20the%20conversation%20now%20so%20that%20the%20community%20can%20provide%20input.%26nbsp%3B%20%3CSTRONG%3EThe%20reply%20button%20is%20just%20a%20click%20away!%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETim%3C%2FP%3E%3C%2FLINGO-BODY%3E
MVP

ISSUE:

I have been giving some thought as to how an enterprise can have packages where the main application doesn't update very often, but IT needs to apply updates settings or data on a constant basis, possibly monthly, weekly, or daily.  Quite often there is a back end service also involved in these updates, and the client piece must be kept in lockstep.

 

This proposal is an opining salvo; I have no intent to start on these proposed changes any time soon. But we need to start thinking about ways in which to better handle the enterprise need around this.

 

The proposal here is narrow - involving only the update of settings and data files, and not of updating the application executable bits.

 

EXISTING OPTION:

One option available today would be to organize the main package so such files are referenced using VFS pathing within the package, and then create and distribute a modification package with the update and having the management automation remove the old modification package, if present.  Versioning on the modification package might actually do that for us automatically, but that would need to be tested.  The proposed goal is to eliminate the need to constantly package the changes.

 

PROPOSED OPTION:

This proposal would involve updates to the Package Support Framework PsfLauncher, and a new fixup shim (or integration into the existing FileRedirectionFixup).

 

The idea is to support the ability for the IT organization to update settings and data files using a technique very similar to what they often do today: utilize a server share, applying the updated files when needed to the files in this share.  This could mean overwriting the existing server share files, or using directory naming under the share that forms a version numbering system allowing the new data files to be added to new folders.  Such a share would be constructed as read-only for user accounts associated with the application.

 

There is a need to support two methods:

  • Replication:  Replicate the latest files to the client locally upon launch. The PsfLauncher would be instructed (via new entries in the json.config) to detect and copy the new files. This would be handled at launch time, potentially slowing down that launch depending on the size of data to be downloaded.  The launcher would copy the necessary files into the per-user-per-package redirection area under the appropriate WritablePackageRoot\VFS folder.
  • Redirection:  Redirect appropriate file requests to the share at runtime. The Psf Fixup dll (new or enhanced existing one) would intercept individual file I/O requests and when they match the regex pattern of the fixup configuration re-direct the request to the configured share location.  This does not slow down the launch, but potentially might be sub-optimal for accessing large files over a high-latency connection to the share.

 

For both scenarios, it would be highly advantageous for the JSON file itself to be located in a VFS path rather than the root folder.  In repackaging with the PSF and PsfTooling, we routinely work this way all the time and it works very well; software vendors creating their own package tend not to work this way, so additional instructions for them would be needed. The reason for this is that we would want the location of the server share to be indicated in the JSON file.  If the JSON file is located in the main package in a VFS folder, then it is possible for the vendor to supply a valid JSON file with a placeholder for the server share and have the customer create a modification package (once) to replace the JSON file with their own. 

 

There are plenty of options on how a solution to this problem could be implemented.  I am not suggesting that this is the only, or the best, solution. I do, however, want to start the conversation now so that the community can provide input.  The reply button is just a click away!

 

Tim

0 Replies