asyncio - run coroutine in the background
frank at chagford.com
Tue Feb 16 10:45:00 EST 2016
"Chris Angelico" wrote in message
news:CAPTjJmqMiE4gROqNYVHwAhCn2mWQeYQxt5KvFivotrHQY-sNdw at mail.gmail.com...
> On Wed, Feb 17, 2016 at 2:21 AM, Frank Millman <frank at chagford.com> 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
More information about the Python-list