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


Groups > comp.lang.python > #63566

Re: Learning python networking

References <22d58d76-f2c2-4a1d-8049-3409ac4665d3@googlegroups.com> <CAPTjJmr-4HbCjqfDjTrjLzvoE4BYr6_OS=BBqRLFg4_BtV4iSw@mail.gmail.com> <CAGGBd_rVOwBT_h0-X72Mhve3DEBg1Qvo6s-PS-=8aKkRXonUKg@mail.gmail.com> <CAPTjJmonGBE2NuRprnJGEUm0tkqTiV=6ucJV9ABYftqtvNRNTQ@mail.gmail.com> <CAGGBd_r=kBisdS+NWFVsNSkqbmHZiwrx7cARUBN9wj_kYKRbGw@mail.gmail.com>
Date 2014-01-09 15:20 +1100
Subject Re: Learning python networking
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5233.1389241208.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Jan 9, 2014 at 2:49 PM, Dan Stromberg <drsalists@gmail.com> wrote:
> The third quote, from Brian Kernighan, seems to underestimate the
> complexity of asynchronous programming in the large - it's probably
> not just twice as hard.

Yeah, which is why I recommended a threaded approach to the OP. It
won't scale to millions of simultaneous connections... but he's
unlikely to have more than half a dozen in testing, and even in
production, most games aren't going to run more than a couple hundred
players. (A huge server might have more players than that
simultaneously logged in, but they'll be running different games. If
thread count becomes a problem, fork() to create a game, job done.)
Threads are easier to get your head around: this and that happen at
the same time. Sometimes it means creating lots of threads to do
similar things (one for the GUI, one for this socket, one for that
socket, one for the cron handler, etc, etc), but is that really a
problem? Probably not.

ChrisA

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


Thread

Learning python networking Paul Pittlerson <menkomigen6@gmail.com> - 2014-01-08 14:27 -0800
  Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-09 10:29 +1100
    Re: Learning python networking Paul Pittlerson <menkomigen6@gmail.com> - 2014-01-15 02:37 -0800
      Re: Learning python networking Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-15 11:11 +0000
      Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-15 23:52 +1100
      Re: Learning python networking "Frank Millman" <frank@chagford.com> - 2014-01-15 15:31 +0200
      Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-16 01:07 +1100
      Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-16 02:36 +1100
      Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-16 03:31 +1100
      Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-16 03:32 +1100
      Re: Learning python networking William Ray Wing <wrw@mac.com> - 2014-01-15 11:43 -0500
      Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-16 04:07 +1100
      Re: Learning python networking William Ray Wing <wrw@mac.com> - 2014-01-15 11:25 -0500
  Re: Learning python networking Dan Stromberg <drsalists@gmail.com> - 2014-01-08 15:53 -0800
  Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-09 11:07 +1100
  Re: Learning python networking Dan Stromberg <drsalists@gmail.com> - 2014-01-08 19:49 -0800
    Re: Learning python networking Alister <alister.ware@ntlworld.com> - 2014-01-09 11:32 +0000
  Re: Learning python networking Chris Angelico <rosuav@gmail.com> - 2014-01-09 15:20 +1100

csiph-web