[Stackless] Connecting To A Database

seun.osewa at gmail.com seun.osewa at gmail.com
Mon Jun 11 18:04:17 CEST 2007


Hello Guys,

I appreciate your excellent suggestions very much.

I decided to go with the built-in Sqlite database when I discovered
that a simple query on an indexed column takes about 1ms on my low-end
1.1Ghz Old Celeron Machine (2 times as fast as an identical MySQL
query, and even faster than Memcached).

I feel that what I lose in concurrency can be gained back by the
increased speed, and as long as I have enough RAM, my server never has
to block.  SQLite also uses much less memory and disk space, which
means more data can fit in memory.

I just need to break down long-running queries and operations into
little bits and call stackless.schedule() in between each bit. For
really slow operations like full text search, I will just use
something like lucene running in a different process on the same
server.

My plan is to run my webapp on multiple independent servers with this
configuration.  This way, I won't have to worry about clustering, or
distributed transactions.  People will be able to choose which server
they want to create their user accounts on, and my only goal will be
to squeeze out the maximum possible performance from each server.

Twisted's adabapi would have worked, but I find the framework too
complicated. The good news is that if more concurrency is needed, one
can easily switch to such frameworks.
-- 
Seun Osewa
http://www.nairaland.com [vast Nigerian forum]

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list