News for hackers. Stuff that matters.
Re:How to get C like performance in Java by jshen on Wednesday July 20, 2011 @12:12PM (#2786222)
"Most systems can handle 1K-10K threads efficiently. If you need more connections than that, buy another server, a cheap one cost about $500."

Shouldn't the title be, How to NOT get C like performance in Java ;)

Re:How to get C like performance in Java by wladimir on Thursday July 21, 2011 @05:42AM (#2788961)
I also found that particular sentence really strange. "How to get C-like performance in java? Buy more servers!". Yeah, sure, but that approach will work for any language. With async you could handle even more connections with that larger amount of servers...
Re:How to get C like performance in Java by pkl on Thursday July 21, 2011 @12:30PM (#2790142)
You can handle a much larger number of connections provided they don't do anything useful. However if you expect to do anything useful, you are likely to need some horizontal scalability once you have thousands of connections.

AdWords charge about $1 per click. Lets say your hardware budget is only $1 per connection. With 10K connections you still have enough money for 10 servers if you wanted.

Re:How to get C like performance in Java by jshen on Sunday July 24, 2011 @12:06AM (#2798592)
"You can handle a much larger number of connections provided they don't do anything useful."

Define useful? I think you mean, computationally complex, but that isn't the same thing as useful. At my last job I worked on a web crawler, and fetching a page, then persisting it in our grid, was useful work. It was useful to have more than 10k connections in that context.

One of my pet peeves is this idea of throwing servers at problems. We currently have enormous problems with power and heat dissipation in data centers. At my last job, where I did the web crawler, we couldn't put any more servers in our data center because we didn't have enough power. Doing more, with fewer servers can be very important.

I also wonder how much larger the carbon footprint of computing is because of such philosophies.

Re:How to get C like performance in Java by peter_lawrey on Thursday July 21, 2011 @04:28AM (#2788859)
I would be very interested if you could explain what you mean. ;)
Re:How to get C like performance in Java by jshen on Thursday July 21, 2011 @01:07PM (#2790286)
it's mostly a joke, but I think the author is ... making a bad argument.

C doesn't require you to buy another server to handle more than 10k concurrent connections. So that contradicts the title, right?

But, you can of course handle more than 10k concurrent on the jvm using the NIO stuff.

Re:How to get C like performance in Java by pkl on Friday July 22, 2011 @11:27AM (#2793897)
No business or web site which has 10K concurrent users will be using just one server. Scalability beyond 10K users/server doesn't buy you anything.
Re:How to get C like performance in Java by jshen on Friday July 22, 2011 @03:26PM (#2794850)
surely you jest
Re:How to get C like performance in Java by peter_lawrey on Saturday July 23, 2011 @04:57AM (#2796537)
In your experience, have you ever seen or heard of a business or web site with more than 10K concurrent users who thought it was a good idea to place all those users on just one server?
Re:How to get C like performance in Java by jshen on Saturday July 23, 2011 @04:52PM (#2797798)
connections and users are not the same thing. Accomplishing a task with fewer resources is better, so when you say " Scalability beyond 10K users/server doesn't buy you anything", you are wrong.

Imagine if you have a giant datacenter like google, and heat and power are a serious problem. Accomplishing a task with fewer servers is a serious win.

Re:How to get C like performance in Java by peter_lawrey on Monday July 25, 2011 @05:03AM (#2801876)
From a search I did suggest that Google have nowhere near 10K users per server. That is likely to be because the servers spend most of their time performing searches. The overhead of managing persistent connection is likely to be a small portion of what they do, like most real applications.
Re:How to get C like performance in Java by jshen on Monday July 25, 2011 @03:46PM (#2804276)
You seem to be implying that since, in this one use case, it's not useful, then it's not useful at all. That's a non sequitur. I already gave one concrete example of where it was useful in my past experiences.
Re:How to get C like performance in Java by peter_lawrey on Wednesday July 27, 2011 @05:09AM (#2811406)
Fair point.
Re:How to get C like performance in Java by jshen on Sunday July 24, 2011 @12:03AM (#2798583)
sorry, that quote wasn't from you, but I think the two of you are making the same point, which I disagree with.