有人尝试过为 Amazon SimpleDB 构建 ASP.NET 会话状态提供程序吗?
如果没有,该服务是否存在任何阻止其构建的基本限制?
If not, are there any fundamental limitations of the service that prevent one from being built?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
回应Gary的回答。 “如果您在 EC2 上托管您的应用程序,那就没问题”
即使您在 EC2 上托管您的应用程序,您也不应该真正使用 SimpleDB 来存储会话状态。 它提供了“最终一致”的保证,因此,如果您 PUT 某些内容,则不能保证您会在下一次 GET 中看到该项目。
请参阅:http://docs.amazonwebservices。 com/AmazonSimpleDB/2007-11-07/DeveloperGuide/index.html?EventualConsistencySummary.html
当您想要使用 simpledb 对不需要立即更新且可以更新的数据进行索引时,这很好。稍后进行协调,但在会话状态的情况下,您可能需要具有 ACID 保证的东西(例如 SQL Server),因为您想知道一旦提交了某些内容,您将在下次读取时将其取回。
这显然取决于您的要求,但大多数人使用会话状态来存储购物车物品或类似物品。 如果您的网站访问者的购物车中似乎缺少东西,那么您的网站访问者很快就会感到不安,然后重新添加它们,然后发现他们在付款时已经添加了两次相同的商品。
In response to Garys answer. "If you're hosting your app on EC2, it'll be fine"
Even if you're hosting your application on EC2 you should not really use SimpleDB to store session state. It provides an "eventually consistent" guarantee, so if you PUT something there is no guarantee that you will see the item on your next GET.
see: http://docs.amazonwebservices.com/AmazonSimpleDB/2007-11-07/DeveloperGuide/index.html?EventualConsistencySummary.html
This is fine when you want to use simpledb to do indexing on data that does not need to be immediately up to date and can be reconciled later, but in the case of session state, you'd likely want something with ACID guarantees (like SQL Server) as you want to know that once you have committed something you will get it back on the next read.
This obviously depends on your requirements, but most people use session state to store shopping cart items or similar. Your site visitors will soon get upset if things appear to go missing from thier cart, then re-add them and then discover they have added the same item twice when they come to pay.
有一个用于使用 SDB 的 C# 库。
如果您想推出自己的 API、WSDL 和其他文档,可以在 http:// aws.amazon.com/simpledb/#resources。
这是一个非常简单的 API,基于 HTTP。 最难的部分是编写签名代码。 有很多其他语言的实现。
至于将其用于会话状态,在 EC2 中使用 SimpleDB 与互联网上其他任何地方使用 SimpleDB 之间存在巨大的速度差异。 如果您将应用程序托管在 EC2 上,那就没问题,否则,速度会非常慢。
There's a C# library for working with SDB.
If you want to roll your own, the API, WSDL and other documentation can be found at http://aws.amazon.com/simpledb/#resources.
It's a pretty straight forward API that rides over HTTP. The hardest part is writing the signing code. There's plenty of implementations in other languages.
As for using it for session state, there's a huge speed difference between using SimpleDB from EC2 and anywhere else on the internet. If you're hosting your app on EC2, it'll be fine, otherwise, it'll be brutally slow.
您可以基于此 MySQL 提供程序:
http://harry -kimpel.spaces.live.com/Blog/cns!CAA619CB4C4D1B6C!342.entry
You could base it off this MySQL provider:
http://harry-kimpel.spaces.live.com/Blog/cns!CAA619CB4C4D1B6C!342.entry