[blah] Amazon SimpleDB and CouchDB
正所谓,无巧不成书。这边厢刚八卦完 CouchDB ,那边立马就传出了 SimpleDB 的消息,这年头,貌似随随便便就能捣鼓捣鼓搞个 DB 出来,而且,貌似就算你想低调的搞个 DB 也有可能一不留神被推到风口浪尖上演一回某个大人物。
Amazon 刚刚宣布了它 SimpleDB 的 Limited Beta 计划,与 E2C 等等一起,这毫无疑问是意味着 Amazon 朝着 “云计算” 目标的步步逼近。它和 IBM 之流打着的如意算盘就是 “买机时挣钱” ,商业模式非常强啊(直逼学校看机房的老大爷)。先来看看 features :
* Simple to use
Amazon SimpleDB provides streamlined access to the lookup and query functions that traditionally are achieved using a relational database cluster - while leaving out other complex, often-unused database operations. The service allows you to quickly add data and easily retrieve or edit that data through a simple set of API calls. Accessing these capabilities through a web service also eliminates the complexity of maintaining and scaling these operations.* Flexible
With Amazon SimpleDB, it is not necessary to pre-define all of the data formats you will need to store; simply add new attributes to your Amazon SimpleDB data set when needed, and the system will automatically index your data accordingly. The ability to store structured data without first defining a schema provides developers with greater flexibility when building applications.* Scalable
Amazon SimpleDB allows you to easily scale your application. You can quickly create new domains as your data grows or your request throughput increases. For the Beta release, a single domain is limited in size to 10 GB and you are limited to a maximum of 100 domains; however, over time these limits may be raised.* Fast
Amazon SimpleDB provides quick, efficient storage and retrieval of your data to support high performance web applications.* Reliable
The service runs within Amazon’s high-availability data centers to provide strong and consistent performance. To prevent data from being lost or becoming unavailable, your fully indexed data is stored redundantly across multiple servers and data centers.* Designed for use with other Amazon Web Services
Amazon SimpleDB is designed to integrate easily with other web-scale services such as Amazon EC2 and Amazon S3. For example, developers can run their applications in Amazon EC2 and store their data objects in Amazon S3. Amazon SimpleDB can then be used to query the object metadata from within the application in Amazon EC2 and return pointers to the objects stored in Amazon S3.* Inexpensive
Amazon SimpleDB passes on to you the financial benefits of Amazon’s scale. You pay only for resources you actually consume. Compare this with the significant up-front expenditures traditionally required to obtain software licenses and purchase and maintain hardware, either in-house or hosted. This frees you from many of the complexities of capacity planning, transforms large capital expenditures into much smaller operating costs, and eliminates the need to over-buy “safety net” capacity to handle periodic traffic spikes.
都是技术人员,这篇说了等于没说的新闻稿就先撂这儿吧,捞干的,下面这些才是真家伙:
* Really large data sets
* Really Fast
* Highly Available - It’s Amazon. Running Erlang. Whoa.
* On demand scaling - Like S3, EC2, with a sensible data metering pricing model
* Schemaless - major cool factor for me here; items are little hash tables containing sets of key, value pairs
我知道你看到标黑的那句了,不过,那暂时还不是俺这篇 blah 的重点。重点是: Schemaless 。没错,看到这个词,多么的眼熟?你一定也想起了俺刚刚“隆重介绍”过的 CouchDB 吧。那么,拉个 list 对比一下:
What SimpleDB and CouchDB have in common
* Not relational databases
* Schemaless
* CouchDB is built with Erlang. SimpleDB may be, as well.
* support for data replication (this is a very sloppy generalization)
* accessed via HTTP
如出一辙,不是么?某位大拿说得好“Great minds think alike”嘛。当然,区别还是有一些的:
SimpleDB:
1. provides SOAP and (what passes at Amazon for) REST interfaces to the API
2. REST requests all use HTTP GET, specifying the API method with a query param
3. requests specify the database, record, attributes, and modifiers with query params
4. record creation, updating, and deletion is tomic, at the level of individual attributes
5. all data is considered to be UTF-8 strings
6. automatically indexes data, details unknown
7. queries
* limited to 5 seconds running time. Queries that take longer “will likely” return a time-out error.
* defined with HTTP query parameters
* composed of Boolean and set operations with some obvious comparison operators(=, !=, >, >=, etc.)
8. as all values are UTF-8 strings, there are no sorting options.
9. responses are XMLCouchDB:
1. all REST, all the time
2. requests use HTTP GET, PUT, POST, and DELETE with their usual RESTful semantics
3. requests specify the database and record in the URL, with query params used for modifiers
4. record creation, updating, and deletion is atomic
5. supports all JSON data types (string, number, object, array, true, false, null)
6. indexing is under user control, by means of “views”
* defined with arbitrary Javascript functions
* can be stored as documents
* can be run ad hoc, as “temporary views”
7. queries are basically views, with the addition of modifiers (start_key, end_key, count, descending) supplied as HTTP query parameters
8. sorting is flexible and arbitrarily complex, as it is based on the JSON keys defined in the views. See here for more information
9. responses are JSON
OK,差不多了。想要 OpenSource SimpleDB 的兄弟们,可以拿 CouchDB 顶着先。
参考资料:
Amazon SimpleDB™- Limited Beta
What You Need To Know About Amazon SimpleDB
Amazon SimpleDB and CouchDB compared
PS. 对了,这是 Erlang 的社区,多少要和 Erlang 扯上点关系才不算是离题万里。上面标黑的两处,还有参考资料中的隐藏彩蛋,留给大家联想吧。


Comments
sigh,早该来这里瞄一下,刚才俺又跑去groups贴了这个事情
erlang版的big-table
[...] Erlang-China » [blah] Amazon SimpleDB and CouchDB (tags: erlang 技术收藏 SimpleDB CouchDB) [...]
访问http://erlang-china.org/被报有木马!
木马?不可能吧。我这里用卡巴斯基试了一下,没有报啊。
cool,i love erlang!
Write a Comment