On 19 dec, 01:20, Patrick Kristiansen <patrick.kristian...@gmail.com> wrote: > Thanks for your suggestion. It's an interesting idea, and we've been > considering something along those lines. I don't know if Erlang's > processes are even more lightweight than "green threads". According to > Wikipedia [1], Linux actually performs really well in terms of context > switching OS threads compared to green threads. But I can't find the > paper Wikipedia cites, and it seems not to be downloadable from ACM > [2].
The problem seems to be two part: 1. Starting new "native thread" takes a relatively long time 2. Native threads means a fairly significant memory and scheduler consumption. In Java-based threads, that means for example that a 20,000 connection server is pretty much the maximum that's possible in that model. In Erland, 20,000 concurrent connections is what you should expect from an unoptimized system. This is at least partly due to kernel design, but also due to language design. A purely side- effect free language is much more capable of sharing data. In *that* regard, it's probably easier to optimize Erlang than Clojure. But in any case, massive networking is the key - In clojure, there is plenty of room to improve in that regard. In Erlang probably too, but erlang has no really interesing memory sharing mechanisms. -- 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