My Photo

Planet MicroISV - Blogs for and about MicroISVs

May 12, 2008

Amazon SimpleDB

100014192753_v46777512_Amazon's SimpleDB service is a reliable storage service for small pieces of textual data. It provides the opportunity for the storage, modification and retrieval of datasets, but without the need for the maintaining of a more traditional database server, which should be a major benefit for a thinly spread micro ISV. It should be noted, however that the SimpleDB service is just that; simple. It does not have anything like the bells and whistles of a full RDBMS database.

Overview

Like the other Amazon Web Services, SimpleDB has a limited number of entities:

  • Domains. A domain is what might be considered the equivalent of a database instance. Just as you might create several databases on a single RDBMS server, you can use domains to partition logically distinct datasets.
  • Items. An item is a uniquely (within the domain) named collection of attributes that represents a data object. You can add, modify or delete an entire object in one go, or modify individual attributes.
  • Attributes. An attribute is a uniquely named (within the item) category of information.

The main difference between SimpleDB and a full RDBMS is that information is stored in hierarchical trees, not in tables. There are also no predefined table schemas, so any item can have a different set of attributes to any other item in the domain. Whilst this provides enormous flexibility, you will need to keep your wits about you, as if you misspell an attribute name, you might find that that particular nugget of information is lost forever.

There are no types in SimpleDB, other than the string. All information is stored as text. This means that SimpleDB can only perform case sensitive string comparisons. There are no integers, floating point numbers, dates etc.  Again, it's simplicity and flexibility also means that the SimpleDB system won't even raise an eyebrow should you provide, say, a floating point number for an attribute that should contain dates. Maintaining the integrity of your data becomes very much your concern.

The SimpleDB query language is very limited. It is far simple than SQL, for example. Queries take the form of

['AttributeName' Operator 'Literal']

 

In addition to the Boolean operators NOT, AND and OR, you have the equality operators, =, !=, <, <=, >, >= and starts-with. So to find items with a membership expiry date before the end of the year, we would run this query:

['MembershipEndDate' < '2007-07-01']

Note that this is just a string comparison, you must encode your data in such a way that makes for sensible comparisons.

Like with Amazon's other distributed systems, applications using SimpleDB will need to take into account the propagation latency. At any one time, one cannot be sure that the data in the domain are not out of date. In reality, it takes only a few seconds for all of the physical servers to achieve consistency, but any application that requires constant integrity will need to employ some sort of caching mechanism.

Attributes in SimpleDB are severely limited in size, specifically, to 1024 bytes. This limitation is entirely deliberate. It is intended that objects of any appreciable size will be stored in S3 rather than SimpleDB. You should attempt to work with this rather than work around it. Storage costs in SimpleDB are many times the storage costs of S3.

Pricing

Storage space in SimpleDB is expensive; $1.50 per gigabyte. Your space usage is calculated from every item, attribute name and attribute value in your system. In addition, you are also charged for an additional 45bytes per item, attribute name and attribute value. This is for the indexing that SimpleDB automatically performs.

Data received by SimpleDB is charged at $0.10 per gigabyte, and data sent by SimpleDB is charged on a sliding scale from $0.13 to $0.18 per gigabyte.

You are also charged $0.14 per hour of machine usage. The amount of CPU usage depends on the volume of the data returned by the query, the amount uploaded etc.

Do you use SimpleDB? Does it work for you?

May 10, 2008

Lack of posts

Grosmont Station (NYMR)

Image via Wikipedia

Apologies for the lack of posts. I've had a couple of weeks on holiday on the fantastic North Yorkshire Moors Railway. I'm not a trainspotter, but the kids simply love it, and Grosmont is a village in a time vortex.

I was getting twitchy about being disconnected for two whole weeks, but you know what, it was great.

Normal posting will resume on Monday.

April 24, 2008

Amazon FPS: Flexible Payment Service

100014192753_v46777512_Amazon's Flexible Payment Service (FPS) is a system for the transferring of monies between any 2 individuals or companies with Amazon payment accounts. As well as allowing developers to create their own payment systems, vendors can delegate their payment processing to Amazon, which should be of some interest to micro ISVs. When it comes to the trust stakes, having a co-branded payment page must be up there. I can't remember a Word Wide Web without Amazon.

Overview

FPS allows payments to be configured and prepared in 3 steps:

  • A set of rules can be defined to configure which criteria must be met for a payment to go ahead.
  • The parties agree to the rules and approve the transaction.
  • FPS performs the transaction.

There are 3 actors in a transaction, the caller, the sender and the recipient.

The caller is the actor who orchestrates the whole transaction. She is responsible for obtaining the authorisations from both the sender and the recipient. The caller must call the FPS APIs, so must also have an FPS developer account.

The sender is the actor who is making a payment. She will send money from any sources associated with her Amazon payment account, whether it be a credit card, bank account or Amazon Payments balance.

The recipient, for our purposes, the micro ISV, is the actor that receives the money. The balance of the transaction is added to the recipient's Amazon payment account.

There are 4 types of Amazon Payment Account:

Personal accounts are generated automatically for users when they first make a payment through FPS. Accounts are initially restricted to payments by credit card, but can be enhanced (with a confirmed email address) to include paying directly from a bank account, and receiving payments from any source other than credit cards.

Business account have all the benefits of an enhanced personal account, but with the added benefit of being able to receive credit card payments.

Developer accounts are similar to Business accounts but allow for API access too.

Ultra accounts are special accounts for users who have a consistently high volume of transactions. Ultra accounts receive a discounted rate for credit card transactions.

Pricing

For Transactions >= $10:

  • 1.5% + $0.01 for Amazon Payments balance transfers
  • 2.0% + $0.05 for bank account debits
  • 2.9% + $0.30 for credit card
Spreading the love - a few 3rd party FPS solutions:


April 23, 2008

A Startup A Week

Thanks to Martyn for this one.

An online reality show has just appeared in which the protagonists will attempt to create a startup in just one week.

Episode 1 and episode 1 day 2 are up.

.Net Reactor Support Forum

Reactor

By popular request, I've created a support forum for .Net Reactor.

       
  Google Groups  
  Subscribe to .Net Reactor Support  
  Email:    
  Visit this group

I heard from the chap who develops Reactor a few months ago, and it seems he has some health issues that mean he has to spend some time in hospital. As such, I'm sure I speak for all Reactor users when I wish him a speedy recovery. Being a micro ISV is tough, especially when you're ill. So hopefully this forum will alleviate some of the support burden.