I'm developing a WP7 application that collects users data and stores it in a cloud somewhere. This data can later be accessed by the user elsewhere.
Now, anybody who can recommend a good and efficient way of this data storage?
I was thinking of storing this data in the user's skydrive from which he can later access it.
Any other suggestions please?
There is Amazon S3. A cloud storage that has many features and has a .NET SDK too.
Take a look on pastebin.com which may be interesting for you. You can post debug info via simple http post request (no user interaction required, easy integration). But there are limitations for free account: 10 private records, max 15 requests a day.
Related
I'm currently facing a few issues which I need advice on.
I apologise in advance if the questions don't make much sense or if they have been answered before (I found somewhat relevant questions, but either didn't understand the answers or did not think they applied to my situation). Any guidance in this field or answers to the question would be extremely helpful.
Situation: We have a standalone app rolled out to customers, which uses AWS Userpools for user accounts.
Issue number 1, storing the AWS (and other) API keys:
I've read around and quickly realised the most secure location to store them is server side.
We have an FTP server set up currently used for auto updates which I assume can also be used for retrieving the API keys.
Issue with this is that we still need to store the information to access the server somewhere securely.
What would be the best approach for storing and accessing API keys on server side?
Once API keys have been retrieved can we store them in memory to not have to access server again?
Issue Number 2, feature flags:
Due to different pay levels we have implemented feature flags, these flags are retrieved from a database when connecting to the app online.
However if they need to get on the app whilst offline they need to be stored locally in a way where they can not be modified.
Is it safe enough to encrypt the data and store it in a file locally and decrypt it on app startup?
Issue Number 3, making sure the user is ok to use app if offline:
As we want the user to not be able to log in after a set amount of days in offline mode without reconnecting I imagine I should be going down the route of using the AWS Userpool Tokens. How would one safely store these tokens to persist through app closure and is there any risk of storing them locally?
I imagine encrypting the server access information and feature flags in files is a way to go, however then we need an encryption key in order to decrypt these files. Where would one store that?
Note: I'm more concerned about the API keys rather than the feature flags.
I have a web application that creates/deletes buckets, uploads/downloads objects from google storage and I am successfully using Google Apis Storage v1 and v1.Data in C#.
I would like to know if there is a way to find out how much space a bucket has used using the Google Apis. I was thinking something like StorageClient.GetBucket would return this information but it doesn't seem to.
All the help documentation seems to point to the gsutil but I can't use that as this is for a web application.
So to clarify I am using Cloud Storage Client Libraries
I want to be able to look at any given moment how much space has been used for a particular bucket, using the Google.Storage.Apis (which isn't the XML API or JSON API)
Any help would be very much appreciated.
You can set up bucket logging per Bucket Logging Doc, which will generate a file once a day with the total size (in bytes) of the buckets you defined.
And you've created a feature request as FR/37237171 at the issue tracker.
Is there some concept implemented in Microsoft Graph OneDrive API that I can leverage for offline files from C#?
I would like to store user files for my app in OneDrive yet this should be also possible when the user is offline. As soon as she goes online there should be some synching going on and files get downloaded/uploaded as needed.
EDIT
How is the scope wl.offline_access related to this topic? It sounds promising, but there is little info about it. I suspect it is about using OneDrive while being online but not being signed in. Then it would not be a solution for me. Is this correct?
You certainly could do this with Graph but you would need to handle tracking and syncing changes within your application. I would highly recommend directing your users to use the OneDrive app rather than attempt to replicate this functionality on your own. Building a fully functioning sync client is non-trivial endeavor to put it mildly.
The offline_access scope is used to obtain a Refresh Token so that your server can continue to operate on behalf of the user without requiring the user to be online.
I have some user data in my Winstore C# app. I just learnt that local store and app data are being erased after new version of the app is installed (or user reinstalled the app).
How to permanently store the data? Can it be done transparently for the user?
What about enterprise class of apps - how do you guys access more robust data like databases?
Removing all local data when an app is uninstalled is the expected pattern for Windows Store apps.
If you want to store data permanently, my recommendation is that you consider building a back-end data store and services to access them. Then you control the server-side data, and can associate the data with the users when they install your app (note that if you plan to store data and not delete it when the user uninstalls the app, you should probably call that out in your app's privacy policy).
There are several good options in terms of building back-end services, and I explore several of them in a blog series I'm currently working on:
http://bitly.com/bundles/devhammer/2
The series covers building a back-end game leaderboard service which stores data in a SQL Database on Windows Azure (though the concepts are applicable to services you host yourself as well), using one of 3 stacks:
WCF Data Services
ASP.NET Web API
Windows Azure Mobile Services
Any of those three stacks will allow you to create a robust back-end for your apps, and can be leveraged across platforms.
With respect to transparency, you can definitely make the above services functionally transparent to the user, but as noted above, it's a good idea to also be transparent about the fact that you plan to continue to store data after the app is uninstalled, and perhaps even give the user options for deleting their data. Pete Brown recently posted a good overview of traits of a good Windows Store app privacy policy, and addresses this a bit in the post:
http://10rem.net/blog/2013/01/21/traits-of-a-good-windows-store-app-privacy-policy
For more info on Windows Store app development, register for Generation App.
You can use something like Skydrive or Dropbox to store the files.
EDIT*
There is no database access support in WinRT. While you can use something like SQLite to store data locally - it would be used mostly for caching and it would be expected that you persist the data somewhere in the cloud, so you should still upload the data you want stored somewhere outside of your machine.
If you want to store files on your machine that don't get deleted with your app - you can save them somewhere in the documents/pictures/music/videos libraries, depending on where they fit best.
The place where I work has 2 servers and a load balancer. The setup is horrible since I have to manually make sure both servers have the same files. I know there are ways to automate this but it has not been implemented, hopefully soon (I have no control over this). I wrote an application that collects a bunch of information from a user, then creates a folder named after the email of the user in one of the servers. The problem is that I can't control in which server the folder gets created in, so let say a user goes in.. fills his stuff and his folder gets created in server 1, user goes away for a while and goes back to the site but this time the load balancer throws the user into server 2, now the user does something that needs to be saved into his folder but since it didn't created in this server an error occurs. What can I do about this? any suggestions?
Thanks
It sounds like you could solve a few issues by implementing a cloud file service for the file writes such as Amazon S3 http://aws.amazon.com/s3/
Disk size management would no longer be a concern
Files are now written and read from S3 so load balancer concerns are solved
Benefits of a semi-edge network with AWS. (not truly edge but in my experience better than most internally hosted solutions)
Don't store your data in the file system, store it in a database.
If you really can't avoid using the file system, you could look at storing the files in a network share both servers have access to. This would be a terrible hack, however.
It sounds like you may be having a session state issue. It sounds odd the way you describe it, but have a look at this article. It's old, but covers the basics. If it doesn't try googling "asp.net session state web farm"
http://ondotnet.com/pub/a/dotnet/2003/03/24/sessionstate.html
Use NAS or SAN to centralize storage. That same network-accessible storage can store the shared configuration that IIS can be setup to use.
Web Deploy v2 just released from Microsoft, I would encourage the powers that be to investigate that, along with Application Request Routing and the greater Web Farm Framework.
This is a normal infrastructure setup. Below are the two commonly used solutions for the situation you are in.
If you have network attached storage available (e.g. Netapps), you can use this storage to centrally store all of your user files that need to be available across all servers in your web farm.
Redesign your application to store all user specific data in a database.