Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
subprocess and cherrypy
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rita Morgan  
View profile  
 More options Apr 15 2012, 8:08 am
From: Rita Morgan <rmorgan...@gmail.com>
Date: Sun, 15 Apr 2012 05:08:48 -0700 (PDT)
Local: Sun, Apr 15 2012 8:08 am
Subject: subprocess and cherrypy
Hi,

My web application involves many subprocesses to get data back to the
website. I was wondering, if there was a best practices guide or even
better some examples on how to handle this use case?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Bryan  
View profile  
 More options Apr 15 2012, 8:14 am
From: Daniel Bryan <danbr...@gmail.com>
Date: Sun, 15 Apr 2012 22:14:42 +1000
Local: Sun, Apr 15 2012 8:14 am
Subject: Re: [cherrypy-users] subprocess and cherrypy

I don't know about best practises within the CherryPy community, but since
CherryPy integrates very well with arbitrary Python libraries, I've dealt
with the problem of gathering data from multiple sources (such as third
party APIs) by using a message queue framework such as RabbitMQ.

It really depends on what your problem actually is. Are you doing lots of
sequential IO work before you can send a response? Then a message queue
will mean you can respond at the speed of the slowest IO response and no
slower. Are you waiting around in general for some slow IO and hogging
precious resources by keeping a process or thread open for that request the
whole time? Then a framework for asynchronous IO such as Twisted might be
more helpful.
On Apr 15, 2012 10:08 PM, "Rita Morgan" <rmorgan...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Skutt  
View profile  
 More options Apr 15 2012, 10:39 am
From: Adam Skutt <ask...@gmail.com>
Date: Sun, 15 Apr 2012 10:39:17 -0400
Local: Sun, Apr 15 2012 10:39 am
Subject: Re: [cherrypy-users] subprocess and cherrypy

On Sun, Apr 15, 2012 at 8:08 AM, Rita Morgan <rmorgan...@gmail.com> wrote:
> Hi,

> My web application involves many subprocesses to get data back to the
> website. I was wondering, if there was a best practices guide or even
> better some examples on how to handle this use case?

As Daniel said, the exact right solution depends on your needs.  I
wrote a CherryPy bus plugin to spawn off subprocesses for a commerical
project that worked well enough for long-running daemon processes that
needed to start and stop with my Python application.  It was similar
in nature to the BackgroundTask plugin that exists in the standard
distribution, but starts processes instead.

The one tip I can provide is make sure that you spawn your processes
before the threads start, or you may run into some trouble.  This
means either using a bus plugin or spawing them before starting the
CherryPy engine.

I'll also note that we were eventually planning to move to Celery to
gain distributed processing support.

Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »