在网络上托管一个重要的 python 程序?

发布于 2024-11-01 08:03:47 字数 730 浏览 6 评论 0原文

我在这方面完全是新手,所以请原谅我的无知。

我有三个问题:

  1. 在线托管 python 程序的最佳(最快、最简单、无头痛)方式是什么?

    我目前正在研究 Google App Engine 和 Python 网络框架,但所有这些选项有点让人不知所措。

  2. 哪些 gui/viz 库可以毫无问题地转移到 Web 应用程序环境?

    为了简单起见,我愿意牺牲一些性能。

    (Google App Engine 无法执行 C 库,因此这会造成困境。)

  3. 在哪里可以了解有关本地运行程序与让程序在服务器上持续运行并接受多个用户请求的更多信息?< /p>

目前我有一个工作的 Python 程序,仅使用标准 Python 库。它目前使用大约 2.7GB 的内存,但随着我增加数据集,我预测它将使用接近 6GB 的内存。我可以在我的个人机器上运行它,一切都很顺利。我想继续在我的家用机器上开发前端,并稍后实现网络应用程序。

这是我之前的一篇相关的帖子

I'm a complete novice in this area, so please excuse my ignorance.

I have three questions:

  1. What's the best (fastest, easiest, headache-free) way of hosting a python program online?

    I'm currently looking at Google App Engine and Web Frameworks for Python, but all the options are a bit overwhelming.

  2. Which gui/viz libraries will transfer to a web app environment without problems?

    I'm willing to sacrifice some performance for the sake of simplicity.

    (Google App Engine can't do C libraries, so this is causing a dilemma.)

  3. Where can I learn more about running a program locally vs. having a program continuously run on a server and taking requests from multiple users?

Currently I have a working Python program that only uses standard Python libraries. It currently uses around 2.7gb of ram, but as I increase my dataset, I'm predicting it will use closer to 6gb. I can run it on my personal machine, and everything is just peachy. I'd like to continue developing on the front end on my home machine and implement the web app later.

Here is a relevant, previous post of mine.

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

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

发布评论

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

评论(3

屋顶上的小猫咪 2024-11-08 08:03:47

根据您对服务器管理的了解,您应该考虑使用专用服务器。我正在与 Godaddy 共享服务器上的一些数据上使用 Numpy、Scipy、Pandas 等运行一些自定义 Python 模块。我写的一个程序花了 120 秒才完成。最近我们切换到专用服务器,现在需要 2 秒。共享环境使用CGI来运行Python,我在专用服务器上安装了mod_python。

使用专用服务器可以对服务器进行完全控制(包括根访问),从而可以编译和/或安装任何内容。它有点贵,但如果你能用你的东西赚钱,那可能是值得的。

另一种选择是使用类似 http://www.dyndns.com/ 的内容,您可以在其中托管域在你自己的机器上。

话虽如此,也许有一些答案:

  1. 这取决于您的要求。 ~4GB RAM 可能需要专用服务器。您所要求的不一定是一项简单的任务,因此不要害怕弄脏您的双手。

  2. 不确定您在这里的意思。

  3. 服务器只是响应请求的计算机。在专用服务器上(我一直提到),您在 Unix(或 Windows)环境中操作,就像在本地一样。您使用软件(例如 Apache Web 服务器)来服务客户端请求。我的投票是 mod_python。

Depending on your knowledge with server administration, you should consider a dedicated server. I was doing running some custom Python modules with Numpy, Scipy, Pandas, etc. on some data on a shared server with Godaddy. One program I wrote took 120 seconds to complete. Recently we switched to a dedicated server and it now takes 2 seconds. The shared environment used CGI to run Python and I installed mod_python on the dedicated server.

Using a dedicated server allows COMPLETE control (including root access) to the server which allows the compilation and/or installation of anything. It is a bit pricy but if you're making money with your stuff it might be worth it.

Another option would be to use something like http://www.dyndns.com/ where you can host a domain on your own machine.

So with that said, perhaps some answers:

  1. It depends on your requirements. ~4gb of RAM might require a dedicated server. What you are asking is not necessarily an easy task so don't be afraid to get your hands dirty.

  2. Not sure what you mean here.

  3. A server is just a computer that responds to requests. On the dedicated server (I keep mentioning) you are operating in a Unix (or Windows) environment just like you would locally. You use SOFTWARE (e.g. Apache web server) to serve client requests. My vote is mod_python.

感性不性感 2024-11-08 08:03:47

这比专用服务器更令人头疼,但使用 Amazon EC2 实例应该更接近您的需求。

http://aws.amazon.com/ec2/#instance

他们的超大实例应该是对于您需要做的事情来说足够大,并且您只在需要时才打开实例,这样您就不会像使用相同大小的专用服务器那样支付巨额费用。

It's a greater headache than a dedicated server, but it should be much closer to your needs to go with an Amazon EC2 instance.

http://aws.amazon.com/ec2/#instance

Their extra large instance should be more than large enough for what you need to do, and you only turn the instance on when you need it so you don't have the massive bill that you get with a dedicated server that's the same size.

生生漫 2024-11-08 08:03:47

有一些很好的基于 javascript 的可视化工具包,因此您可以对应用程序进行建模以返回原始 (json) 数据并将其呈现在客户端上。
我可以提到 d3.js http://mbostock.github.com/d3/ 和 JavaScript InfoVis工具包 http://thejit.org/

There are some nice javascript based visualization toolkits out there, so you can model your application to return raw (json) data and render that on the client.
I can mention d3.js http://mbostock.github.com/d3/ and the JavaScript InfoVis Toolkit http://thejit.org/

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