At Mix 07, even though the Ray Ozzie keynote along with the Silverlight and Expression product announcements got the lion's share of the buzz yesterday, the more interesting news from a pure API perspective came from Pablo Castro, ADO.NET Technical Lead, who later in the day presented a Microsoft project codenamed "Astoria". What is it? Alex Barnett, who used to be part of this team, describes it well when he says "Astoria is also the codename for an incubation project started some months ago attempting to answer the following questions: if you could provide a dead-simple way of programming against a relational data store that resides on the internet, what should the programming model look like? Could it be simpler than SOAP-based data access programming?"
Although it's an early experimental release, it's quite an interesting approach using a very RESTful set of patterns and infrastructure for web data services. From the official announcement:
"The Microsoft Codename "Astoria" project is an incubation effort at Microsoft focused on exploring how various emerging world-wide-web technologies and concepts can be combined with the Microsoft Data Platform to provide a first-class infrastructure for building the next wave of internet applications.
The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within corporate networks and across the internet. The data service is reachable over regular HTTP requests, and standard HTTP verbs such as GET, POST, PUT and DELETE are used to perform operations against the service. The Payload format for the data exchanged with the service can be controlled by the client and all options are simple, open formats such as plan XML and JSON. The use of web-friendly technologies make it ideal as a data Back-end for AJAX-style applications, Rich Interactive Applications and other applications that need to operate against data that is across the web.
The first Astoria CTP is a dual release, making Astoria available in the form of downloadable bits that can be used to build data services that are entirely contained within a single computer or network and as an experimental online service that you can use to create online stores that are hosted by Microsoft and are accessible over the internet."
In this model, database entities become resources that support filter, sort, navigate, and paging, all via a standard URI syntax. Results can be returned in plain old XML, JSON, and RDF. It's nicely general purpose with URLs like "/database/table[search criteria]/joined -table". For example, in the demo to get the orders for customers in London you'd ask something "/Customers[City eq 'London']/Orders".
If you go to astoria.mslivelabs.com you can get the details. As noted in the announcement it's really offered in two different models. The first one is a set of server-side technologies available as a download from Microsoft and the other is an online hosted service. The online version includes sample datasets you can use like the Microsoft Northwind demo database as well the Encarta encyclopedia. Coming soon will be the ability to create your own custom datasets hosted in the Astoria online service.