从 SimpleDB 导出到 Mongo?

发布于 2024-11-04 17:24:02 字数 53 浏览 0 评论 0 原文

从 SimpleDB 迁移到 MongoDB 相当简单吗?有什么需要注意的吗?有什么限制吗?

Is the move from SimpleDB to MongoDB fairly straight forward? Is there anything I should watch out? Is there any limitations?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千年*琉璃梦 2024-11-11 17:24:02

约翰尼,gate 击中了所有亮点,我只是在这里添加一些热门话题项目,希望能帮助您更快地决定是否要这样做:

  • 您使用 SimpleDB 因为您不想成为服务器管理员,恢复丢失的服务器、运行备份、确保主/从配置正常工作和/或购买额外的硬件来运行数据库。
  • 如果您使用 Mongo,则必须执行所有这些操作(除非您采用 MongoHQ 路线),但回报灵活性以及潜在的速度……这里有一个很大的“视情况而定”。
  • SimpleDB 有一个非常简单的(仅字符串)存储和查询模型;如果您的数据/用例很简单,那么它就适合。
  • SimpleDB 的水平扩展能力非常好(同时进行数千个查询),但垂直扩展却相当慢。因此,如果您计划让一些用户从您的数据存储中查询天哪,请考虑其他措施;往返 SimpleDB 的往返次数将会增加。但是,如果您正在尝试创建下一个 Twitter 并且需要水平服务数百/数千个用户,那么 SimpleDB 无论如何都会在所有连接上为您提供相同的性能。
  • 使用 Mongo 进行水平扩展非常强大......但这也意味着它可能很复杂(超出主/从,这是非常简单的)。副本集和仲裁器必须进入你的词汇表......考虑一下这是否是你想要的。
  • Mongo 的查询模型与 NoSQL 数据存储中的 SQL 非常接近;它非常丰富。
  • Mongo 喜欢成为硬件上唯一的服务;如果你能在 Mongo 上投入强大的硬件,它的运行就像一个梦想。
  • 如果您使用 mongo,则需要在不同的计算机上运行至少两个实例。如果你不这样做,它会正常工作,直到它不这样做......然后你的世界就会融化。如果您这样做,而一台服务器崩溃了,另一台服务器将自动接管您的工作。

所以我想我是否必须总结一下:

  • 如果您不想进入服务器管理游戏并且不介意更简单的查询模型,请使用 SimpleDB。
  • 如果您不介意成为一名具有良好习惯的细心管理员和/或需要复杂的查询功能,请使用 MongoDB。

希望有帮助。

Johnny, gate's hit all the highlights, I'm just adding some hot-topic items here that will hopefully help you decide faster if you want to do this or not:

  • You use SimpleDB because you don't want to be a server admin, recover lost server, run backups, ensure Master/Slave configurations are working and or buy additional hardware to run the DB on.
  • If you use Mongo, you'll have to do all this (unless you go the MongoHQ route) but the payoff flexibility and potentially speed... there is a big "it depends" here.
  • SimpleDB has a very simple (Strings only) storage and query model; if your data/use-case is simple, it fits.
  • SimpleDB scales amazingly well horizontally (thousands of queries at the same time), but vertically it is fairly slow. So if you plan on a few users quering the bejesus out of your data store, consider something else; round-trips to and from SimpleDB will add up. But if you are trying to create the next twitter and need to service hundreds/thousands of users horizontally, SimpleDB will give you the same performance across all the connections regardless.
  • Scaling horizontally with Mongo is very robust... but that also means it can be complex (beyond Master/Slave, which is pretty straight forward). Replica sets and arbiters have to enter into your vocabulary... consider if that is something you want.
  • Mongo's query model is as close to SQL as you are going to get with a NoSQL data store; it is very rich.
  • Mongo likes to be the only service on a piece of hardware; if you can throw beefy hardware at Mongo, it runs like a dream.
  • If you use mongo, you NEED to be running at least two instances on separate machines. If you don't do this, it will work fine until it doesn't... and then your world will melt. If you DO do this, and a server crashes, the other one will take over for you automatically.

So I guess if I had to sum it all up:

  • Use SimpleDB if you don't want to get into the server admin game and don't mind the simpler query model.
  • Use MongoDB if you don't mind being an attentive admin with good habits and/or need the complex query capabilities.

Hope that helps.

时光病人 2024-11-11 17:24:02

我猜它们都是文档存储。

因此,SimpleDB 是一个托管数据存储,具有用于操作数据的 REST/SOAP API。 MongoDB 是一个在您自己的硬件上运行的数据存储引擎,它使用一系列 BSON 命令来操作数据,但大多数用户运行受支持的驱动程序之一。

将会有所不同的事情:

  • 配置(您需要服务器)
  • 维护
  • 客户端代码:您需要与驱动程序一起运行,您的查询可能不同
  • 分页
  • 索引
  • 可能的数据结构(不同的查询工具)
  • 映射/减少(使用 MongoDB 用 Ja​​vascript 完成)

相同的事情:

  • 数据:它们都是文档存储,应该能够处理相同的基本数据

理论上,您可以将数据从SimpleDB 到 MongoDB,但是数据的其他移动部分肯定需要一些跑腿工作。

尽管如此,我还是鼓励您测试 MongoDB,因为您可能会发现它比 SimpleDB 提供了成本优势。

I guess they are both document stores.

So SimpleDB is a hosted data storage with a REST/SOAP API for manipulating data. MongoDB is a data storage engine that you run on your own hardware it uses a series of BSON commands for manipulating data, but most users run one of the supported drivers.

Things that will be different:

  • Configuration (you'll need servers)
  • Maintenance
  • Client code: you need to run with the driver, your queries are probably different
  • Indexes
  • Paging
  • Possibly data structures (different query tools)
  • Map / Reduces (done in Javascript with MongoDB)

Things that will be the same:

  • The data: they are both document stores and should be able to handle the same basic data

In theory, you can just dump your data from SimpleDB to MongoDB, but there's definitely some legwork involved for the other moving parts of your data.

All that said, I do encourage you to test MongoDB as you may find it provides cost benefits over SimpleDB.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文