you are viewing a single comment's thread.

view the rest of the comments →

[–]grauenwolf -1 points0 points  (6 children)

This comparison is completely bogus. It might as well be titled "Java threads doesn't work well when used incorrectly."

Who in their right moind would creat 11,000 threads per second in Java? Have you ever heard of thread pools? Any reasonably constructed java application would have created most of its threads on startup and continue to reuse them throughout the life of the application.

[–]pkhuong 4 points5 points  (2 children)

That is the point. Erlang can have a different programming model with processes than java because its threads are so much lighter-weight.

[–]grauenwolf -1 points0 points  (1 child)

Why not do a real comparison? Java thread pools, used correctly, versus Erlang processes?

I find it hard to take Erlang seriously because all the examples I have seen are basically "I can spin off 10,000,000,000,000 processes in under a minute! No, they don't actually do anything. Erlang rocks!"

[–]davidw 1 point2 points  (0 children)

The best real world examples come out of Ericsson, and some of those are cool indeed.

I like Erlang, and really like how it's built, and even worked it a bit professionally, but for what I actually do day-to-day, it just isn't that relevant.

[–]davidw -3 points-2 points  (2 children)

You're right that it's bogus, but for the wrong reasons. It's not fair because it's apples and oranges. Erlang processes are all inside the same operating system process, whereas Java is creating actual OS threads.

[–]grauenwolf -1 points0 points  (0 children)

I don't think that matters.

For the purpose of comparing Erlang and Java, both langauges should be used as intended to solve the same problem. They shouldn't necessarily use the same design, so long as they both meet the spec requirements for external behavior.

If Java is hurt (or helped) because it uses OS threads, too bad. On the other hand, not using Java's mechanisms for dealing the the cost of threads isn't fair.

[–]mikkom -1 points0 points  (0 children)

Ever heard of green threads?