Windows Azure - sql database with api - sql

I have SOAP services with data. I want to download all data from that service and upload it to my own server and then use these data from my server (don't worry I have permission for that). I want to do it because now I don't have function from that service which I need.
I want to use Windows Azure for this and I think SQL Database scenario would be best. Now I have classes for previous SOAP service so I think EF Code first would help me with creating database and I upload data somehow. But what about API? How can I access my data from windows phone or tablet? Is azure database enought or I must create more? Is there any good article for that?

I think what you are saying, is that you are aggregating data from several sources and storing the information in your own database. And, you would like your database to be Azure Database. Then, you want to build an API to expose the data you retrieved.
If this is indeed your goal, then yes, Azure will do everything you need. I'd recommend checking out Web API in conjunction with your Azure deployment. I've used this scheme with some success over the past year.
Warning: You should know that Azure Database does not have an SLA which means that Microsoft does not guarantee any level of performance including transactions/second. This means that if your API has a high load, you could end up getting throttled heavily in an unpredictable way. I've been bitten by this before and ended up moving my data to Azure Table Storage instead.

Windows Azure gives you a few options to expose an API to your mobile clients:
You could build an API yourself with the ASP.NET Web API (and use SQL Azure as backend): Mobile-friendly REST service using ASP.NET Web API and SQL Database
You can use Windows Azure Mobile Services, this does all the heavy lifting of building a backend for you

Related

for Xamarin Forms, is there a REST API for queries, or do I have to create endpoints?

I would like to connect a Xamarin Forms app to a cloud DB and submit queries (or updates, etc) to the DB via some sort of REST API, where the info passed to the DB is a query, not and endpoint.
I'm seeing plenty of documentation on using various packages to communicate via endpoints, which means I would have to setup those endpoints on my cloud DB. But I don't see anything on using freeform queries.
I realize that in the long run, free form queries are not going to be as efficient. But they would sure make dev & debugging easier. Is there a way to do this ?
Which cloud service are you using? If it's AWS, check out Lambda. In Azure, Azure Functions is Equivalent. You can use that to create a serverless endpoint.

How to track requests and exceptions within the Azure WebApp application

We are using Application Insights SDK for our Azure WebApp application with Azure SQL Database and Azure Storage. Which Azure Service we can use to track time specific code requests and exceptions within the application?
If you are already using Application Insights SDK, you can use it to track requests, exceptions, dependencies etc.
https://learn.microsoft.com/en-us/azure/application-insights/app-insights-asp-net
The application insights SDK provides many methods for logging, so you can use built-in method like TrackException, TrackTrace, Trackxxx to track. Details are here.

Where to call Azure Blob Storage APIs from - web app server side or azure function

Is it better (best practice wise) to use the Azure Blob Storage APIs from an Azure Web App (server side code) or make the API calls from an Azure function.
I think using the functions way is better for 'separation of concerns', more maintainable - in that multiple apps could use the same azure function - one place instead of many, can be monitored from within Azure (metrics) and dashboard. During a data breach a function can be turned off without shutting down the web app. Are there other reasons to use the API from a function vs the Web App backend?
Thanks

Is it possible to autogenerate an API with Microsoft Azure?

I would like to host a Database and an API-Backend within Azure. But I want to do that without implementing code because I just want to run typical read/write actions.
Is it possible to generate an API for an existent Azure SQL Database? All "Creating API"-Examples I find in the Azure Documentation use ASP.Net or NodeJS. So is autogeneration possible with Azure?
As far as I am aware, there is no functionality to automatically provide an API interface over Sql Azure. The REST api that Azure provides is to manage the database, not to access that data.
You can use an Azure web-app to host your WebAPI auto-generated code. In Visual Studio, you can use Entity Framework database first approach to generate the API trivially. You will need to compile and publish it to a web app to get your API going.
You can find a pretty exhaustive tutorial at
https://azure.microsoft.com/en-in/documentation/articles/web-sites-dotnet-rest-service-aspnet-api-sql-database/
(skip the MVC section altogether and just use WebAPI and EF)

Azure SQL Database Vs Azure Mobile Services

I am trying to port my Android application into a Cloud based one. Where I wanted the data stored in cloud. I am a .NET guy so looking into Azure. I see Azure Mobile services which allows me to create tables and ability to authenticate. I also Looked into Azure SQL database.
I would like to know what is the difference between these two services and what are the scenarios using mobile services gives values than using Azure SQL database
Actually, the tables you see listed in Azure Mobile Services are actually tables that are in an Azure SQL Database instance. The Mobile Services provides an abstraction layer on top of the tables in SQL Server. If you use the current JavaScript back-ended mobile services you'll see the table in the management portal and it uses the dynamic nature of JavaScript to provide what appears to be a NoSQL like experience with Azure SQL DB in that you can send in an object and properties it doesn't recognize will be added to the table schema (you turn this off when you ship to production :) ). The big thing to remember is that under the hood the database is an Azure SQL DB, so you should have access and do anything via the one created by Azure Mobile Services as you can with the raw Azure SQL DB.
By using Azure Mobile Services you get an API hosting layer that you can use to do direct access to the tables (based on the permissions you hinted at) but also to just about anything utilizing the custom API feature.
If you chose to bypass the Azure Mobile Services you'd likely want to have some API layer between your Android app and the data for a variety of reasons (security, abstraction of data location, etc.). In which case you'd have to write and host that API layer somewhere. Other options within Azure would be a Web API site in Azure Web Sites, an API hosted in an Azure Cloud Service or all the way up to an Azure VM; however, as you slide up that scale you're taking on more and more responsibility and work.
The scenario that is useful to use Azure Mobile Services over the Azure SQL DB is pretty much the scenario you have. You don't have to maintain your own hosting API layer, just the code the API layer executes. You can scale an necessary (to a very large scale indeed) and also get features like the push notifications and web jobs (though those are also things you can do via other services in Azure if you'd like). Thinks of Azure Mobile Services as a higher level grouping of Azure services that are helpful to mobile developers.
Mobile services provide you with built-in push notification features and other such mobile friendly features too. They are more mobile oriented in a way.