They'll Need a Crane
How to scale your huge application
Sometimes forgotten in discussions of the scalability of applications is what the application developer brings to the table. We hear a lot about whether certain languages or app servers scale up to enterprise class, and frankly, these conversations sound a lot like performance bickering at the smaller scale. And the reason to make that analogy is that time and again, coding practices are massively underestimated as a means of improving performance. Want to run faster? Don't do stupid things like while (...) { myString = myString + anotherString } when there are more performant alternatives (StringBuffer in this pathological example). Similarly, the way you write your program has a lot to do with how it will scale.
Imagine you're performing a series of tasks for each request, and that you process hundreds or even thousands of requests each second. If you have a synchronous path through the steps required to service each request, then you're probably going to tie up one thread for each request, start to finish. Anytime any of these steps requires contending for resources or waiting for something on the network, like db query results, the thread will sit there, not doing anything. If there's a request getting rejected for lack of available threads in the pool, well, too bad for him or her.
Now imagine a more asynchronous approach: when you need to wait for something, use a messaging model and relinquish control. While one task waits for its data, another can get some CPU time. It's not the easiest thing to imagine if you don't already think multithreaded, but in the big picture -- and scalability is all about big pictures -- it increases the overall load your app can handle and improves the handling of requests.
This, roughly, is the "detach" step in Binildas C. A.'s Distribute, Detach, and Parallelize in Tomcat, which is today's Feature Article. In it, he introduces key strategies and a reference architecture for applications that will scale better. "For scaled-out deployments, we need to be careful to co-ordinate and synchronize shared resource access. Not all applications can be designed in a detached fashion, but wherever possible, this design proves to be a strong alternative to synchronous, real-time processing. Understanding the requirements and planning for a scalable architecture is an indispensable step for the success of scalable deployments."
In Projects and Communities, responding to feedback from many places, the jdk-distros project has announced a new version of the "FAQ for the Operating System Distributor License for Java (DLJ)". Version 1.2 of the DLJ FAQ is an effort to incorporate feedback and clarify the intent of the DLJ, specifically rewriting the preamble to clarify the relationship between the FAQ and the license.
The Mac Java Community notes that Apple has updated 15 QuickTime for Java code samples. The samples have been updated to work with XCode 2 and have a project layout better suited for platform-independent distribution and compilation. The updates fix basic playback samples and more advanced topics such as callbacks and capture.
In today's Forums,
cowwoc fires off some frustration in
RFE for Dolphin: Fix Generics!
"PLEASE simplify Generics! I'd like to humbly suggest that one of Dolphin's major RFEs will be to clean up Generics so that they are easier to use, more readable and more flexible (express more complex restrictions). If I had a choice between 'language support for XML' versus cleaning up Generics I'd vote for the ladder, hands down. Do the rest of you agree? disagree?"
twalljava wonders
Why no property change on setCursor?
"Anyone know why there isn't a Component property change fired when setCursor is called? Just an oversight? I have one component overlaying another one visually as a decoration, and I'd like its cursor to match. Overriding getCursor to delegate to the underlying component's getCursor works, but it would seem a better approach if I were able to listen for cursor changes as a property (since most cursor handling happens on the peer, there's no guarantee that changes on the underlying component's cursor will be seen by the overlay component)."
Swing topics dominate today's Weblogs. Tim Boudreau starts off by introducing A Single-Mouse-Gesture Color Chooser for Swing: "Ever needed a faster, slicker way to let your users select a color in Swing? I just set up a new java.net project, which produces just such a widget. Press the mouse and a palette pops up; drag over the palette and release when the color is right; use combinations of ctrl/alt/shift to switch palettes."
Ethan Nicholas cuts through control- and command-key madness in Mnemonic Magic: "While developing a Swing application, I found Swing's mnemonic system to be too simplistic. Take a look at what I did to improve it, and where we can go from here."
Funny man Chet Haase is back with the Swing humor in Two Items Walk Back into a Toolbar: "What's better than a Swing joke? How about a sequel to a Swing joke?"
In Also in Java Today, Lance Finney's Units and Measures with JScience takes a look at the JScience library. "Developing units systems for scientific, engineering, and mathematical applications is difficult, tedious, and error-prone. Fortunately, JScience provides a comprehensive, well-tested, and standard way for Java developers to support scientific, mathematical, and economic units. The JScience API uses generics to provide type-safety, and the core of JScience is under consideration for future [inclusion] in Java SE. If you are requested to add units-based functionality to your application, and you have considered rolling your own, you owe yourself to investigate JScience."
Harold Carr introduces Sun's Project Tango in an SDN article. "Sun's Java Web Services engineers are working with Microsoft's Windows Communication Foundation (WCF) engineers to ensure interoperability of enterprise features, such as security, reliable messaging, and atomic transactions. At Sun, we call this work 'Project Tango' and like to think of Duke doing the dance. This is accomplished by implementing a number of WS-* specifications and holding plugfests where Sun and Microsoft engineers work face-to-face testing our implementations of those specifications."
In today's java.net News Headlines :
- Redhat Dropping RHAS (JOnAS)
- Jaikoz Audio Tagger 1.2.0
- Subversive 1.0.0 RC2
- JMagallanes 1.0
- Jameleon 3.2.2
- Bonita v2 RC
- Super 9.0
- Lint4j 0.9.9
Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.
Current and upcoming Java Events :
- June 5-6, 2006 - Enterprise Open Source Conference
- June 9-11, 2006 - Research Triangle Software Symposium
- June 15, 2006 - NL-JUG: J-Spring
- June 16-17, 2006 - Salt Lake Software Symposium
- June 20-23, 2006 - Enterprise Java Architecture Workshop Seattle
- July 6, 2006 - Java Forum Stuttgart (JFS)
- July 7, 2006 - Experten Forum Stuttgart
- July 7-9, 2006 - Lone Star Software Symposium 2006: Austin Edition
- July 21-23, 2006 - Central Iowa Software Symposium 2006
- July 24-28, 2006 - O'Reilly Open Source Convention 2006
- July 28-30, 2006 - Desert Southwest Software Symposium 2006
Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.
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 java.net it will be archived along with other past issues in the java.net Archive.
How to scale your huge application
- Login or register to post comments
- Printer-friendly version
- editor's blog
- 393 reads





