云计算的最佳实践

发布于 2024-07-27 21:02:39 字数 326 浏览 2 评论 0原文

有人知道在云中实施应用程序时应遵循的最佳实践吗?

我想构建一个独立于云的应用程序。 因此,DAC 应该能够通过更改配置来针对 S3/AppEngine/Azure 工作。 是否有任何框架或最佳模式可供遵循,以便代码独立于云提供商。

编辑:我想了解我们如何抽象各种组件,例如 DAC/会话管理等,以便将来(当云提供商开始支持其他语言时)我们将能够从一个供应商转移到另一个供应商。 据我了解,我们需要使用 AppEngine 的模型而不是 Django 模型,使用 App Engine 的表单而不是 Django。 这些往往会锁定到提供商的应用程序。 有什么办法可以避免这样做吗?

Any one one know of the best practices to be followed when implementing an application in the cloud?

I would like to build an application, which is cloud independent. So, a DAC should be able to work against S3 / AppEngine / Azure just by changing a configuration. Is there any framework or best pattern to be followed so that code is Cloud provider independent.

EDIT: I would like to understand on how we can abstract various components such as DAC / session management etc. so, that in future (when cloud providers starts supporting other languages) we would be able to move from one vendor to another. As I understand we need to use AppEngine's model instead of Django model and App engine's forms instead of Django. These tend to lock to the app with the provider. Is there any way to avoid doing this?

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

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

发布评论

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

评论(3

我做我的改变 2024-08-03 21:02:39

目前,我认为仅通过更改配置即可在这 3 个云之间移动应用程序的目标是不可行的。 您可能很难编写既能在 appengine(python 或 java)上运行又能在 ASP.net 上运行的高效代码。 (除非有人让 django 在 azure 上运行,这太棒了)

您可能会尝试让一个代码库在 3 个代码库中的 2 个上运行 - appengine 和 EC2,或者 Azure 和 EC2。 在所有 3 个服务中,亚马逊的 EC2 是最低级别的服务,因此最灵活(它还需要您进行更多管理才能运行)。 您可以运行带有 asp.net 和 Sql 服务器的 Windows 盒子来匹配您的 azure 环境,或者您可以运行 java 堆栈来近似您的 appengine 环境。

Right now, I think your goal of being able to move an application between those 3 clouds with just a configuration change is not feasible. You would probably have a hard time writing efficient code that would run on appengine (python or java) and also run on ASP.net. (unless someone has gotten django running on azure which would be awesome)

You might have a shot at getting one codebase to work on 2 of the 3 - either appengine and EC2, or Azure and EC2. Out of all 3, amazon's EC2 is the lowest level service, and therefore most flexible (it also requires more administration on your part to get running). You could run a windows box with asp.net and Sql server to match your azure environment, or you could run a java stack to approximate your appengine environment.

木森分化 2024-08-03 21:02:39

在我看来,不同产品之间没有太多共同点。 (例如,你提到的3....)

  • S3更多的是机器映像类型
    解决方案,认为 ESX 服务器中
    云,因此您的应用程序刚刚部署
    到机器映像的实例,
    Linux 或 Windows。
  • 应用引擎是一个
    托管应用程序环境
    Python 或 Java 应用程序(Java 支持
    最近添加)
  • Azure(计算)更类似
    到托管的 ASP.NET Web 应用程序
    一堆附加服务
    (消息传递、blob 存储等)

因此,虽然存在一些共性,但我认为大多数这些产品之间的应用程序迁移并不是那么简单。 但我也不认为这是不可能的。

编辑:实际上我撒谎,S3 不是机器映像解决方案,我将其与 EC2 混淆了。 S3 是一个与托管应用程序无关的数据存储解决方案。 (除了可能是托管应用程序的存储解决方案)。

Seems to me that there is not a lot of commonality between the different offerings. (for example, the 3 you mentioned....)

  • S3 is more of a machine image type
    solution, think ESX server in the
    cloud, so your apps are just deployed
    to an instance of a machine image,
    Linux or Windows.
  • AppEngine is a
    hosted app environment for either
    Python or Java apps (Java support
    added just recently)
  • Azure (compute) is more analogous
    to a hosted ASP.NET web app with a
    bunch of additional services
    (messaging, blob storage etc)

So while there is some commonality, I don't think app migration between most of these offerings are all that straight forward. However I also don't think its impossible.

EDIT: Actually I lie, S3 is not a machine image solution, I was confusing that with EC2. S3 is a datastorage solution that has nothing to do with hosted applications. (apart from perhaps being a hosted app's storage solution).

画离情绘悲伤 2024-08-03 21:02:39

AppEngine 实现了 J2EE 容器规范以及用于数据访问的 JDO 和 JPA。 因此,如果您使用 Java,则可以非常轻松地将 J2EE 应用程序移入或移出 AppEngine。 使用 EC2,您必须自己管理服务器,这意味着您将安装和配置自己的 J2EE 服务器,例如 JBoss。 您还必须处理集群和扩展问题。 AppEngine 会为您完成这一切。 Azure 严格适用于 .NET。

AppEngine implements the the J2EE container specification along with JDO and JPA for data access. So, if you go with Java, you can pretty easily move a J2EE app to or from AppEngine. With EC2, you have to manage the server yourself which means you would be installing and configuring your own J2EE server like JBoss. You would have to deal with clustering and scaling too. AppEngine does all that for you. Azure is strictly for .NET.

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