6. listAllUsers() vs http://mysite.com/users/ ? addUser() vs POST http://mysite.com/users/ deleteUser() vs DELETE http://mysite.com/users/eric updateUser() vs PUT http://mysite.com/users/eric listUserComputers() vs http http://mysite.com/users/eric/computers/ users eric bill sarah tim HTTP Request URL VERB Payload HTTP Response Status GET POST PUT DELETE XML JSON Payload XML JSON
13. Azure Storage SDS Vision Highly scalable, highly available store in the Cloud Access Uses ADO.NET Data Services - REST Relational? (today) No Relational? (tomorrow) No Analogy
14. Azure Storage SDS Vision Highly scalable, highly available store in the Cloud Highly scalable, highly available relational store in the Cloud Access Uses ADO.NET Data Services - REST Uses custom WCF – REST or SOAP Relational? (today) No Yes – but with many limitations Relational? (tomorrow) No Yes – with less limitations Analogy
15. Azure Storage SDS Vision Highly scalable, highly available store in the Cloud Highly scalable, highly available relational store in the Cloud Access Uses ADO.NET Data Services - REST Uses custom WCF – REST or SOAP Relational? (today) No Yes – but with many limitations Relational? (tomorrow) No Yes – with less limitations Analogy File System RDBMS
38. Partition Key Document Name Row Key Version Property 3 Modification Time … .. Property N Description Examples Doc V1.0 8/2/2007 … .. Committed version Examples Doc V2.0.1 9/28/2007 Alice’s working version FAQ Doc V1.0 5/2/2007 Committed version FAQ Doc V1.0.1 7/6/2007 Alice’s working version FAQ Doc V1.0.2 8/1/2007 Sally’s working version Partition 1 Partition 2
39. ADO.NET Data Services Client REST Interface .NET Framework 3.5 SP1 Use any HTTP stack Data represented as .NET objects Data represented in Atom (XML) DataServiceContext methods for updates HTTP verbs for updates LINQ to define queries URLs to define queries
40.
41.
42.
43.
44. Customer cust = ( from c in context.CreateQuery< Customer > ( “Customers” ) where c. PartitionKey == “Lee” // Partition Key = Last Name && c. RowKey == “Geddy” // Row Key = First Name select c) .FirstOrDefault(); context.DeleteObject(cust); DataServiceResponse response = context.SaveChanges(); cust.Occupation = “Musician” ; context.UpdateObject(cust); DataServiceResponse response = context.SaveChanges();