473,395 Members | 1,584 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Advice for Python and Web Server/Services?


I have recently discovered Python and like it quite a bit. I would like to
use it on a new project I am starting.

The project will gather data from several web services and present the
collected data to browser users through a web server.

So basically I need a full-time web server and a separate way to poll web
services for their data. There is no database involved.

The problem is that I have tried several Python web servers (CherryPy,
Karrigell, etc) and they all have problems getting out through my Comcast
cable modem. There is a 3 second pause every 10th file. Never the 9th or
11th, but always the 10th file.

I thought maybe Comcast was limiting incomming HTTP but Apache does not do
this so I'm stumped as to why it is happening with the Python servers. All
servers work fine over the LAN.

Anyway, I wanted to get some advice on what type of setup would be best
for this using Apache. The web service polling needs to be going all the
time so a straight CGI-type thing is not an option.

I've looked in to fastcgi and mod_python but I'm not sure either is what I
need. What I want is for my Python program to be polling the web
services 24/7 and Apache to serve static pages by itself but call
a function in my already running Python program for files with a certain
extension (.xml for example).

Have any of you done something like this before?

Ideally, I'd like to figure out why the Python servers are having
problems. This is a very low volume system so straight Python would be
great if I can get it working.

Thanks for any advice you can give.

--
Ron Davis


--
Ron Davis
Mar 26 '06 #1
1 2049
On Sunday 26 March 2006 5:00 pm, Dennis Lee Bieber wrote:
Any possibility you need to specify an option on the socket
connections to reuse-sockets without the normal time-out?
The problem turned out to be keep-alive. Apparently, Comcast is limiting my
inbound connections. Apache keeps the connections alive so it works fine. The
Python servers don't support keep-alive and are using up the available
connections too quickly.

I'm now using Apache as a proxy to the Python server and it works well.

Thanks for the response.
On Sun, 26 Mar 2006 14:55:12 -0500, Ron Davis <wi**@comcast.net>

declaimed the following in comp.lang.python:
I've looked in to fastcgi and mod_python but I'm not sure either is what
I need. What I want is for my Python program to be polling the web
services 24/7 and Apache to serve static pages by itself but call a
function in my already running Python program for files with a certain
extension (.xml for example).


I think you'll first need to disconnect the two sides... The program
doing the polling has to run completely stand-alone from your own
web-server. I also think you'll need to create some independent
(file-system?) store which the polling program can write to; so your web
server page can do the selected retrieval -- but since you don't want a
database capable of concurrent access... The polling program needs to
include an asynchronous or threaded scheme with a local socket so the
web server (CGI) process can connect to it and requests the poller to
return the data.
Ideally, I'd like to figure out why the Python servers are having
problems. This is a very low volume system so straight Python would be
great if I can get it working.


Any possibility you need to specify an option on the socket
connections to reuse-sockets without the normal time-out?
--
> ================================================== ============ <
> wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wu******@dm.net | Bestiaria Support Staff <
> ================================================== ============ <
> Home Page: <http://www.dm.net/~wulfraed/> <
> Overflow Page: <http://wlfraed.home.netcom.com/> <


--
Ron Davis
Custom Software Engineering
Mar 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Hatmaker | last post by:
I have begun experimenting with web services, and I created some simple web services in C# and was able to install them with IIS and create an equally simple C# client to consume them. My next...
4
by: Socheat Sou | last post by:
After a brief, but informative, discussion on Freenode's #zope chatroom, I was advised to consult the gurus on c.l.p. I'm working for a small company who is in desperate need to rewrite it's...
3
by: bruce | last post by:
hi... i'm running rh8.0 with gnome.. i'm not sure of the version (it's whatever rh shipped). i've recently updated (or tried to update) python to the latest version. when i try to run the...
24
by: Joseph Geretz | last post by:
Up to this point, our application has been using Windows File Sharing to transfer files to and from our application document repository. This approach does not lend itself toward a secure...
5
by: John Goodfellow | last post by:
I'm trying to find a .NET-centric alternative to the Plone CMS package. For those not familiar, Plone is an open source CMS built on the Zope application server which is built on Python. I'm the...
2
by: Anders K. Olsen | last post by:
Hello group I would like some advice on how to model my webservices. Our application is made up of a number of independent modules that handle different parts of the application logic. It is a...
9
by: Duncan Smith | last post by:
Hello, I find myself in the, for me, unusual (and at the moment unique) position of having to write a web application. I have quite a lot of existing Python code that will form part of the...
10
by: sandipm | last post by:
Hi, In my application, I have some configurable information which is used by different processes. currently I have stored configration in a conf.py file as name=value pairs, and I am importing...
37
by: Michael Palmer | last post by:
As anyone knows, the state of Python GUI programming is a little fractured at this time, with many toolkits, wrappers and meta-wrappers dead and alive, with or without documentation. I've come...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.