[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] mysql client with libevent



>
> Crap, I just realized this is completely off topic - but my main point
> is to gather requirements, and make a determination if you're willing to
> risk flexibility for possible bumps in performance. Or just abstract the
> frakk out of your query API so that it can be swapped out transparently
> if needed (think DBI).
"possible bumps in performance" ?
No, you are underestimating the power of custom design.
For example, a blogging website that offers blog posts to its users
can use no database engine at all.
How come?
Easy:
The nature of the application is that the content is almost never deleted.
And for search, the Google is your index. Yeah, yeah, you heard it
right. Btrees ? You don't need them really. Of course, this is
exaggeration, but this is where the trend goes.
See, you can implement a super fast blogging website with just a home
made database functions using
fopen() fseek() fwrite() or fread(), fclose().
That's all.
New blog post ? You fseek at the end of file, write and close. How
many nanoseconds did you spend on this call? New comment to a blog
post?  fseek() , fwrite() , fclose(). To avoid dealing with variable
record types, you fix blogpost size and fix comment size, you set
MAX_COMMENTS2BLOGPOST constant and that's it. Not optimal ? Yes, but
fast. And disk space is getting cheaper every minute as we speak.
How much performance can you get with this simplification? You will
throw away, master-slave setup, SQL parsing, transaction management,
replication, and who knows who much functionality your application
will never use. I don't know, we could speak of about 50x  to 100x
speed up.
Want more speed? Throw away your magnetic HDDs, buy an SDD. It costs
5x more but the speed up will be 20x, pure gain.
If you want custom queries to get reports on how much blogs your site
has copy the data and recreate it in a SQL environment, but it will be
only for your needs, not for the user's needs.
So,  it is not just "possible bumps in performance", it is a real
issue. The NoSQL movement is motivated by gain of speed, and they will
achieve it.

Off topic? Yes, a bit.

Regards



-- 
==================================
The power of zero is infinite
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.