On Thu, 28 Jan 2010 14:56:05 -0800 (PST) Francis Lavoie <lav.fran...@gmail.com> wrote:
> I found that blog post that make a comparison between python and > clojure. > http://www.bestinclass.dk/index.php/2009/10/python-vs-clojure-evolving/ Note that the author has several of his facts wrong about Python, and looks at non-Pythonic python. Read the sequel to correct the latter. The one point he is right on is that Python pretty much sucks when it comes to threading. The best available high-level tool is the queue library, which is just CSP in different clothing. Worse, the interpreter doesn't multi-thread, so only one thread can be in the interpreter at a time. The Pythonic view is that threading is generally bad idea, because trying to do concurrent programming with locks is like trying to do construction work with a toothpick. You're better off using processes and IPC, so you avoid all the issues surrounding locking. I've found that this works fairly well in practice - at least when your problems are to big to fit on a single system. I've rebuilt thread-based Python systems to use processes, and gotten better performance along the way. Clojure avoid those problems by providing better tools. Which is why I keep trying to find time to do some work in clojure. Except that, well, you really *don't* avoid the problems of locking; you just move them to a different place. I.e. - if one process is producing a file, and one or more other processes are waiting to consume it, and possibly a few more are waiting to reuse the input data for that process - how do you synchronize them? Answer: locks. Which brings me to my question: how does clojure deal with concurrency at the inter-process level? At the inter-system level? Are their distributed versions of refs & atoms and the like available somewhere? I know it works really well working with hadoop and the like - but what about if I wanted to build hadoop in clojure? thank <mike -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en