What's the point of using Amazon SimpleDB?

前端 未结 9 2137
礼貌的吻别
礼貌的吻别 2021-01-29 22:12

I thought that I could use SimpleDB to take care of the most challenging area of my application (as far as scaling goes) - twitter-like comments, but with location on top - till

9条回答
  •  逝去的感伤
    2021-01-29 23:06

    I do not buy all the hype around SimpleDB and based on the following limitations can not see a reason why it should be used (I understand that now you can build almost anything with almost any technology, but this is not the reason to select one).

    So the limitations I have seen:

    • can be run only on amazon AWS, you should also pay for a whole bunch of staff
    • maximum size of domain (table) is 10 GB
    • attribute value length (size of field) is 1024 bytes
    • maximum items in select response - 2500
    • maximum response size for Select (the maximum amount of data that can return you) - 1Mb, actually you can check all the limitations here
    • has drivers only for a few languages (java, php, python, ruby, .net)
    • does not allow case insensitive search. You have to introduce additional lowercase field/application logic.
    • sorting can be done only on one field
    • because of 5s timelimit count in can behave strange. If 5 seconds passed and the query has not finished, you end up with a partial number and a token which allows you to continue query. Application logic is responsible for collecting all this data an summing up.
    • everything is a UTF-8 string, which makes it a pain in the ass to work with non string values (like numbers, dates).
    • sorting behaves strange for numbers (due to the fact that everything is a string). So now you have to do a shamanic dance with padding
    • both do not have transactions and joins
    • no compound, geostatic, multiple column indices, no foreign keys

    If this is not enough, then you also have to forget about the basic things like group by, sum average, distinct as well as data manipulation. In whole the query language is pretty rudimentary and reminds a small subset of what SQL can do.

    So the functionality is not really way richer than Redis/Memcached, but I highly doubt that it performs as good as these two dbs for their use cases.

    SimpleDB position itself as a schema-less document-base nosql database but the query syntax of MongoDB/CounchDB is way more expressive and their limitations are way more reasonable.

    And at last - do not forget about vendor locking. If in a couple of years Azure (or something else that would appear) will provide a cloud hosting 5 times cheaper than AWS, it would be really hard to switch.

提交回复
热议问题