[vworld-tech] Re: Database usage
bruce at cubik.org
Sat Feb 14 10:49:08 PST 2004
Brian Hook wrote:
> Right now my reads are blocking because, well, it's easier. I'm
> assuming this isn't going to scale well, but my instinct right now is
> that doing non-blocking queries is going to be...gross. I'm hoping
> that caching will offset a large part of this potential performance
> hit, but if I invalidate the cache en masse for some reason, I don't
> want the entire world to stall for 30 seconds as everything is pulled
> back in.
> Does anyone here block on DB reads successfully?
No, at work, we use non-blocking DB access and our code is written
manually in continuation-passing style.
Given that our database code can sometimes take seconds to execute
depending on whether or not it has to hit our big table with several
million rows in it .. we have no choice. Blocking DB stuff just doesn't
work and doesn't scale. (That said, most of our queries are well under
Life would be significantly better though if the framework that we were
using supported a meta-level mechanism that would translate code into
CPS rather than requiring that we write it that way. (This is our
Python code, our C++ code uses a different technique due to having some
differing requirements, goals, and implementation abilities.)
More information about the vworld-tech