I have been reading about cloud computing quite a bit. I found that Microsoft is doing something really interesting under the code name "Sitka" (there is now a public beta, so the code word is no longer internal).
Sitka, or SSDS, is cloud entity storage that offers SLA features to include massive scale, availability, performance, and security. To read more about it, take a look at this. Sitka is named such either because of a place in Alaska or because of this restaurant, located in Seattle.
I signed up for the beta and went to work creating a simple application that will create an entity in an authority and container I specify. An authority is the top level of the containment hierarchy in SSDS, and is represented via a DNS name:
So, my SSDS authority is experiments.
Next is the container, which each authority can contain zero-to-many and which hold entities. For the purposes of my little problem I created a container called "objects"
Entities are units of storage which implement the IEntity interface, which is below:
An entity is essentially a bag of proprieties than can be uniquely identified.
In my "hello world" example, I created a class called Recommendation (I have an idea about how to use SSDS in a little side project I am working on to give recommendations on Microsoft Project usage depending on what is selected in Project and its surrounding context).
My goal today, given that I have a house full of kids, was to do simple CRUD operations in SSDS: create a recommendation, update a recommendation, and delete a recommendation. I searched around in our internal repository of presentations and found a couple good pieces by Eugenio Pace so I started reading his blog. He created an SSDS blog provider for BlogEngine.Net, which I downloaded. From the blog provider, I lifted several libraries (they are probably available somewhere else, but this is where I found them first):
My sample application includes an app.config that looks like the following:
Note the Sitka proxy, which is a simple class library that fronts a WCF service. SSDS supports both SOAP and REST, which is very neat. Here is the source of my hello world program:
The DefaultTenantManager simply loads app.config data into a simple object that contains my user name, password, default authority (experiments) and the container ID (objects in this case). The SitkaProxyFactory creates an instance of the Sitka webservice and configures it. The EntityMapper wraps an entity for standard semantics. The Repository<Of Type T> wraps the basic web service operations for T (Recommendation).
The SSDS SDK provides an SSDS Explorer, which is a simple graphical interface into an authority and container. It also inserts XML templates for creating the two SSDS containment objects and for creating entities. Finally, it will execute simple queries.
Here is the result of querying SSDS after the "repo.Insert()" on line 7 above:
On line 9, I change the name to "test2" and here is the results:
Finally, I delete the entity and here are the results:
There is huge potential here. I have so many ideas I need to go stare at a wall for a while. Eugenio Pace has created an offline cache that is really very cool. Read about it here.