Skip to main content

Get Rhythm

Posted by editor on February 13, 2007 at 7:58 AM PST

The back-and-forth of high-performance servers

If you're working with the low-level I/O of a server, it's pretty much a no-brainer that performance concerns will probably compel you to use the NIO package, introduced in Java 1.4. But once you've made that choice, do the rest of the pieces fall into place easily? Hardly. You also have significant threading issues to consider. It's easy enough to dispatch each request to its own thread, but this ends up not scaling particularly well.

In our Feature Article,

Architecture of a Highly Scalable NIO-Based Server , Gregor Roth argues for a different architecture, one which responds to events (such as requests) and employs a thread pool to do the non-blocking IO work needed for each request.

An event-driven non-blocking architecture is a fundamental layer to implement highly efficient, scalable, and reliable servers. The challenge is to minimize the thread synchronization overhead and to optimize the connection/buffer management. This will be the hardest part to program.

Of course, easier said than done. Check out the article for both the ideas behind the architecture, and links to servlet frameworks that already implement this approach for you.

In Java Today,
the ROME project offers a popular set of parsers and generators for various RSS and Atom syndication formats, and the wiki page Products or sites powered by ROME reveals just how widespread its use is. Take a look and see how many major sites you recognize. The page also offers a set of "Powered By ROME" badges to put on your site.

Jiri Sedlacek's article Uncovering Memory Leaks Using NetBeans Profiler discusses memory management in Java, how it can go wrong, and how NetBeans can help you fix it. "This article will cover [a] scenario when there are many small objects that are continuously accumulating without being released. This type of leak can be more difficult to detect because typically it's not related to any concrete action and doesn't use a noticeable amount of memory until the program has run for a long time. This scenario is dangerous especially with Java EE applications that are expected to run for long periods of time. After some time the leak starts to consume memory and may slow down performance of the application or cause an OutOfMemoryError crash without any visible cause."

Google blogger Steve Yegge is getting a lot of notice with a new blog that tries to predict the traits of The Next Big Language. "People are still always trying to make new languages, because we have yet to see a language that is (a) popular and (b) doesn't suck. Do you disagree? If so, I don't mind. It just means your standards aren't as high as mine. Nothing wrong with that."

Jacob Hookom discusses The Failure of Web-Based ASP Business Models in today's Weblogs. "Application Service Providers have migrated to the web in an attempt to provide quick channels of distribution; but more accessible web-based applications doesn't translate well for customer integration."

Kirill Grouchnikov has a preview of how the next version of Substance will be
Bringing life to your (j)sliders
One of the more interesting suggestions on the entries about translucent scroll bars came from Mikael Grev: an interesting addition would be if the scroll bars would be very thin or in some other way very subtle and only when the mouse is close/over they would animate to their full size.

Finally, in Hudson became self-executable, Kohsuke Kawaguchi writes:
"Hudson's installation just got even easier, thanks to the idea by Tim Shadel."

In today's Forums,
skipoles catches a Vista-specific problem in
Re: Windows Vista and mouse wheel problems in Java?:
"Ok, got it. Using Winspector to look at the VM_MOUSEWHEEL message shows that the Microsoft Cordless Mouse is using a zDelta of 30 (or -30) as opposed to the 120 (or -120) being used by all my other mice. Looking at the Microsoft documentation they state that 120 was selected as the original zDelta to allow them to add more fine-grained scrolling increments in the future (which it appears they have done). Looks like there is therefore a JDK issue in handling the WM_MOUSEWHEEL as the code is assuming constants of 120 or -120 whereas it should be just checking for positive or negative for the wheel rotation and the magnitude of the number used to indicate the scroll amount. I'm raising a bug against the JVM for this."

Witold Szczerba thinks there might be a Toplink-specific GlassFish problem, in
Toplink Essentials or Glassfish - looks like memory leaks:
"I don't know what's wrong, but everything indicates that there is some problem with either ToplinkEssentials or Glassfish. In my case, when I am persisting large amount of data, few/several thousands entities using merge or persist, Glassfish takes more and more memory and finally it runs out of resources crashing at the end with OutOfMemoryException. After switching from Toplink to Hibernate it worked very well, I mean I can persist as many entities as I want and Glassfish keeps memory on low level. However I would like to stay with TopLink as (1) it's already integrated with Glassfish and (2) NetBeans includes pre-configured libraries for it as well, which gives me much more time to focus on application instead of server configuration..."

Finally, kinnison is looking for developers interested in joining a
Guitar Effect Processor project:
"I want to get some people involved in this project. This consists in develop a system that reads a stream(live) from the line input of sound card, processes some effects like overdrive, chorus, wah-wah, and out this to output of sound card... I have some ideas, i wanna discuss with someone that is interesed in this project."

Current and upcoming Java

Registered users can submit event listings for the href=""> Events Page using our href="">events submission form.
All submissions go through an editorial review before being posted to the

Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of it will be
archived along with other past issues in the href=""> Archive.

The back-and-forth of high-performance servers