1

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.

Community
  • 1
  • 1
wnewport
  • 1,013
  • 2
  • 10
  • 13
  • 1
    This is really vague - 'program' covers everything from a 'hello world' webapp to a control routine for a nuclear reactor. What's the nature of your 'program'? Does it have to run persistently, or could it be written to be request-based? What sort of interaction does it require with users? – Nick Johnson Apr 14 '11 at 00:38
  • It's a searchable database where a user's query would return a subgraph that could be expanded or collapsed should they choose to interact with it. It would need to run persistently, as building, or even loading the pickle takes over 60 seconds. If showing a visualization is infeasible, then returning only text is another option, but it would still take substantial time to build the index. – wnewport Apr 14 '11 at 01:00
  • 1
    Why do you need to store the whole graph in memory? Can't you serialize it to the datastore in a fashion that makes querying it practical? – Nick Johnson Apr 14 '11 at 03:35
  • @Nick, I've been reading up on web2py and App Engine, and it is starting to make sense. (I'd recommend web2py's book/tutorials to anyone with similar questions) Now I'm trying to figure out how to run/display a gui like interface with a canvas with web2py's python/html mashup for viewing. – wnewport Apr 15 '11 at 00:53

3 Answers3

1

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.

Jason Strimpel
  • 14,670
  • 21
  • 76
  • 106
  • I have a personal website through this [company](http://holeinthewallhosting.com/upgrade.php), but I don't think it's up to the task. Alternatively, my project could be hosted by my university or the website from which I'm getting my data (assuming they'd be interested). \n\n Anyway, on 2 I was asking for Python GUI library suggestions to build my UI that would work on the web. – wnewport Apr 14 '11 at 00:20
  • 1
    @wnewport: So hosting is not the issue. Are the computers you have access to Unix? When you say persistently, do you mean every X minutes, or seconds? You could write the program and put it on a cron to run every so often. Google "model view controller". It is a popular programming paradigm that might be a good framework. – Jason Strimpel Apr 14 '11 at 01:24
  • OK, yes MVC is what I was looking for. I'll research that. Thanks! – wnewport Apr 14 '11 at 03:19
0

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.

Ken
  • 1,110
  • 2
  • 10
  • 26
0

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/

guigouz
  • 1,211
  • 1
  • 13
  • 18