Thursday, January 27, 2011

Day 7 - bye bye buffers, hello variables

I moved out of the buffers/chains with the very serious conviction that when I will proof-read my translation I will throw it away and redo it.

So, I moved to next chapter: variables. At this point, it's not clear to me whether a variable is a thing that can be converted to/from a string or if this is even more generic than this : like a value holder for which you can specify a getter/setter (which could translate from/to string but also do something even niftier). It definitely includes a mechanism for caching (to avoid unnecessary calls to the getter, I assume) which can be activated or not based on the variable itself.

From reading the code, you can cache things like "nginx_version" (not really a surprise) but you cannot cache "request_method" (I would qualify this as half a surprise). Therefore I would tend to think that the caching mechanisms has only one level of granularity : the life of a process. It does not support caching for the lifetime of a query ("request_method" cannot change in the middle of a query processing). But then again, this is all pretty cloudy.

This thing is really a journey: the more I explore, the more I realize how little I understand this thing. But I still hope that at some point I will reach a mountain from which I can say "I get the whole picture". But for now, I'm in the middle of the jungle, trying not to be killed by wild beasts.

I should have mentioned it yesterday but forgot: I subscribed to the nginx users mailing lists. Definitely more traffic than on the development one but to be completely honest, there is not a big difference on the topics. The devel mailing-list does not have many discussions about the actual development of nginx.

No comments:

Post a Comment