Mod_python与应用服务器如CherryPy? [英] Mod_python vs. application server like CherryPy?

查看:71
本文介绍了Mod_python与应用服务器如CherryPy?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在网络应用程序方面仍然是新手,所以想要选择解决方案编写应用程序的一些帮助使用Python:使用通过mod_python运行它与使用基于Python的工具(如CherryPy,Quixote)构建一个

应用程序服务器之间的区别是什么? >
德拉科等等?


谢谢。

Hi

I''m still a newbie when it comes to web applications, so would like
some help in choosing a solution to write apps with Python: What''s the
difference between using running it through mod_python vs. building an
application server using Python-based tools like CherryPy, Quixote,
Draco, etc.?

Thanks.

推荐答案

Vincent Delporte写道:
Vincent Delporte wrote:

我在Web应用程序方面仍然是个新手,所以想要选择一个解决方案来编写应用程序Python:使用通过mod_python运行它与使用基于Python的工具(如CherryPy,Quixote,
)构建一个

应用程序服务器之间的区别是什么?
Draco等?
I''m still a newbie when it comes to web applications, so would like
some help in choosing a solution to write apps with Python: What''s the
difference between using running it through mod_python vs. building an
application server using Python-based tools like CherryPy, Quixote,
Draco, etc.?



好​​吧,首先让我说你可以用CherryPy构建任何东西,

你可以使用mod_python构建。简而言之,mod_python为您提供从Python到Apache API的
访问权限,而CherryPy和朋友可以使用自己的API提供




我加入了CherryPy开发团队,因为我更喜欢CherryPy的API

,当时需要在IIS上部署我的网站,而不是Apache。我用
继续使用相同的网站,用CherryPy编写,但现在使用

Apache(甚至mod_python!)来提供服务。 CherryPy允许我将

集中在应用程序层上,并在另一天将服务器/部署层留给




其他换句话说,mod_python没有任何东西可以让它离开

应用程序服务器类别本身。特别是

中的发布者处理程序是应用程序服务器的示例。建立在

mod_python'的基础API之上,与CherryPy的
遍历和调用机制有很强的相似之处。但IMO CherryPy有一个更清晰的API

用于过程控制(引擎和服务器),应用程序组合(通过

对象树和通过WSGI)和插件(如gzip,静态内容,

和标题管理)。

Robert Brewer

系统架构师

Amor Ministries
fu******@amor.org

Well, let me start by saying that anything you can build with CherryPy,
you can build with mod_python. In a nutshell, mod_python gives you
access from Python to the Apache API, whereas CherryPy and friends give
you their own API.

I joined the CherryPy development team because I liked CherryPy''s API
better, and at the time, needed to deploy my site on IIS, not Apache. I
continue to use the same site, written with CherryPy, but now using
Apache (and even mod_python!) to serve it. CherryPy allows me to focus
on the application layer and leave the server/deployment layer for
another day.

In other words, there''s nothing about mod_python that leaves it out of
the "application server" category per se. The publisher handler, in
particular, is an example of an "application server" built on top of
mod_python''s base API, and has some strong similarities to CherryPy''s
traversal and invocation mechanisms. But IMO CherryPy has a cleaner API
for process control (engines and servers), application composition (via
the object tree and via WSGI), and plugins (like gzip, static content,
and header management).
Robert Brewer
System Architect
Amor Ministries
fu******@amor.org

2006年12月5日17:05:06 -0800,fumanchu < fu ****** @ amor.orgwrote:
On 5 Dec 2006 17:05:06 -0800, "fumanchu" <fu******@amor.orgwrote:

>简而言之,mod_python允许您从Python访问Apache API而CherryPy和朋友给你自己的API。
>In a nutshell, mod_python gives you
access from Python to the Apache API, whereas CherryPy and friends give
you their own API.



我不知道Apache有自己的API,或者在编写Web应用程序时甚至需要

蟒蛇。除了Python / mod_python之外,它还提供了什么呢?

I didn''t know Apache had an API of its own, or that it was even needed
when writing a web application in Python. What does it provide in
addition to Python/mod_python?


CherryPy允许我将重点放在应用层上并离开
另一天的服务器/部署层。
CherryPy allows me to focus
on the application layer and leave the server/deployment layer for
another day.



所以你建议使用Apache作为前端,并在后台运行一个应用程序

服务器,如CherryPy?

So you recommend using Apache as the front-end, and run an application
server like CherryPy in the background?


但IMO CherryPy有一个更清晰的API,用于过程控制(引擎和服务器),应用程序组合(通过对象树和通过WSGI)和插件(如gzip,静态内容,
和标题管理)。
But IMO CherryPy has a cleaner API
for process control (engines and servers), application composition (via
the object tree and via WSGI), and plugins (like gzip, static content,
and header management).



有趣。我会看看我是否可以在纯CGI,FastCGI,mod_python中使用Python编写应用程序来获取更多信息,并且作为一个

应用程序服务器,例如。 CherryPy。


谢谢。

Interesting. I''ll see if I can find more information on writing an app
with Python in pure CGI, in FastCGI, in mod_python, and as an
application server with eg. CherryPy.

Thanks.


Vincent Delporte写道:
Vincent Delporte wrote:

2006年12月5日17:05:06 -0800,fumanchu < fu ****** @ amor.orgwrote:
On 5 Dec 2006 17:05:06 -0800, "fumanchu" <fu******@amor.orgwrote:

简而言之,mod_python为您提供从Python到访问的
访问权限Apache API,而CherryPy和朋友给你自己的API

In a nutshell, mod_python gives you
access from Python to the Apache API, whereas CherryPy and friends give
you their own API.



我不知道Apache有自己的API,或者甚至需要在编写Web应用程序时使用
蟒蛇。除了Python / mod_python之外,它还提供了什么?b $ b?


I didn''t know Apache had an API of its own, or that it was even needed
when writing a web application in Python. What does it provide in
addition to Python/mod_python?



mod_python提供不同的API层,最低级别

是那些处理连接和请求之类的东西 - 请参阅

apache模块详情:

http://www.modpython.org/live/curren...le-apache.html


其他图层涉及类似的事情cookie,会话和Python服务器

页面,还有像发布者处理程序这样的东西,而不是与Apache本身有关,而是与Python有关:

http:// www.modpython.org/live/curren.../hand-pub.html


Paul

mod_python provides different layers of APIs, with the lowest levels
being those dealing with things like connections and requests - see the
apache module for details:

http://www.modpython.org/live/curren...le-apache.html

Other layers involve things like cookies, sessions and Python server
pages, and there are also things like the publisher handler which are
less to do with Apache itself and more to do with Python:

http://www.modpython.org/live/curren.../hand-pub.html

Paul

这篇关于Mod_python与应用服务器如CherryPy?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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