Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Frank Millman" Newsgroups: comp.lang.python Subject: Re: asyncio - run coroutine in the background Date: Tue, 16 Feb 2016 17:45:00 +0200 Lines: 38 Message-ID: References: <8737sumpjl.fsf@elektro.pacujo.net> <87h9ha8lt0.fsf@jester.gateway.pace.com> <87d1rwpwo2.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de q/0AhPPNobWJobQWz9lSNgBes9czoBCCgxat4F6gmx3Q== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(using': 0.07; 'postgresql': 0.07; '"but': 0.09; 'percentage': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'wed,': 0.15; '2016': 0.16; 'ground,': 0.16; 'massively': 0.16; 'processes.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'skip:n 70': 0.16; 'sqlite3': 0.16; 'subject:run': 0.16; 'threads': 0.16; 'wrote:': 0.16; 'app': 0.16; '"you': 0.18; 'else,': 0.18; ';-)': 0.18; 'purposes': 0.20; 'am,': 0.23; 'seems': 0.23; 'feb': 0.23; 'wrote': 0.23; 'demonstrate': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'switch': 0.27; 'far,': 0.29; 'issues.': 0.29; 'asked': 0.29; 'code': 0.30; 'ideal': 0.32; 'options': 0.33; 'server': 0.34; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'agree': 0.37; 'there,': 0.37; 'received:org': 0.37; 'thought': 0.37; 'subject:the': 0.39; 'system.': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'ever': 0.60; 'more': 0.63; 'market': 0.63; 'worth': 0.67; 'frank': 0.72; 'businesses': 0.77; 'divergent': 0.84; 'start.': 0.84; 'cutting': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 197.89.68.71 In-Reply-To: X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3502.922 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3502.922 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103016 "Chris Angelico" wrote in message news:CAPTjJmqMiE4gROqNYVHwAhCn2mWQeYQxt5KvFivotrHQY-sNdw@mail.gmail.com... > > On Wed, Feb 17, 2016 at 2:21 AM, Frank Millman wrote: > > I would love to drive the database asynchronously, but of the three > > databases I use, only psycopg2 seems to have asyncio support. As my > > home-grown solution (using queues) seems to be working well so far, I am > > sticking with that until I start to experience responsiveness issues. If > > that happens, my first line of attack will be to switch from threads to > > processes. > > And this is where we demonstrate divergent thought processes. *My* > first line of attack if hybrid async/thread doesn't work would be to > mandate a PostgreSQL backend, not to switch to hybrid async/process :) > Is the added value of "you get three options of database back-end" > worth the added cost of "but now my code is massively more complex"? Then we will have to agree to diverge ;-) If I ever get my app off the ground, it will be an all-purpose, multi-company, multi-currency, multi-everything accounting/business system. There is a massive market out there, and a large percentage of that is Microsoft-only shops. I have no intention of cutting myself off from that market before I even start. I am very happy with my choice of 3 databases - 1. sqlite3 - ideal for demo purposes and for one-man businesses 2. Sql Server for those that insist on it 3. PostgreSQL for every one else, and my recommendation if asked Frank