Blog

Go Back
  • SimpleDB Delete

    This post uses Amazon’s SimpleDB C# library. Deleting a record is really simple. Again, this is to delete an ASP.NET MembershipUser from SimpleDB. To do this, you simply pass the ItemName to a DeleteAttributesRequest(). Because that name is unique within the domain, the values will go away. override this.DeleteUser(username, deleteAllRelatedData) =     PhotoWebInit.InitializeAWS     let simpleDb = PhotoWebInit.SimpleDBClient     let delAttr = new Model.DeleteAttributesRequest()     delAttr.DomainName <- PhotoWebInit.domainName     delAttr.ItemName <- username     let delResponse = simpleDb.DeleteAttributes(delAttr)     true Pretty easy, right? Next week, we’ll finish this up with a post on Simple Storage Service and a zipped copy of the source code (in case you want to see everything in one place).

    Comments0

    Full story

  • SimpleDB Retrieve

    I recently talked about using SimpleDB to save or update a record. Today, we look at how to query against records in SimpleDB while using the Amazon SimpleDB C# Library. Each record in SimpleDB has an ItemName (unique, primary key) and a set of attributes (name-value pairs). Upon insert or update, all fields are indexed for easy querying. You can access the data using the Query API or Select API. Since I am already familiar with SQL, I picked the Select API as it closely resembles the standard SQL SELECT statement. Recall that SimpleDB stores data in domains. Any query goes against the stored domain. For example, I know that the MembershipUsers in the domain for my sample ASP.NET MembershipProvider all have a unique email address in a field named email. I also know that the email only exists on one record collection, so I shouldn’t be ...

    Comments0

    Full story

  • Using SimpleDB: Save a User

    With SimpleDB, you need to create a domain to store any data. Domain creation is a unique event in the life of an application, happening at install or some other infrequent event (addition of a new product line, client, etc. depending on how you partition data). 99+% of the time, the code will need to use the domain to Create, Retrieve, Update, or Delete data. These are more commonly known as CRUD operations. AWS stores the data as name-value pairs called attributes. The attributes have an additional value indicating if the value is replaceable/updatable or if the value can only be set of creation. Each item in the database has a name and a set of 1 or more attributes. In this post, I walk through how MembershipUser records are created and updated. This post uses Amazon’s SimpleDB C# library. The example has the following ...

    Comments0

    Full story

  • SimpleDB Domains

    Before you can access data in SimpleDB, you have to have a domain. Domain creation is fairly expensive in terms of time—up to 1/2 a second. Listing domains is really cheap—especially since you will normally have a maximum of 100 domains. When the application starts up, we want to check if the domains we need exist—if not, create them. Otherwise, mark an all clear so that the check doesn’t happen again. To handle all this work, we have a module named PhotoWebInit. The module instantiates a client capable of communicating with SimpleDB by reading the key and secret from configuration. Using that client, the code then checks to see if the domain we want, friseton_com, exists. OK—this code really looks to see if we have 0 domains or more. friseton_com is the first domain we need because if a user needs to be able to log in before any ...

    Comments1

    Full story

  • An Intro to SimpleDB

    In writing the PhotoWeb application for Amazon Web Services, I took advantage of the fact that an EC2 instance is just a VM running on top of Xen. Because it is just a VM, the entire application can be developed and tested on your local dev box before deploying to EC2—I highly recommend doing as much development and testing on your local machine before deploying to the hosted environment. I decided to start out by handling the authentication piece first. Because hosted SQL Server on Amazon costs extra, I used SimpleDB as the datastore. Before covering how to use SimpleDB, I need to explain what SimpleDB is. As a database, SimpleDB has a lot more in common with old school ISAM databases than RDBMS systems like Oracle, DB2, and SQL Server. To store data, you first need a domain. A domain is a collection of data. You can add ...

    Comments0

    Full story

  • Developing PhotoWeb on Amazon Web Services

    Back in February, I walked through the development of a Photo storage application. The application originally comes from one of the examples in the REST book Kenn Scribner and I wrote, Effective REST Services via .NET. Photo sharing and uploads allow for me to present a well understood application without providing a lot of background. For a photo, you upload it somewhere and store metadata about the photo itself. We already covered Google App Engine in February. For this application, we will use Amazon Web Services, including SimpleDB, Simple Storage Service, and Elastic Compute Cloud. At the end, I’ll tell you what I thought of the experience. I’ll develop the application in F#. When I presented this code to the Midwest Cloud Computing Users Group for the April 2009 meeting, Amanda Laucher offered up that my use of F# used some idioms she hadn’t seen before. That’s a ...

    Comments1

    Full story

  • Amazon SimpleDB Domain Names

    I was busy working on the Amazon Web Services version of my Photo Sharing application (the App Engine version appeared in February 2008). I was able to create a domain with the name friseton.com. I then wrote a simple query against this domain: select * from friseton.com where email=’dude@example.com’ SimpleDB responded and told me that the select query had an invalid format. On a wild guess, I thought it might be the dot (.) in friseton.com. Sure enough, it was. I deleted the friseton.com domain, added friseton_com, and the query started working. select * from friseton_com where email=’dude@example.com’ I don’t know if there is any syntax around allowing the dot in the domain name, but I found this, it works, and I’m moving on with the demo. I’ll learn the ins and outs as I go.

    Comments0

    Full story

  • Flying Above the Clouds

    I originally presented this talk to the Azure Cloud Computing User Group on February 25, 2009. Thanks to Bryce Calhoun for inviting me to present! The original meeting announcement had this summary: Scott Seely, Architect at MySpace, will kick off the meeting with a 20-30 minute overview of the top three cloud computing offerings available today: Google App Engine, Amazon EC3 and Azure Services. His discussion will be primarily focused on a compare/contrast of the functionality and features inherent to each platform. Enjoy!

    Comments0

    Full story

  • Speaking at Chicago Area Cloud Computing User Group (Feb 25, 2009)

    I'll be speaking Wednesday night at the Cloud Computing User Group in Downers Grove, IL. I have a short presentation on the main computing platforms. If you are a regular reader, you know that I've been spending some time going beneath the surface on major platforms. If folks like the high level overview, I'll do some more in depth talks in the future. Here are the details and the announcement that Bryce Calhoun sent out: Join us for the third local meeting of the Cloud Computing User Group – this month in Downers Grove. At this meeting, we will be learning about how Live ID integration works in the Azure cloud computing platform. We’ll demo and dig into the code of an application built in the cloud that integrates directly with the Live ID service and stores information specific to the individual associated with that ID. Also, Scott Seely, Architect ...

    Comments0

    Full story

  • Deprecating a Web Service

    Once upon a time, I worked for a company on a project to build a Web service stack. Prior to that, I wrote a number of articles for that company, including one that wound up being used as the basis for versioning efforts across several industry leaders (the latter based on conversations and personal e-mails). After all these years, people still come to me and ask how to inform consumers of the interface that the version they use is about to go away. Today, Amazon SimpleDB provided a great example of how to inform customers of a new interface. The announcement was well done, short, and was communicated to all users via e-mail as well as posted publicly on the Internet. Amazon provided this statement, which I think is a great way to communicate that things are about to change as well as why they are changing:...

    Comments0

    Full story