What is a Cheaper, more pragmatic way to store Synced Data for a UWP App? - sql

I am building a UWP app that targets both x86, x64 and ARM platforms. I want to replace the current implementation that uses Azure for the backed (an App Service and an SQL Server) because of the high price and because my Pay-As-You-Go subscription does not allow me to set a spending limit.
I thought about using a local database but I don't know if that could be a solution since I want the user to be able to have his data synced on both PC and phone for example. I am also ok with renouncing the idea of a structured database in favor of structured files (like xml) if I can find a way to keep them somewhere in the cloud (and then I can read/write them from the client app - no need for App Service).
Are there any free, non-trial alternatives to Azure? Or should I look more into the file storage implementation? Thanks in advance.

Instead of Azure you could use another web hosting solution to publish you API. Azure also offers small free plans that might be sufficient.
An alternative would be to request access and store/sync data to user's OneDrive. Each logged in user with Microsoft Account should have OneDrive storage available so this is a good middle-ground, which is still free for you. A nice introduction to this can be found in this article.
UWP also offers RoamingFolder where you can store small files that are synced across the devices that you use. Unfortunately this is less reliable because you are not able to control when the sync happens and cannot resolve conflicts.

I have successfully migrated to another cloud platform: Heroku. In my opinion, at least for small apps, Heroku offers the best solution both technology-wise and price-wise.
I am now able to have a webservice hosted for free in the cloud, without worring about traffic and number of requests. Of course you can scale up if you want better performance, but you can start with a free plan. Also, I have a postgressql db hosted also in the cloud, also for free (up until 10 000 records, and it will be just 9$/month if I want to upgrade to 10 milion). One can never found an offer like this free on Azure.
I had to learn a bit of Node.js (there are a lot of languages Heroku supports for backend services, but .Net is not one of them) but it was totally worth it!
Another option that is now starting to gain more and more popularity is FireBase. I will certantly also check that out for my future apps.

Related

How do I launch/publish my website? ASP.NET Core

I'm new to web development and just built my first website with .Net Core. It's primarily HTML, CSS, and JavaScript with a little C# for a contact form.
Without recommending any service providers (question will be taken down), how do I go about deploying the website? The more details the better as I have no idea what I'm doing haha.
Edit: I am definitely going to go with a service provider, however the business I am building the website for doesn't have a large budget so I want to find the best provider at the lowest cost.
Daniel,
As you suspect, this is a bit of a loaded question as there are so many approaches. One approach is to use App Services within Microsoft Azure. You can create a free trial Azure account to start that includes a 200.00 credit, which is more than enough to do all of this for free. Then, using the Azure Management Portal, create an App Service (also free) on an App Service Plan in a region that makes sense for you (i.e. US West). Once you do that, you can download what is called a Publish Profile from within the App Service's Management Portal in Azure.
If you're using Visual Studio, for example, you can then right click your project and "Publish" it (deploy to the cloud, or the App Service you just created). One option in that process is to import an Azure Publish Profile, which you can do with the one you just downloaded. This makes it really simple. The Publish Profile is really just connection information to your Azure App Service (open it in Notepad to see). It will chug for a bit and then publish and load the app for you. You can also get to the hosted version of your app by clicking the Url of the app in the App Service management portal on the main page.
This may be oversimplifying what you need to do, but this is a valid direction to take. AWS and others have similar approaches.
Again, tons of ways to do this, but this is a free approach. :-) I don't consider Azure a Service Provider in the sense that you asked us not to. Instead, I wanted to outline one turn-key approach with specific details on how to get there.
You can find specific steps in a lot of places, such as this link:
https://www.geeksforgeeks.org/deploying-your-web-app-using-azure-app-service/
DanielG's answer is useful, but you mentioned you don't want use any services from service provider.
Usually, there are only three ways to deploy the program,
first one is the app service provided by the service provider mentioned by DanielG,
**Benefits of using service provider products:**
1. Very friendly to newbies, follow the documentation to deploy the application in a few minutes.
2. It offers a very stable, scalable service that monitors the health of our website.
3. We can get their technical support.
**Shortcoming**
It is a paid service, and although Azure's service has a free quota, it will run out.
**Suggestion**
It is recommended that websites that are officially launched use the services of service providers.
second one is to use fixed IP for access (it seems that fixed iPv4 IP is not provided in network operations),
**Benefits of using fixed IP:**
If there is a fixed IP address, or if the carrier supports iPv6, we can deploy our website, and the public network can access it. And if you have domain, it also can support https.
**Shortcoming**
1. There are cybersecurity risks and are vulnerable to attack.
2. Without perfect website health monitoring, all problems need to be checked by yourself, and it is very troublesome to achieve elastic expansion.
**Suggestion**
It is generally not recommended because there is no fixed IP under normal circumstances. Broadband operators used to offer it, but now it doesn't.
If you are interested, you can try ipv6 to test.
the last one is to use tools such as ngrok or frp for intranet penetration.
**Benefits of using intranet penetration:**
Free intranet penetration services such as ngrok, the URL generated by each run is not fixed, and there are some limitations, such as a new URL will be generated after a certain period of time, which is enough for testing.
Of course you can purchase the service of this tool, which provides fixed URLs and supports https.
**Shortcoming (same as the second one)**
**Suggestion**
The functional implementation is the same as the second suggestion, and the physical devices used by the website are all their own. The intranet penetration tool (ngrok, or frp) solves the problem of not having a fixed IP, providing a URL that you can access.
There are few users and the demand for web services is not high, so it is recommended that individual users or small business users use ngrok and frp in this scenario. Generally suitable for OA use in small businesses.

Requirement to develop scalable web application

We're planning to develop a web based Healthcare Practice Management System. Due to HIPAA we're requested to deploy the app in our own premises. Our company is relatively small currently we have only software engineers and no devops engineers but still we want to develop the application to support horizontal scaling(adding more servers).
Planned to use:
Python3 (Django)
PostgreSQL
I'm looking for something like AppScale but with the freedom of choosing our own runtime, database and frameworks.
In other words from the software engineer's perspective:
Should provide an easy way to deploy django application
Should have web based dashboard to monitor and control(like AppScale)
Should make load balancing simple (app and database)
AppScale implements the Google App Engine APIs which, IMHO, make it super easy to develop web apps quickly and efficiently.
On top of that, you get auto-scaling, load balancing, and the ability to deploy on-premises and plug in any third-party library you need.
AppScale already comes with a dashboard and will soon be launching a new management service for your AppScale deployment(s).
If you're not particularly hung up on Python3 and PostgreSQL, all of the above seem to cover your requirements.
It's worth noting that opting for the GAE model means you opt for NoSQL and, so, postgres is probably not the best option.
Disclaimer: I'm part of the AppScale team and we're already helping companies develop and deliver their apps in the HIPAA compliance realm.
I chose Kubernetes which is a container orchestration technology specifically designed for Docker and also found that scaling is not just the responsibility of platform that the app is deployed on but also its depends on how the app is designed and coded. For that The Twelve-Factor App methodology is really helpful.
But I can't deploy database on Kubernetes because its not recommended by Kelsey Hightower(author of Kubernetes Up and Running) in his talk. So, for now I chose to deploy my database on a VM.

How to rapidly publish web role cloud service, uploading only binaries, avoiding wholly restarting the VM?

Possible ways to accomplish it:
Creating dedicated WCF service for this purpose (currently my favorite option)
Using the REST API?
Azure PowerShell?
Explanation:
Publishing a web-role cloud-service takes about 10 minutes. It's much too long during development - I try to do as much as I can offline, unit-test-ish and modular, but it's just impossible to completely avoid development cycles altogether with the VM.
Apparently, the long time is mostly a result of the machine being wholly restarted, so I'm trying to find an automatic solution, like uploading and installing the binaries.
What is the best way to accomplish it?
What do you think? would it cut at least 50% of the publishing time?
Do you expect any critical problems?
The solutions proposed below are definitely against best practices and should NEVER-EVER be used in production environment.
If your objective is to quickly test your changes in your development environment, there are two ways you can go about it.
Enable RDP and copy your modified binaries or other files directly in the appropriate folders on the VM. You could enable Remote Desktop on your web role and copy the files manually in appropriate folders.
Use Web Deploy: This will only work for web roles in your project but you could enable Web Deploy on your Web Roles and use that to make faster deployment. Please see this link for more details on how to use this feature: https://msdn.microsoft.com/en-us/library/azure/ff683672.aspx.

Share settings between related Windows Store Apps

We are currently planning to develop a suite of Windows Store Apps. They are independent and fully work alone, but they are related and act in concert. If a user has several of them, they should share some of their settings (and data), so that the user does not have to manually change these settings in every single one of them.
Is such a scenario even intented?
And how to implement it?
Registry: Does not work. Apps cannot access the registry.
ApplicationData (LocalFolder, LocalSettings etc.): Does not work. Apps cannot access the data of other apps.
Cloud services: Kind of works, but only when the machine is online. Our apps should work offline, too. And we would need to create/rent such a cloud service, which would cause additional costs.
KnownFolder.DocumentsLibrary: This –currently– looks like the only solution to me. The apps are already saving and sharing data there, so let's just save our settings there, too. But the name of the shared folder is one of the settings! And Windows Store Apps cannot create hidden files, so the user can see the settings file. This makes this solution a bit... "rough".
Any other ideas or additional information I have missed?
If you want them to sync with each other instantly, even when the device is offline, then that's your only option. Windows 8 Apps are not intended to share settings.
So much want of sharing.
Roaming API will only share with the SAME app, the SAME user, ANY W8 device.
SkyDrive will only share across ANY app, the SAME user, ANY device.
Using Azure (or any web service) will share across ANY app, ANY user, ANY device.
Don't do this
Don't use the register, the API is not supported
Don't use the file system, the boundaries cause your app to be brittle
Don't use ApplicationData.AnyFolder, this is restricted to a single app GUID
You had might as well get "instant" out of your language, man. That just doesn't happen. But you can have fast (let's call it near instant); you can use Sockets or SignalR to connect your client to some service out there with nearly instant responses. A less sophisticated approach would be to poll from your client, too. It has served developers for decades.

Questions About Using Amazon Web Services (AWS) For Remote Development

We are a very small mobile company (building an application for the iphone) and we are currently considering hosting services. We are currently leaning towards Amazon's hosting/web services. Accordingly, I have some questions:
1) Can I create an admin account on AWS and assign user accounts to developers that should have access to most (but not all) features.
2) Do we need to learn / use AWS APIs in the development of our product? I don't like the
idea of having to create hooks into a hosting service.
3) It looks like the pricing for AWS scales with usage. So, since we are in development and have only developers accessing the server right now, am I right that the cost will be quite low if anything?
4) How does AWS do version management? We have several developers scattered throughout the country. Each will need to checkout the the recent build from the server for development
on his local box. Basically, something like SVN. Is this possible?
5) I am guessing we need something like a dev, svn, and production server? Is this right? If so, how do I set this up and find out the associated costs?
6) We are considering a few database options, among them NoSQL and Neo4j - will we be able to do this using AWS? The server language will be Java.
Thanks for your time.
To answer your questions:
Yes, kind of. There is Identity and Access Management offered by AWS, but it's not the easiest solution to use. Having said that, it can allow you to lock down some of the access activities on an account so that you have some control over your users. I would say that AWS is still very much a single-user environment for server administrators.
You could get away using only the management console. Your use of scripting may only be required if you want to run batch or periodic activities (eg. take a snapshot of all machines at 2am every night).
Costs for EC2 are low, especially for the Micro machine sizes. But keep in mind that the idea of cloud computing is the availability of on-demand resources for short term use. If you run dev machines needlessly over night then you will still be paying! And if someone launches an Extra Large machine (or 30 machine instances) then you will suddenly find yourself with bigger bills than expected.
(5. and 6. as well) Amazon EC2 is really about issuing you the boxes. What you do thereafter is fully up to you. You can create snapshots daily of your machines, you can deploy SVN and noSQL etc. etc.
I've been seriously into EC2 for a while now, and lots of companies are starting to look at the idea you propose. There are benefits to giving staff on-demand compute power, without having to manage any infrastructure in-house. But I will re-iterate my first point that EC2 is very much a single-user, server administration environment, which doesn't lend itself to being used as a dev playground without additional tools. (Or at least it becomes a challenging task if you have several devs spread around in your company).
I own a business that helps companies use EC2 for dev/lab/playground type of environments. I won't directly flog it here, but will show a quick demo we just put on DropBox: http://dl.dropbox.com/u/16347737/RequestEC2Machines.html Feel free to request a machine to see how adding process to EC2 can help meet your goals.
I run/develop a website using Amazon EC2 & SimpleDB and I have some comments for you on your questions
Hi.
We are a very small mobile company (building an application for the iphone) and we are currently considering hosting services. We are currently leaning towards Amazon's hosting/web services. Accordingly, I have some questions:
1) Can I create an admin account on
AWS and assign user accounts to
developers that should have access to
most (but not all) features.
In my experience, there doesn't seem to be a direct correspondence between Amazon users and users on a single instance. An instance's root account is connected to the amazon account indirectly through a key pair. Although, I must say that I haven't explored this question in detail.
2) Do we need to learn / use AWS APIs in the development of our product? I don't like the > idea of having to create hooks into a hosting service.
I manage everything through their web console and Eclipse IDE plugins. I've never had to touch the API yet for development and deployment.
3) It looks like the pricing for AWS scales with usage. So, since we are in
development and have only developers accessing the server right now, am
I right that the cost will be quite low if anything?
Micro instances cost the lowest and the cost is pretty good if you're just starting an instance for a couple of hours and then stopping it. I never think twice about starting a micro instance to try out something new
4) How does AWS do version management? We have several developers
scattered throughout the country. Each will need to checkout the the recent
build from the server for development on his local box. Basically, something like SVN.
Is this possible?
I haven't seen this feature being offered directly by Amazon. You can of course keep an instance always on for your repository with backups
5) I am guessing we need something like a dev, svn, and production server?
Is this right? If so, how do I set this up and find out the associated costs?
EC Pricing - http://aws.amazon.com/ec2/pricing/
Amazon Simple Monthly Calculator - http://calculator.s3.amazonaws.com/calc5.html
6) We are considering a few database options, among them NoSQL and Neo4j -
will we be able to do this using AWS? The server language will be Java.
Amazon instances can be what you want them to be, hence you can either use a pre-configured ami to launch an instance or start off with a bare bones Ubuntu Server or Windows Server e.g. and build a system with what you want. You can then save the snapshot of that system to launch more in the future or to re-launch if your instance crashes