SimpleDB、OpenID 和云能走多远?

发布于 2024-08-08 20:52:13 字数 323 浏览 3 评论 0原文

我正在开发一个 ASP.NET MVC 应用程序(非事务型、社交型)。我开始使用 .NET 授权提供程序来完成这项工作,但随着云的衬里变得越来越闪亮,我想知道我可以推升多少。

最终,我希望废除 ISP 托管的 SQL Server 数据库,并随着内容的增加逐步开始使用 S3。

我正在考虑使用 OpenID 进行身份验证,使用 SimpleDB 来存储用户详细信息。如果我理解正确的话,用户添加的任何内容都可以在 ClaimedIdentifier 上键入。

这样做的优点/缺点是什么?这种方法的亮点是什么?

有没有人有任何纯云架构的例子可以用来支持支持/反对的论点?

I have an ASP.NET MVC app (non-transactional, social) I am workong on. I started using the .NET authorisation provider which does the job, but with the Cloud's lining getting more shiny by the day I was wondering just how much I can push up.

Ultimately I want to do away with my ISP-hosted SQL Server database and to progressively start using S3 as my content increases.

I am considering using OpenID for authentication and SimpleDB for storing user details. Any content added by a user could be keyed on the ClaimedIdentifier, if I understand correctly.

What are the advantages/disadvantages of doing this? What are the showstoppers of this approach?

Does anyone have any examples of pure Cloud architectures that can be used to support arguments for/against?

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

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

发布评论

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

评论(1

故乡的云 2024-08-15 20:52:13

我认为使用 OpenID 的好处是众所周知的。使用 SimpleDB 存储用户详细信息的优点包括:

  • 灵活的模式允许您直接支持某些类型的动态用户数据,而使用 RDBMS 可能会很麻烦。例如,用户定义的配置文件字段,或任意长的列表(如果值如电子邮件地址)。数据可以直接存储,不需要另一个表来连接。
  • 您没有需要调整的设置和配置选项,因此很简单。您基本上将服务器维护和数据库维护任务外包。如果您继续使用托管 SQLServer 解决方案,那么您也在做这件事,但程度较轻。我不了解共享 SQLServer 托管,但在性能一致性和可用性问题方面,我对共享 MySQL 托管有过不好的经历。
  • 这是 SimpleDB 声称的另一件事:所有数据自动跨数据中心复制,并且集群中的所有服务器能够独立处理读取和写入,从而实现更好的可用性。如果整个数据中心变黑或者路由器真的融化了,您的应用程序可能仍然会嗡嗡作响。也许服务水平会下降,但如果规划得当,功能齐全。当问题得到解决后,数据会自动在后台同步备份。
  • 良好的表现。它的速度不如本地托管的无负载 SQLServer 实例那么快,但开箱即用,它对于用户数据(及更多数据)来说足够快,并且可扩展性良好。
  • 如果您在 Amazon EC2 Windows 服务器上运行 ASP.NET 应用程序,则可以在服务器和 SimpleDB 之间实现快速、免费的数据传输。典型的往返 ping 时间在 2 毫秒到 7 毫秒之间。
  • 免费使用套餐涵盖每月 1GB 带宽、1GB 存储和 25 小时盒子使用量。根据应用程序的不同,您可能可以免费走很远的路。

缺点包括:

  • 没有关系、约束或模式,因此您必须在一定程度上进行非规范化。您想要检查的约束必须在代码中完成,并且您想要执行的连接将需要后续查询来模拟。与后续查询和主键的连接并不像听起来那么糟糕,因为 SimpleDB 具有可靠的查询 API 并针对并发请求进行了优化。很多时候,即使是复杂的连接也可以在 SimpleDB 的 2 次往返(相当于时间)中进行模拟。
  • 您没有可以调整的设置和配置选项。
  • 您必须能够处理最终一致性。您始终可以在项目级别应用原子更新和删除,但在正常操作期间更新可能不会显示在读取请求中一整秒(根据我的经验,不能保证)。当然,在发生故障的情况下,时间会更长。 “处理它”通常必须在会话级别进行。如果用户更新了她的个人资料(使用您的应用程序)并且其他人在几秒钟内都看不到更改,那没关系,但如果她的视图在几秒钟内恢复到旧状态,那就糟糕了。有一些简单的方法可以解决这个问题,但是您必须考虑这些问题并解决它们。
  • 你受亚马逊的摆布。不会有什么不好的事情发生,而且并不一定比受 SQLServer 托管公司的摆布更糟糕。但这可能会引起一些人的担忧。比 SQLServer 情况更糟糕:如果您与 Amazon 分手,SimpleDB 应用程序将无法在其他任何地方运行(本地运行的 M/DB 实例除外)。

I think the benefits of using OpenID are pretty well known. The advantages of using SimpleDB for storing user details include:

  • The flexible schema allows you to directly support certain types of dynamic user data in ways that can be cumbersome with an RDBMS. For instance user defined profile fields, or arbitrarily long lists if values like email addresses. The data can be stored directly without needing yet another table to join against.
  • You don't have setup and configuration options that need to be tweaked, so it's simple. You are basically outsourcing the server maintenance and database maintenance tasks. Which you are also doing, to a lesser degree, if you stay with a hosted SQLServer solution. And I don't know about shared SQLServer hosting, but I have had bad experiences with shared MySQL hosting in terms of consistency of performance and availability problems.
  • Which is another thing SimpleDB claims: better availability with all data automatically replication across data centers and all servers in your cluster able to handle both reads and writes independently. If an entire data center goes dark or if a router literally melts, your app may still be humming away. Perhaps with a degraded service level, but fully functional if you planed it well. And when the problems get fixed the data automatically syncs back up in the background.
  • Good performance. It's not as fast as a locally hosted SQLServer instance with no load, but out of the box it is easily fast enough for user data (and more) and it scales well.
  • If you run your ASP.NET app on an Amazon EC2 Windows server, you get fast free data transfer between your server and SimpleDB. Typical round trip ping times are between 2ms and 7ms.
  • The free usage tier covers 1GB bandwidth, 1GB storage and 25 hours box usage per month. Depending on the app, you might be able to go quite far for free.

Disadvantages include:

  • There are no relations or constraints or schema so you have to denormalize to a degree. Constraints you want to check must be done in code and joins you want to do will require follow up queries to simulate. Joins with follow up queries and primary keys are not as bad as they sound since SimpleDB has a solid query API and is optimized for concurrent requests. A lot of the time even complex joins can be simulated in (the equivalent time of) 2 round trips to SimpleDB.
  • You don't have setup and configuration options to tweak.
  • You have to be able to deal with eventual consistency. You can always apply atomic updates and deletes at the item level but updates may not show in read requests up for a full second during normal operations (in my experience, not a guarantee). And of course much longer during failure scenarios. "dealing with it" usually has to happen at the session level. If a user updates her profile (using your app) and nobody else can see the change for a couple seconds it's OK, but if her view reverts back to the old state for a few seconds that would be bad. There are some easy ways to deal with this, but you do have to think about these issues and deal with them.
  • You are at the mercy of Amazon. Nothing bad may happen, and it isn't necessarily any worse than being at the mercy of a SQLServer hosting company. But it may cause concern for some people. Worse than the SQLServer case: a SimpleDB app isn't going to work anywhere else if you part company with Amazon (except for a locally run M/DB instance).
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文