1

I am considering to use python serving json based web services, my priorities are, in order:

  • maintainability
  • easy of coding
  • high availability
  • performance

Apache->AJP->Flup->Python seems ok to me, would you recommend another setup or is this ok ?

mete
  • 589
  • 2
  • 6
  • 17

4 Answers4

1

What would AJP do in that setup? The only "flup" I can find is a package with a "Random assortment of WSGI servers", which doesn't seem very helpful.

I'd recommend you to look at Pyramid and Django. Two Python web frameworks with different philosophies that both fulfill your requirements. Then pick the one that you like best.

Lennart Regebro
  • 167,292
  • 41
  • 224
  • 251
1

That setup will work, if you already know flup. There are about a million other configs, including using some pure python server (and Apache ProxyPass). If you need Tomcat, then this is totally reasonable. I recommend adding paste into the mix for managing the configuration.

Gregg Lind
  • 20,690
  • 15
  • 67
  • 81
1

Choose any WSGI-compatible framework (like already mentioned Pyramid, Django or Pylons, to name a few) and you will have plenty of deployment possibilities. There is a nice benchmark of WSGI servers, nginx + uWSGI seems like a good solution.

Juliusz Gonera
  • 4,658
  • 5
  • 32
  • 35
0

You don't give enough information to answer this question. What is your web service doing (apart from serving JSON)? Where does the data come from? How many different types of output are there? How dynamic is it? What sort of processing is required? Does it need authentication? Does it need a database connection? Will it be REST? Does it need to handle POSTs as well as just GETs? And so on, and on.

Your proposed solution might be good (although like Lennart I don't understand what AJP is doing in there), if you just very simple requirements to serve a few different types of content on a read-only basis. Again, though, if you have anything more complex you may want to look into Django + Piston, running on Apache + mod_wsgi.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895
  • it will be rest, thus process both POST and GET. data is coming both from database and external services. there will be like 15-20 types of services. they are highly dynamic, almost nothing is static. it needs authentication. I connect apache with ajp (like fastcgi) to flup, not directly using wsgi. Because I may need Tomcat for some other things. – mete Jan 01 '11 at 15:01
  • @mete: Just because you need tomcat and connect it with AJP, doesn't mean you should connect the Python server with AJP. – Lennart Regebro Jan 01 '11 at 17:20
  • that is right. just I want to keep things simpler. does flup more stable for fast cgi ? – mete Jan 01 '11 at 20:08