An exclusive gaming industry community targeted
to, and designed for Professionals, Businesses
and Students in the sectors and industries
of Gaming, New Media and the Web, all closely
related with it's Business and Industry.
A Rich content driven service including articles,
contributed discussion, news, reviews, networking, downloads,
and debate.
We strive to cater for cultural influencers,
technology decision makers, early adopters and business leaders in the gaming industry.
A medium to share your or contribute your ideas,
experiences, questions and point of view or network
with other colleagues here at iVirtua Community.
Amazon has announced SimpleDB, the latest addition to what isbecoming an extensive suite of web services aimed at developers. It isnow in beta.
Why bother with SimpleDB, when seemingly every web server on the planet already has access to a free instance of MySQL?
Perhaps the main reason is scalability. If demand spikes, Amazonhandles the load. Second, SimpleDB is universally accessible, whereasyour MySQL may well be configured for local access on the web serveronly. If you want an online database to use from a desktop application,this could be suitable. It should work well with Adobe AIR once someonefigures out an ActionScript library. That said, MySQL and the like workfine for most web applications, my blog being one example. SimpleDBmeets different needs.
This is utility computing, and prices look relatively modest to me, though you pay for three separate things:
Machine utilization - $0.14 per Amazon SimpleDB Machine Hour consumed.
Data transfer - $0.10 per GB - all data transfer in. From $0.18 per GB - data transfer out.
Structured data storage - $1.50 per GB-month.
In other words, a processing time fee, a data transfer fee, and adata storage fee. That's reasonable, since each of these incurs a cost.The great thing about Amazon's services is that there are no minimumcosts or standing fees. I get billed pennies for my own usage of Amazon S3, which is for online backup.
There are both REST and SOAP APIs and there are example librariesfor Java, Perl, PHP, C#, VB.NET (what, no Javascript or Python?).
Not relational
Unlike MySQL, Oracle, DB2 or SQL Server, SimpleDB is not arelational database server. It is based on the concept of items andattributes. Two things distinguish it from most relational databasemanagers:
Attributes can have more than one value.
Each item can have different attributes.
While this may sound disorganized, it actually maps well to the realworld. One of the use cases Amazon seems to have in mind is stock foran online store. Maybe every item has a price and a quantity. Garmentshave a "size" attribute, but CDs do not. The "category" attribute couldhave multiple values, for example "clothing" and "gifts".
You can do such things relationally, but it requires multipletables. Some relational database managers do support multiple valuesfor a field (FileMaker, for example), but it is not SQL-friendly.
This kind of semi-structured database is user-friendly fordevelopers. You don't have to plan a schema in advance. Just startadding items.
A disadvantage is that it is inherently undisciplined. There isnothing to stop you having an attribute called "color", another called"hue", and another called "shade", but it will probably complicate yourqueries later if you do.
All SimpleDB attribute values are strings. That highlights anotherdisadvantage of SimpleDB - no server-side validation. If a glitch inyour system gives an item a price of "red", SimpleDB will happily storethe value.
Not transactional or consistent
SimpleDB has a feature called "eventual consistency". It is described thus:
Quote:
Amazon SimpleDB keeps multiple copies of each domain. Whendata is written or updated (using PutAttributes, DeleteAttributes,CreateDomain or DeleteDomain) and Success is returned, all copies ofthe data updated. However, it takes time for the update to propogate toall storage locations. The data will eventually be consistent, but animmediate read might not show the change.
Right, so if you have one item in stock you might sell it twice totwo different customers (though the docs say consistency is usuallyachieved in seconds). There is also no concept of transactions as faras I can see. This is where you want a sequence of actions to succeedor fail as a block. Well, it is called SimpleDB.
This doesn't make SimpleDB useless. It does limit the number ofapplications for which it is suitable. In most web applications, readoperations are more common than write operations. SimpleDB is fine forreading. Just don't expect your online bank to be adopting SimpleDB anytime soon.
This article originally appeared in ITWriting.