Friday, October 5, 2007

Tumor On Dog's Tongue

cache and Other Stories About

been reading an article by Ricardo Galli on Twitter , scalability and various other things, and hopefully not disturb what I mean, all that has interested me are the comments.

In these, Galli, demimismo , RVR Alvaro and held an exchange of ideas on whether it is better PHP or RoR , if the cache here or databases master-slave over there and more.

I'm not an expert on these things and give them to me even less so, but I go into some doubt about some things to say.

menéame Galli says it only uses a server and does not need cache ... eehhhh ... Oyeee ... it might be true. I hope that a single web server refers to, because they think it's one for the web and BD together. I have not seen menéame code, but a pal that he has given himself for that (I think for penance for something), I said it was a bit chaotic, and chaos is usually no friend of Mr. performance, but good not doubt the code.

What impresses me most is that he says before he puts it to use cache servers do not know what a thousand bundles of BD (I can not remember and happened to read me again all that to look). To me the comment I find amazing is like saying that if you go wrong with your wife, because you looking for a lover to the bad times with her passes. No, man, go to a therapist and to fix your marriage ... Same thing, instead of putting a machine again, make the code, sure that the code can be optimized and add cache to not pull both PHP, RoR or whatever you use for programming. Indeed, the BD do not ever put him or improve query rates, total, you stick a master-slave db, master-master, active-active or illegal workshop slaves seeking data and send them to hair.

Another thing that has left me a little fly is the desire of some to relate optimal code with fewer lines of code. The number of lines code has little to do with how good the code, especially as certain that in those 10 lines of code calls a function that can be yours fatally implemented (not saying that it is, but it may be the case .) I remember when the news broke that someone had been able to crack a DVD with 7 lines of code, the subject is never mentioned that the developer had broken the ENTER key.

Following the conversation, otherwise I do not understand is the issue of using frameworks. Using a framework does not have anything bad, bad is to use a suboptimal framework. It is clear that either the framework is very good, or if you can do many things that the application is not everything in the world optimum. But let's face it, we all use a "framework" either we or the BD layer that offers CodeIgniter (I like this framework), but ultimately we all use libraries to do things. Which is developed from scratch does not mean anything at all, except that it has developed a good programmer.

After reading this post I began to read a presentation on architecture shaker that is quite interesting, but one thing I do not understand, say, "if the user is logged: the lighttpd serves the static page , and fill Ajax cacheable content is not (much lighter than request serving a full-page dispatch, even if the cache). "My question is this, if a page is dynamic has several areas that are loaded with Ajax, this implies that several HTTP requests made and will make several queries to BD. "In truth this is more optimal to have a page divided into part cacheable and dynamic part which combines the two types of content on a page?, because I have no idea, but at first glance it seems to me most optimal use cache for cacheable parts and add the dynamic part, besides being able to optimize queries to BD if done in a single run. People