Threading vs. event-driven
A comrade in arms on the event-driven vs. threaded debate has switched sides and is now a threading advocate. He's been having doubts for awhile but was finally convinced by an article about threaded vs. event-driven approaches in Java. I'm not so sure, though it's clear that some of the long-standing reasons that threaded approaches were bad are starting to go away.
My main complaint about threads is that the concurrency model they represent is too hard for most people to use and requires way more discipline than the average programmer seems capable of.
My secondary complaint is basically that they introduce latency. Every synchronization operation represents a piece of data that has to be communicated between threads. I wrote a long pondering article about threads and latency awhile ago.
One thing I've noticed is that reads are usually much more frequent than updates. This makes things like memcached a good idea. I think of memcached as essentially being NUMA without hardware support.
I think it's clear though that some level of threading is a good idea nowadays.
One interesting thing that Java has done that I think is an overall useful concept is making some data structures immutable so that no locking operations are required to access them. Python does this too.
This is going to require some thinking.
Syndicated 2008-05-17 03:05:44 (Updated 2008-05-17 03:11:41) from Lover of Ideas
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!