Mental Leap

It seems that recently, many of my classes have touched upon threading or multi-processing in some way. After spending time programming in Erlang, where the creation on a process is very cheap, it’s interesting to see how strategies must be adapted in order to fit other threading paradigms (like pthreads). As part of the COSI server challenge (basically, spend an hour or so making a web server in the language of your choice), my Erlang submission merely spawns off a new process for each incoming connection. As I read further, I came across Apache’s MPM threading model and it made perfect sense: have a pool of threads waiting for incoming connections, then handle them as they come. This makes the server much more responsive as it does away with the need for spawning a new (very short lived) thread. Once I read this, it was as if I made a mental leap, and now I can see how simple and brilliant this is.

I guess to to conclude I just think that you should always be ready to make that leap and keep an open mind, just because it works, and you’ve done it forever, does not make it the best possible way.

Peace and chow,

Ranok

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.