On Thu, Oct 12, 2006 at 05:19:24PM +0200, Artur Grabowski wrote: > Girish Venkatachalam <[EMAIL PROTECTED]> writes: > > > > Like many things in computing it just depends on what one is most > > > comfortable with and using the right tool for the right job. One time > > > that is events, the other time that is threads... > > > > > > Greets, > > > Jeroen > > > > > Disagreed. Your points are either not valid enough or not clear > > enough for me. > > Try to see past your dogmatism.
I must be dogmatic since the whole world is talking of threads and I dont like them. I am dogmatic since nobody in my friend's circle use OpenBSD and I love it. > > > Can you please give me anecdotes to support your viewpoint? > > I'm right now optimizing a real-life application - a search engine, > that uses threads because it has to properly run on multiple cpus and > use a couple of GB memory that needs to be shared among the threads. 1 GB can be shared in several different ways. Heard of UNIX domain sockets? You dont need any synchronization primitives or locking if you know how to use it. Or socketpair()? > > Did I mention that all our servers run Linux out of practical reasons? > (even the firewalls, we don't want to waste time and brains to maintain > different operating systems, we have enough work to do without wasting > time on religion). > > > Now, don't tell me it is bcoz OpenBSD does not have proper threading > > support. I won't buy that argument. > > I could never run our search engine on OpenBSD because OpenBSD doesn't > have proper threads. The SMP support is not really a huge problem > because most of the time is spent in userland, but without proper > threads the search engine would be too slow or require too many > machines - too expensive. (The SMP support wouldn't allow us to run > our apache front ends, squids and databases but that's another story). > > > Most of the beautiful UNIX programs that give remarkable performance > > are all either single process or multi process, not multithreaded. > > > > Apache 1.3.x? What about the pre forking model? > > Pre-forked apache is slow crap. Threaded apache is faster crap. With > pre-forked apache, we couldn't fit our front end machines in the racks > we have. And we would have to spend much more money buying machines, > rack space, cooling, power, maintenance, etc. to do the same job if we > for some dogmatic reasons decided against threads. > > > If you are interested in stability and maintainability of your code, > > dont touch threads with a ten foot bargepole.... > > If you don't know how to write code, don't touch tools that you don't > know how to use. If you know how to use the tools, you use the right > tool for the right job. If you don't believe that threads have their > uses, you haven't done enough interesting things in your life yet, I > wish you luck gaining experience in the future. > > //art I told you right at the outset that things would get emotional. No, no not to say that you are that. Just that this debate is something like emacs vs vi thing... Anyway I appreciate your viewpoints and insights. As to the interesting things one can do with threading, well I can miss that, no problem. I never said that threads don't have their uses. Sorry if I gave that impression. I only meant that for most applications for which people naturally lean towards multi threading are better solved without threads. I am sure threads have their own niche. Just like Windoze has itw own niche and purpose. Wish you all the best! Maybe one day I will realize that value of your inputs. Your point has registered in my brain for the time being. Best, Girish