Re: Is CherryPy the right tool for a CPanel like application?
Thank you.
You cleared some things for me and helped me understand better.
And I'm happy I can go one with cherrypy :)
On Dec 1, 4:28 pm, "Lakin Wecker" <lakin.wec...@...> wrote:
> I don't think this is entirely correct. If a single task blocks within one
> of CherryPy's threads, that particular thread will be unavailable for the
> other users, however the rest of the threads will still be available. The
> same would happen with a server that forks - the instance that is handling
> that task will be unavailable until the task completes. In either case you
> should have control over how many threads/forked instances are allowed and
> can attempt to mitigate this by increasing that number. However, in both
> cases there is the possibility that all of the threads/forked instances will
> be used by a long-running blocked task.
>
> My recommendation is that you should start a new thread for each potentially
> long-running, blocking background task to avoid using one of CherryPy's
> request handling threads. This thread would stay alive for the entire life
> of the task and would stop when the task is done. You could easily return an
> HTTP 202 once the task has been started - and use that status to inform the
> client that the task is in progress. If the thread wrote its completion
> percentage to the db or cache you could use an Ajax progress widget to keep
> the user informed of the progress as well.
>
> If you do this, you should have no issues from CherryPy itself.
>
> Lakin
>
> On 11/30/08, daniels <daniels0...@...> wrote:
>
>
>
> > Hi,
> > For quite a few time I wanted to start a pet project that will aim in
> > time to have CPanel functionality but mainly focused on python hosting
> > meaning i would like to make a way for users to generate/start Django/
> > other frameworks projects right from the panel and i seemed to have
> > found the perfect tool to build my app with it, CherryPy. This would
> > allow me to do it the way I want, building the app with it's own HTTP/
> > HTTPS server and also all in my favorite programming language.
> > But now a new question arises, CherryPy being a threaded server will
> > it be the right for this kind of task?
> > Because there will be lots of time consuming tasks so if one of the
> > tasks blocks, the rest of the users trying to access other pages will
> > be left waiting eventually getting timed out.
>
> > I imagine that such kind of problem wouldn't happen on a fork server.
>
> > What would you advise?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---