托管(命令行)Windows 应用程序的最佳解决方案?
我有一个 Windows 应用程序,它执行一些计算并从命令行调用。在我的 Windows 计算机上,我有一个在 Apache 下运行的 PHP 脚本,它执行应用程序并显示输出。
我可以使用任何托管解决方案来执行相同的操作吗?我不知道 EC2 或 Azure 是否是正确的解决方案。基本上,我需要一个网络服务器+执行我的应用程序的能力。
建议?谢谢。
I have a Windows application that does some calculations and is called from command line. On my Windows machine, I have a PHP script running under Apache that executes the application and shows the output.
Is there any hosting solution that I can use to do the same? I can't figure out if EC2 or Azure are the right solutions. Basically, I need a web server + ability to execute my application.
Suggestions? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以在 AppHarbor(.NET 平台即服务)上托管您的应用程序。您可以将您的 Web 前端移植到 .NET,或者尝试让您的 PHP 内容与 Phalanger 一起使用。 AppHarbor 正在处理后台任务,这可能很适合您的工作量。
You can host your application on AppHarbor, the .NET Platform-as-a-Service. You can either port your web frontend to .NET or try to get your PHP stuff working with Phalanger. AppHarbor is working on Background Tasks, which might be a good match for your workload.
我只需在 Windows Azure Web 角色中运行 IIS 下已有的 PHP 脚本。
I would just run the PHP script you already have under IIS in a Windows Azure web role.
如果它是 Windows 应用程序并且您有源代码,我会选择 Azure 辅助角色。使用 PaaS(如 Azure)而不是 IaaS(如 Amazon)的优点是您不必费心保持服务器最新。
真正的时间投入是当您重写应用程序以使其作为辅助角色工作时。完成这项工作所需的时间取决于您的应用程序当前的工作方式。如果使用大量光盘访问可能会很困难,也许亚马逊服务器会更好。但如果它只处理内存中的数字,Azure 辅助角色是一个非常好的候选者。
使用亚马逊服务器的真正优势是您可能根本不需要做任何工作。除了维护服务器。
If it is a Windows Application and you have the source code I would go with an Azure Worker Role. The advantage of using a PaaS (as Azure) instead of an IaaS (as Amazon) is that you wont have to bother of keeping the server up to date.
The real investment in time will be when you rewrite your application to make it work as a Worker Role. The time needed to do this work depends on how your application works right now. If is uses a lot of disc access it might be difficult and perhaps an Amazon server would be better. But if it only crunches numbers in memory an Azure Worker Role is a very good candidate.
The real advantage of using an Amazon server is that you probably wont need to do any work at all. Except maintaining the server.
正如问题中所述,Azure 和 EC2 都可以很好地完成这项工作。这就是这两种系统的设计目的。
所以问题就变成了:哪一个最好?这取决于两件事:应用程序需要做什么以及您自己的经验和偏好。
由于它是一个 Windows 应用程序,因此可能应该倾向于 Azure。虽然 EC2 支持 Windows,但目前 Azure 的工具和支持资源可能更深入。
如果成本是一个因素,那么这里有一个(有点过时的)资源:http://blog.mccrory.me/2010/10/30/public-cloud-hourly-cost-comparison/——结论是,总的来说,Azure 和 Amazon计算费用大致相似。
As described in the question both Azure and EC2 will do the job very well. This is the kind of task both systems are designed for.
So the question becomes really: which is best? That depends on two things: what the application needs to do and your own experience and preference.
As it's a Windows application there should probably be a leaning towards Azure. While EC2 supports Windows, the tooling and support resources for Azure are probably deeper at this point.
If cost is a factor then a (somewhat outdated) resource is here: http://blog.mccrory.me/2010/10/30/public-cloud-hourly-cost-comparison/ -- the conclusion is that, by and large, Azure and Amazon are roughly similar for compute charges.
Steve Marx 有一篇博客文章,介绍了如何在 Azure 上运行另一个 Web 服务器(即不是 IIS)
这可能包含您需要的一切 - 您可以部署 Apache 和可执行文件并以完全相同的方式运行它。
或者 - 您可以将可执行文件与辅助角色中的一些代码一起部署,该角色将定期运行该应用程序,这一切都取决于您的具体要求
Steve Marx has a blog post that describes how to run another web server (i.e not IIS) on Azure
This potentially has everything you need - you can deploy Apache and your executable and run it in exactly the same way.
Alternatively - you can deploy your executable along side a bit of code in a worker role that would run that application periodically, all depending on your exact requirements