What features should we add next?

Allow access to Azure Table Storage

As much as I love SQL Server, not everything is relational. :-)

I'm thinking... store my Azure Storage secret up in the service... use a generic call based on an optionally-attributed table class to handle data. Something like (method/attribute names obviously fake and sub-optimal):

var myData = GetAzureTableData<MyAwesomeTable>(optional OData querystring);

or

var myData = GetAzureTableData<MyAwesomeTable>(data => some Lambda expression);

where MyAwesomeTable has

[AzureMobileServicesConfig(TableName = "myRealTableName")]
public class MyAwesomeTable
{
[PartitionKey]
public string myPartitionKey {get; set;}
[RowKey]
public string MyAwesomeTableId {get; set;}
// etc.
}

As much as I'd love to say "just make the table class inherit from TableEntity" it's not available in WinRT, hence the attributed PartitionKey/RowKey.

For bonus points... store my Azure Storage secret up in the service... use configuration to set up SAS tokens that Mobile Services automatically emits... clients use SAS tokens to get to data... could all be done in library form where the client code experience is something like:

var myToken = await GetAzureMobileTokenAsync<myTableClass>();
var myData = await GetAzureData<myTableClass>(optional OData querystring);

62 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Miranda LunaAdminMiranda Luna (Product Manager, Windows Azure Mobile Services) commented  ·   ·  Flag as inappropriate

        While very true that you can't choose Table Storage instead of SQL db when you create a new Mobile Service, you can use table storage with your Mobile Service. (And if your app doesn't need SQL db, you can always just have a very small one.)

        To use table storage with your Mobile Service today, you'll need to use the Azure module in the Windows Azure SDK for Node.js. If you add the following to a server-side script, you'll obtain a reference to a table (and then be able to query it or insert data into it):

        var azure = require('azure');
        var tableService = azure.createTableService("<< account name >>",
        "<< access key >>");

      Feedback and Knowledge Base