OneDrive client status/health check - onedrive

I would like to programmatically validate that the OneDrive (for Business) client is successfully connected and syncing (SDK, file, event log, registry, etc.) on our Windows 10 desktops.
I have seen the OneDriveLib project, which claims to offer this through PowerShell, although it’s not working for me because of the known bug when Files On-Demand is enabled.
We’re looking to implement OneDrive as the default save location for our 5000+ users. When it works, it works great, but how can we know it’s working for all our users? There’s a good possibility that some of the OneDrive clients will break at over time, so any locally saved data will not be synced. At best it will mean that the data will not roam with the user, but worst case scenario would be a machine goes pop with months/years of unrecoverable un-synced data.

there are some local data files here, but i've yet to decipher their meaning:
$env:LOCALAPPDATA\Microsoft\OneDrive\logs\Business1\DeviceHealth.json |
and
$env:LOCALAPPDATA\Microsoft\OneDrive\logs\Business1\DeviceHealthSummaryConfiguration.ini

Related

Saving data on phone in a Cordova app

I am making a mobile app using Cordova and I need to save some sensitive and not so sensitive data inside the phone. I am a bit lost on what is the best way to do it.
I need to save:
A JSON web-token (for authentication).
A response from server (I save this to populate my page in case the GET request fails).
Coordinates information when user is logging data to the app (for later upload to a server from with in the app). These will be many separate logs, and can be large in size for local storage ~5-10 MB.
Till now i have been successfully saving everything I need to the local storage but I don't think that is the correct way to do it. So that is why I need some help in deciding what is the best course to take from security point of view.
Saving server response is just for better UI experience and static in size so I guess local storage is a good option to use.
But web-tokens and GPS logs is sensitive information and I dont want to keep it in the local storage as it is accessible from outside the app.
What other options do I have?
Cordova still doesn't have encrypted storage.
Is saving to files a good approach? This here says that data contained inside cordova.file.applicationStorageDirectory is private to the app.So can I use it to save the logs and the token?
The plugin also lists the file systems for Android and iOS and lists which of those are private.
I am currently working with android phones but want to extend the app to iOS later. I have never worked with file systems and caches before so I am a bit lost.

Using Dropbox API for (subscription) content delivery

I run a multi-gigabyte audio content subscription service. Right now all of our clients get download links via email for all of the content.
I had an idea of employing the Dropbox API after a "successful charge" webhook and giving (read-only) access to a shared Dropbox folder with all of the content. That way, the customer would stay in sync with all updates, changes etc...
The way I picture it, the user checks out and is immediately asked if he would like to add our company's folder to his/her Dropbox.
Does this seem feasible/practical?
Looking at the API, I only see an option to provide a download link but not an actual shared folder. Am I correct in this observation?
That's correct, the Dropbox API doesn't currently offer any API calls for managing shared folders. It only has a way to get the read-only share links like you mentioned.
However, if you'd be interested in potentially participating in a shared folder API beta in the future, please sign up here.
#Greg's answer is correct, but I thought I'd mention a couple other options:
You could use the Saver to let users save the files directly into their Dropbox. This wouldn't help you to push new content to them—they'd still have to visit your site to save the new files—but it would let you cut down on your bandwidth costs, since Dropbox would cache the files for you.
You could use a combination of /copy_ref and /fileops/copy to copy the contents from a central Dropbox account into each user's Dropbox. This wouldn't use any of your bandwidth (once the file was in the central Dropbox account).
Please note, however, that free Dropbox accounts only start with 2GB of storage space. Since you mentioned "multi-gigabyte," you'll need to keep in mind whether your customers will actually have sufficient Dropbox space to store the files you want to share with them. (Even if you were able to use a shared folder, they would need to have enough space left to accept the shared folder invitation.)

How does the Dropbox Datastore API differ from Parse?

How does the Dropbox Datastore API differ from similar offerings like Parse? One difference that I see is that my users pay for server storage instead of me. Are there other differences?
Disclaimer: I'm a Dropbox engineer who worked on the Datastore API, and know about the Parse API only indirectly. Weigh my opinion appropriately. Major differences I know of (pro and con):
Dropbox Datastores are free to the developer, and free the user for the first 5MB per-app (after which their Dropbox quota applies). Parse charges developers based on how many API requests they’re making.
Parse has minimal offline support, while Dropbox has full offline operation. With Dropbox, if the developer modifies data while offline, those modifications will be reflected in subsequent queries (with Parse, those changes are not reflected). Dropbox provides on-device query logic (unlike Parse) so that apps can continue to generate the views they need to, even when there’s no Internet available. In addition, Parse does not provide conflict resolution or querying offline.
Parse provides the ability to share data between users, and global data for all users of the app. Dropbox Datastores only support per-user data (for each app) for now (sharing is on the roadmap).
I would also add that:
Parse is full feature of backend of as service. You can find a pretty complete list of the other player in this field: http://en.wikipedia.org/wiki/Backend_as_a_service. They provide feature like:
Data service
User registration/auth
Push notification
Social
The dropbox Datastore APIs is more focusing on data services. (You also got the User part for free too?) Also it works full offline.
The Parse framework can store data that can be ready by any user in the application.
The Dropbox datastore, store data for each user, and you can't accesss data from other user. That's the main difference.
So easy to get lost in this since you have to read between the lines. My take is that with Datastore you are working with objects stored offline locally as json. I'm hoping they will soon release a Xamarin Android component - they released an IOS component last month. Since Xamarin targets both Android and IOS and Winphone, who knows why they made a dedicated IOS DLL for Xamarin but I digress. With Parse, it appears to me their intent is the always-connected-device. Sure you can save queries locally and you can save (save eventually) locally where Parse will push to the server when it is connected. But saving "eventually" and saving queries for offline work is a different design than just saving and letting Parse do it all in the background for you - which it does not unless I have missed something that would make this attractive to me. I cannot see Parse useable for devices that you know will be sometimes-connected, without a lot of code to make this happen and sync.

Dropbox differential/incremental uploads using REST API

We know that Dropbox desktop clients use a binary diff algorithm to break down all files into blocks, and only upload blocks that it doesn't already have in the cloud (https://serverfault.com/questions/52861/how-does-dropbox-version-upload-large-files).
Nevertheless, the Dropbox API, as far as I see, can only upload the whole file (/files_put, /files (POST)) when a sync is needed.
Is there any way to do differential/incremental syncing using the Dropbox API, i.e. upload only the changed portion of the file like the desktop clients do?
If this is not possible, then what are the best practices to periodically sync large files that has small changes using the Dropbox API?
Unfortunately this isn't possible and I would suspect that it may never be available.
After doing a bit of research, I found a feature request for delta-syncing to be integrated into the API[*]. Dropbox hasn't responded, nor has the community upvoted this request.
I would make an educated guess that the reason why Dropbox hasn't provided this functionality, and likely never will, is because this is a dangerous feature in the hands of unknown developers.
Consider the case where you write an application that uses such a delta-change update system for updating large files. You thoroughly test your app and publish it to an app store. A couple of weeks after your initial release, and numerous downloads, you start receiving bad reviews and complaints because you managed to miss a very specific test case.
Within this specific, buggy case you've miscalculated a differential offset by 1-byte. Oh no! You've now corrupted thousands of files, for hundreds of users!
Considering such a possibility, I think I would personally request that Dropbox NEVER provide such a dev feature. If they integrated such a function into the API, they would be breaking their #1 purpose-- to provide consistent, safe, & reliable cloud backups of your important files.
[*]: This was the original reference location, but it is now a dead link.
(https://www.dropbox.com/votebox/1515/delta-sync-api-for-mobile-applications)

Collecting Stats

I'm writing an application for the Mac App Store in Obj-C/Cocoa. The app processes .html files and does not require an internet connection.
I was wondering, what would be the best way to collect statistics? All I'm interested in is the number of files processed.
That way, on the app's home page, I can display XXX,XXX files processed.
I was thinking that I would just post to a web server whenever a file was converted, but that would considerably slow down the app and wouldn't work if the user was not connected to the internet.
You could accumulate the stats internally to be uploaded only every so often (each day, perhaps). You'd save the accumulated number across restarts using NSUserDefaults.
You should ask the user for permission to upload data, even something so seemingly innocuous as a count of processed files.
You'd use a simple HTTP request to upload the data. (You know it will be vulnerable to spoofing, right?) You should use the network reachability API to check whether the system is network connected before trying, so you don't force a dial-up, for example. The reachability API can't tell you that your connection will for sure succeed, so you should handle failure to connect gracefully.