confused on python rpc with apache, is it possible?

K

krishnakant Mane

hello all.
I will like to know if the following combination is possible.
I have looked around on google and did not find any thing productive
so bothering the list: sorry.
I am developing a distributed application which will have 3 layers
namely the thin client written in wxpython, an application layer on a
server and a database server of course. database and application
server will be on same physical machine.
what I want to know is if I can use python as the base for developing
the application layer as an rpc server and use apache server to
handle http remote procedure requests from the client?
if yes then what basic configuration settings I will need?
I believe I must first have apache recognise python interpreter and
then do some settings in apache so that it knows that what is
happening is not a web page request but an xml-rpc application created
in python.
can some one guide me?
thanks
Krishnakant.
 
D

Diez B. Roggisch

krishnakant said:
hello all.
I will like to know if the following combination is possible.
I have looked around on google and did not find any thing productive
so bothering the list: sorry.
I am developing a distributed application which will have 3 layers
namely the thin client written in wxpython, an application layer on a
server and a database server of course. database and application
server will be on same physical machine.
what I want to know is if I can use python as the base for developing
the application layer as an rpc server and use apache server to
handle http remote procedure requests from the client?
if yes then what basic configuration settings I will need?
I believe I must first have apache recognise python interpreter and
then do some settings in apache so that it knows that what is
happening is not a web page request but an xml-rpc application created
in python.
can some one guide me?

I'm unclear why you want the apache in there in the first place. Why don't
you just create an e.g. twisted-based XMLRPC-server, and simply let that
run? What is the apache intended for?

Diez
 
K

krishnakant Mane

I'm unclear why you want the apache in there in the first place. Why don't
you just create an e.g. twisted-based XMLRPC-server, and simply let that
run? What is the apache intended for?


twisted-based? what is that? what is that.
I am very new to xml-rpc so my questions may sound very basic.
any ways apache is doing nothing in there but I thought that if some
thing needs to be done in php in the future then apache better be
there but as I said that is no need if pythone can do it on a stand
alone basis.
 
R

Ravi Teja

krishnakant said:
twisted-based? what is that? what is that.
I am very new to xml-rpc so my questions may sound very basic.

All you have to do is Google when you have very basic questions
For example: twisted python xmlrpc
any ways apache is doing nothing in there but I thought that if some
thing needs to be done in php in the future then apache better be
there but as I said that is no need if pythone can do it on a stand
alone basis.

Use mod_python with some xmlrpc handler. There is more than one around.
Google for them. That way you can keep Apache for both Python and PHP.

Ravi Teja.
 
K

krishnakant Mane

Use mod_python with some xmlrpc handler. There is more than one around.
Google for them. That way you can keep Apache for both Python and PHP.
I am confused.
I have some documents on xml-rpc but none of them mentioned apache.
Krishnakant.
 
D

Diez B. Roggisch

krishnakant said:
I am confused.
I have some documents on xml-rpc but none of them mentioned apache.

There is nothing an apache will do for you - except from possibly
proxing python.

Go read up upon xmlrpc and python, possibly doing it with twisted, but
there are other options.

Don't bother with the apache.

Diez
 
K

krishnakant Mane

There is nothing an apache will do for you - except from possibly
proxing python.

Go read up upon xmlrpc and python, possibly doing it with twisted, but
there are other options.

Don't bother with the apache.

well in that case I don't need apache.
can I do xml-rpc using the default libraries that come with every
python installer?
is there some added advantage of using twisted?
Krishnakant.
 
D

Diez B. Roggisch

well in that case I don't need apache.
can I do xml-rpc using the default libraries that come with every
python installer?

Yes, and a simple look in the API docs would have convinced you of that.
I suggest you start googling and reading.
is there some added advantage of using twisted?

Certainly, but it comes with added burden of using and understanding a
complex framework. Here also applies: read the docs.

Diez
 
F

fumanchu

krishnakant said:
can I do xml-rpc using the default libraries that come with every
python installer?

You can, but others have packaged them up to make it easier. CherryPy
includes an xmlrpc tool (and has no dependencies other than standard
Python).

You can see an example of what your code would look like in the
"setup_server" portion of
http://www.cherrypy.org/browser/trunk/cherrypy/test/test_xmlrpc.py

Further resources on using CherryPy's xml-rpc are just a Google away.
Note that some of these may use different syntax as they target
different versions of CherryPy (but the basics are the same).
http://www.google.com/search?q=cherrypy+xmlrpc


Robert Brewer
System Architect
Amor Ministries
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top