Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30556

Re: Can somebody give me an advice about what to learn?

References <15f76508-437a-4d18-ac9b-16174ef172e8@googlegroups.com> <mailman.1672.1349011558.27098.python-list@python.org> <roy-A05EF0.10233530092012@news.panix.com>
Date 2012-10-01 00:35 +1000
Subject Re: Can somebody give me an advice about what to learn?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1675.1349015755.27098.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Oct 1, 2012 at 12:23 AM, Roy Smith <roy@panix.com> wrote:
> In article <mailman.1672.1349011558.27098.python-list@python.org>,
>  Chris Angelico <rosuav@gmail.com> wrote:
>
>> there's no efficient and reliable way to change/reload code in a
>> running application (not often an issue).
>
> What we do (largely cribbed from django's runserver) is start up a
> thread which once a second, looks at all the modules in sys.modules,
> checks to see if the modification time for their source files has
> changed, and if so, restarts the application.  This is hugely convenient
> when developing any kind of long-running application.  You don't need to
> keep restarting the application; just edit the source and changes take
> effect (almost) immediately.
>
> Not sure if this is what you had in mind.

It's not an _explicit_ restart, but you have to write your application
to keep all its state on disk in some way. What I'm talking about is
having a single process that never terminates, never stops accepting
connections, but at some point new connections begin to be served with
new code - with old ones, if they're still going, continuing to be
handled by the old code. I have one such process that's been going for
(let me check) 115 wk 0d 21:05:21.

For many types of application, restarting is perfectly viable, so this
isn't a major issue with Python.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Can somebody give me an advice about what to learn? tcgo <tomeuari@gmail.com> - 2012-09-30 05:58 -0700
  Re: Can somebody give me an advice about what to learn? Chris Angelico <rosuav@gmail.com> - 2012-09-30 23:25 +1000
    Re: Can somebody give me an advice about what to learn? Roy Smith <roy@panix.com> - 2012-09-30 10:23 -0400
      Re: Can somebody give me an advice about what to learn? Chris Angelico <rosuav@gmail.com> - 2012-10-01 00:35 +1000
        Re: Can somebody give me an advice about what to learn? Roy Smith <roy@panix.com> - 2012-09-30 11:01 -0400
          Re: Can somebody give me an advice about what to learn? Chris Angelico <rosuav@gmail.com> - 2012-10-01 01:37 +1000
            Re: Can somebody give me an advice about what to learn? Roy Smith <roy@panix.com> - 2012-09-30 18:14 -0400
              Re: Can somebody give me an advice about what to learn? Chris Angelico <rosuav@gmail.com> - 2012-10-01 09:11 +1000
              Re: Can somebody give me an advice about what to learn? Hans Mulder <hansmu@xs4all.nl> - 2012-10-03 19:55 +0200
      Re: Can somebody give me an advice about what to learn? Chris Angelico <rosuav@gmail.com> - 2012-10-01 00:37 +1000
  Re: Can somebody give me an advice about what to learn? Tim Chase <python.list@tim.thechases.com> - 2012-09-30 08:45 -0500
  Re: Can somebody give me an advice about what to learn? rusi <rustompmody@gmail.com> - 2012-09-30 08:18 -0700
    Re: Can somebody give me an advice about what to learn? Roy Smith <roy@panix.com> - 2012-09-30 18:17 -0400
      Re: Can somebody give me an advice about what to learn? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-30 23:59 +0000
  Re: Can somebody give me an advice about what to learn? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-30 16:47 +0100
  Re: Can somebody give me an advice about what to learn? Wolfgang Keller <feliphil@gmx.net> - 2012-10-03 20:31 +0200
    Re: Can somebody give me an advice about what to learn? Chris Rebert <clp2@rebertia.com> - 2012-10-03 21:47 -0700
      Re: Can somebody give me an advice about what to learn? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-04 06:34 +0000
        Re: Can somebody give me an advice about what to learn? Wolfgang Keller <feliphil@gmx.net> - 2012-10-04 19:45 +0200

csiph-web