问题描述
我以为我可以使用SimpleDB的把我的应用程序的最具挑战性的领域护理(据缩放云) - 类似Twitter的意见,但在顶部位置 - 直到点,当我坐下来真正开始与深发展实现它。
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 the point when I sat down to actually start implementing it with SDB.
第一件事,深发展有每个属性值的1000个字节的限制,这是不够的,即使征求意见(可能需要打破长期价值为多个属性)。
First thing, SDB has a 1000 bytes limitation per attribute value, which is not enough even for comments (probably need to break down longer values into multiple attributes).
然后,最大域大小为10GB。该承诺是,你可以扩展,而无需担心数据库拆分等,由于深发展将不会随着数据的负载降低。但是,如果我理解正确的话,与我区将有完全相同的问题,与分片,即得。在某些时候需要实现对应用层的数据记录的跨域分布和查询。
Then, maximum domain size is 10GB. The promise was that you could scale up without worrying about database sharding etc., since SDB will not degrade with increasing loads of data. But if I understand correctly, with domains I would have exactly the same problem as with sharding, ie. at some point need to implement data records' distribution and queries across domains on application level.
即使是我在整个应用程序,也就是最简单的对象。原子用户收视率,深发展是不是一种选择,因为它不能计算出一个平均的查询中(一切都基于字符串)。因此,要计算平均用户评价的对象,我会所有的记录加载 - 250的时间 - 并计算出它在应用层面
Even for the simplest objects that I have in the whole application, ie. atomic user ratings, SDB is not an option, because it cannot calculate an average within the query (everything is string based). So to calculate average user rating for an object, I would have to load all records - 250 at a time - and calculate it on application level.
我失去了一些关于深发展?是10GB真的比较数据库克服所有深发展的限制?我是诚实热心采取深发展的优势,因为我用的S3和EC2了,但现在我根本就没有看到一个用例。
Am I missing something about SDB? Is 10GB really that much of a database to get over all SDB limitations? I was honestly enthusiastic about taking advantage of SDB, since I use S3 and EC2 already, but now I simply don't see a use case.
推荐答案
我用深发展的一对夫妇的肥胖型应用。每个域的10 GB限制不放心我,但我们是在赌博亚马逊允许这将扩大,如果我们需要它。他们有他们的网站上申请表,如果你想要更多的空间。
I use SDB on a couple of large-ish applications. The 10 GB limit per domain does worry me, but we are gambling on Amazon allowing this to be extended if we need it. They have a request form on their site if you want more space.
至于跨域连接,不认为深发展作为一个传统的数据库。在我的数据,以深发展的迁移,我不得不进行非规范化一些,所以我可以手工做跨域连接。
As far as cross domain joins, don't think of SDB as a traditional database. During the migration of my data to SDB, I had to denormalize some of it so I could manually do the cross domain joins.
每个属性限制的1000字节是很难解决也。一个我的应用程序是存储文章和评论,在数据库中的博客服务。虽然它交给SDB移植,我遇到了这个限制。我结束了存储文章和评论在S3文件,并阅读,在我的code。由于这台服务器是在EC2上,交通到S3没有花费任何额外的东西。
The 1000 byte per attribute limitation was tough to work around also. One of the applications I have is a blog service which stores posts and comments in the database. While porting it over to SDB, I ran into this limitation. I ended up storing the posts and comments as files in S3, and read that in my code. Since this server is on EC2, the traffic to S3 isn't costing anything extra.
或许其他问题之一需要注意的是深发展的最终一致性模型。无法写入数据,然后读回与新写入的数据将被退还给你任何保证。最终的数据将被更新。
Perhaps one of the other problems to watch out for is the eventual consistency model on SDB. You can't write data and then read it back with any guarantee that the newly written data will be returned to you. Eventually the data will be updated.
这一切说,我仍然爱深发展。我不后悔切换到它。我从SQL 2005服务器移动。我想我有很多更多的控制使用SQL,但是一旦放弃了控制,我有更多的灵活性。不需要为pre-定义模式是真棒。随着你的code一个强大和稳健的缓存层,很容易使深发展更灵活。
All of this said, I still love SDB. I don't regret switching to it. I moved from a SQL 2005 server. I think I had a lot more control with SQL, but once giving up that control, I have more flexibility. Not needing to pre-define the schema is awesome. With a strong and robust caching layer in your code, it's easy to make SDB more flexible.
这篇关于什么是使用亚马逊SimpleDB的意义呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!