在网络上托管一个非平凡的Python程序? [英] Hosting a non-trivial python program on the web?

查看:130
本文介绍了在网络上托管一个非平凡的Python程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有三个问题:


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



    我目前正在查看Google App Engine和 Web Frameworks for Python ,但所有选项都有点让人难以置信。

  2. 哪些gui / viz库将转移到Web应用程序环境问题?为了简单起见,我愿意牺牲一些性能。



    (Google App Engine可以' )

  3. 在哪里可以了解更多关于在本地运行程序的信息,以及程序是否连续运行在服务器并接受来自多个用户的请求?

  4. 现在我有一个可用的Python程序,它只使用标准的Python库。目前它使用大约2.7GB的内存,但随着我增加我的数据集,我预测它将使用更接近6GB。我可以在我的个人机器上运行它,而且一切都只是桃色。我想继续在我的家用机器的前端进行开发,并在以后实现Web应用程序。



    以下是一个相关的以前的post


    使用专用服务器允许对服务器执行COMPLETE控制(包括根访问)编译和/或安装任何东西。这有点贵,但如果你用你的东西赚钱可能是值得的。



    另一种选择是使用类似于 http://www.dyndns.com/ 您可以在自己的机器上托管一个域名。



    所以说,也许有些答案:


    1. 这取决于您的要求。 〜4GB的RAM可能需要专用服务器。你所问的不一定是一件容易的事情,所以不要害怕弄脏你的手。

    2. 不确定你的意思。

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



    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.

    解决方案

    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.

    这篇关于在网络上托管一个非平凡的Python程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆