Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'url:pypi': 0.03; 'argument': 0.05; '[1]:': 0.09; 'bits': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'burak': 0.16; 'cleaner': 0.16; 'concurrent': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'massively': 0.16; 'missing?': 0.16; 'objection': 0.16; 'twisted': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'coding': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'query': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'database,': 0.30; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'purely': 0.31; 'quite': 0.32; 'url:python': 0.33; 'running': 0.33; "can't": 0.35; 'except': 0.35; 'done.': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'handle': 0.38; 'pm,': 0.38; 'happen': 0.63; 'million': 0.74; 'asynchronous': 0.84; 'production,': 0.84; 'to:none': 0.92; 'hundred': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=zQLSBjvdldtKJ8SupHsKpetxETHy/zXIwkLcVPeTPsY=; b=m4pb01oh2KL37l19Z/f5M1qyMRajxwTTNh89P8gTIGMkArwrUjvnMeoJYSSwgtNDwt D1i9zvOz/R8jawunvvqunazb8yigoqZiZMLj9tLGKVZnSQYaqm1HWzFZzQm1nxXreKcJ ZMZSq5VzFz9GhhlaEIENnPyorHKGBB2XglrSlhEvaT3zFek0ri56sxQ+bRV876/u6i+5 RzMu2eEQ5Jbr9OLRCFbS0Y+FMer2eba1EpA36kSYqp9j5pOMagVym4m4JfXpxxOnQfqG uHwSCT6sr9H/KGfuiSuRuMuZlk8jOmV5fVeXiMMTFhdo+duMHAUlYBgbcpBrzQS4jNqX XCcg== MIME-Version: 1.0 X-Received: by 10.220.160.67 with SMTP id m3mr901355vcx.56.1401796675921; Tue, 03 Jun 2014 04:57:55 -0700 (PDT) In-Reply-To: <538DABE0.1070902@arskom.com.tr> References: <874n03t5t9.fsf@elektro.pacujo.net> <7x4n03dor0.fsf@ruckus.brouhaha.com> <878upe8poc.fsf@elektro.pacujo.net> <87wqcyuznv.fsf@elektro.pacujo.net> <538DABE0.1070902@arskom.com.tr> Date: Tue, 3 Jun 2014 21:57:55 +1000 Subject: Re: Benefits of asyncio From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401796684 news.xs4all.nl 2893 [2001:888:2000:d::a6]:59938 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72509 On Tue, Jun 3, 2014 at 9:05 PM, Burak Arslan wrote: > On 06/03/14 12:30, Chris Angelico wrote: >> Write me a purely nonblocking >> web site concept that can handle a million concurrent connections, >> where each one requires one query against the database, and one in a >> hundred of them require five queries which happen atomically. > > > I don't see why that can't be done. Twisted has everyting I can think of > except database bits (adb runs on threads), and I got txpostgres[1] > running in production, it seems quite robust so far. what else are we > missing? > > [1]: https://pypi.python.org/pypi/txpostgres I never said it can't be done. My objection was to Marko's reiterated statement that asynchronous coding is somehow massively cleaner than threading; my argument is that threading is often significantly cleaner than async, and that at worst, they're about the same (because they're dealing with exactly the same problems). ChrisA