Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'tarek': 0.07; 'portable': 0.09; 'received:internal': 0.09; 'cc:addr:python-list': 0.10; 'advance': 0.10; '(say': 0.16; 'fits': 0.16; 'from:name:tarek ziad\xe9': 0.16; 'gilles': 0.16; 'inputs': 0.16; 'outputs': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:mail.srv.osa': 0.16; 'received:messagingengine.com': 0.16; 'received:nyi.mail.srv.osa': 0.16; 'received:osa': 0.16; 'received:srv.osa': 0.16; 'url:ziade': 0.16; 'ziad\xe9': 0.16; 'wrote:': 0.17; 'examples': 0.18; 'hack': 0.18; '(or': 0.18; 'app': 0.19; 'stopping': 0.22; 'title,': 0.22; 'runs': 0.22; 'cc:2**0': 0.23; 'split': 0.23; 'cheers': 0.24; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'core': 0.27; 'opposed': 0.27; 'far,': 0.29; 'obscure': 0.29; 'pointer.': 0.29; "i'm": 0.29; 'code': 0.31; 'good.': 0.32; 'could': 0.32; 'controls': 0.33; 'another': 0.33; "can't": 0.34; 'thanks': 0.34; 'explain': 0.36; 'but': 0.36; 'url:org': 0.36; 'subject:" ': 0.36; 'possible': 0.37; 'two': 0.37; 'some': 0.38; 'received:10': 0.38; 'hello,': 0.39; 'short': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'agent': 0.64; 'within': 0.64; 'choose': 0.65; 'itc': 0.84; 'received:80.15': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=eT3Ql3uGCcIiEv4Mm/mlaK AZ5jg=; b=Ycb7nIcqprQcvApe+mHPEmaPEmHMv4/j8/gLdAaoXld+dysEkF1EOX xSVIXlbM0XFoqH3rA82Yi6n71Z2LTumy4h/LfUyF6gGibmDDavOGKG9gu9vZo4BC h1LiSpUmusnaHM1lLlV074y6hN717emwnW81o5ObOU4wmFCXXhE8I= X-Sasl-enc: g4VnRcee2ip/lrmi2JVtj/wVOYV95HplHSe/57rAfLPw 1361973344 Date: Wed, 27 Feb 2013 14:55:42 +0100 From: =?ISO-8859-1?Q?Tarek_Ziad=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130216 Thunderbird/17.0.3 MIME-Version: 1.0 To: Gilles Lenfant Subject: Re: "Daemonizing" an application. References: <3e4921b7-fde3-4de7-ab01-1c98ddf63363@googlegroups.com> In-Reply-To: <3e4921b7-fde3-4de7-ab01-1c98ddf63363@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361973348 news.xs4all.nl 6860 [2001:888:2000:d::a6]:36614 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40063 On 2/27/13 11:52 AM, Gilles Lenfant wrote: > Hello, > > Sorry for the obscure title, but I can't make short to explain what I'm searching for. :) > > I made an app (kind of proxy) that works without UI within it's process. So far, so good. > > Now I need to change "live" some controls of this application, without stopping it. > > So my app will be split in two : > > * A control app (say "appctl") for a console UI > * A daemon (or agent ?) that runs the core of the app (say "appd"), processing inputs and outputs > > What are the best practices to do this ? Examples in a well known Pyhon app I could hack ? Is it possible with standard packages only ? > > Thanks in advance fo any pointer. > You can have a look at Circus - https://circus.readthedocs.org which is a process manager. "circusctl" is used to control "circusd" using ZeroMQ The nice thing about zmq as opposed to signals is that you can code your thing independantly from the transport then choose which transport fits a situation: TPC (then the ctl can be on another box), IPC or even ITC That also means your ctl part can be portable to any platform Cheers Tarek -- Tarek Ziadé ˇ http://ziade.org ˇ @tarek_ziade