Sunday, March 22, 2015

Data Persistence in Windows Universal (8.1) apps (Boston Code Camp 23)

Thanks to everyone who joined me for my Boston Code Camp 23 presentation.  Shuffling data around is a core responsibility of any serious computing platform.  Windows Universal really goes above and beyond the mundane call of duty with consistency and utility. It's part of what makes the Windows client platform a true "cloud car", especially with its Backup, Roaming Settings / Folders, and Roaming Password Vault capabilities as native functionality... all from the Windows.Storage namespace.

Here are
For the individual who asked what encryption level the Windows Password Vault functionality uses, I looked it up, and it's 128bit AES encryption.  Stern stuff there.

Another question came up about app backups.  As I said in the presentation, the content of the Local storage is backed up automatically to the cloud by the OS.  (Isn't that fantastic?!)

Likewise, as mentioned, the Temporary storage is excluded from backups.

One detail I missed however... the LocalCache storage area.  LocalCache is like Local except that it is not backed up.  LocalCache differs from Temporary storage in that the OS will not wipe it as it occasionally does the Temporary storage.  Next time I do this presentation, I'll make sure to update it to discuss LocalCache.


Here's a comparison of the storage options available to developers in the 8.1/universal platform. Note that each user on a device gets their own app-specific sandbox *and* OneDrive space for each installed app.


TypeAvailabilityLimitsSettings hashtableBacked Up By OSSync'd to all App / User / Devices by OSEncryptionWiped By OS if space is lowUri prefixSuggested use
Install PackageUniversalStatic/ReadOnly Media from InstallNoNoNoSandboxedNoms-appx://Version specific static app media
LocalUniversalAvailable free storageYesYesNoSandboxedNoms-appdata:///local/General
Local CacheWindows Phone OnlyAvailable free storageYesNoNoSandboxedNo Persistent cache
TemporaryUniversalAvailable free storageYesNoNoSandboxedYesms-appdata:///tempSemi-persistent cache
SD/RemovableUniversalAvailable free storageNoNoNoNoneNo Removable/general
RoamingUniversal100kYes(by virtue of roaming)YesCloud PartitionedNoms-appdata:///roamingRoaming settings
Password VaultUniversal100k (included in Roaming)Password-friendly structure(by virtue of roaming)YesCloud Partioned + 128bit AESNo Roaming credentials /OAuth tokens



I asked my stunt audience (the kids) later what my presentation had been about.  I was glad to know at least one of them had gotten it right. 

They were inspired, though, and that's the important part. 

I hope you found inspiration in technology from both the day and maybe in some small part from my presentation.