Posted by editor
on June 25, 2009 at 6:00 AM PDT
Harold Carr attended Alois Reitbauer's session "Why applications do not scale" at Jazoon09... Also:
Java Today: Notes from Tuesday morning Jazoon; Javali 2009 Trip Report; and Wine delivered at OSGi DevCon.
Weblogs: Help me shape future of Java libraries; Installing Sonar on a linux build server; and The Ultimate Craftsman.
Forums: how to go to next lines in a label; How to build JTDS JDBC driver; and Deriving components breaks ActionListener?.
Featured Articles: Exposing Domain Models through the RESTful Service Interface, Part 1; Hacking JavaFX Binding.
Featured Podcast: Java Mobility Podcast 81: JTDF.
Harold Carr attended Alois Reitbauer 's session "Why applications do not scale" at Jazoon09 , and posted detailed notes in his blog. If you haven't done much work with scaling systems, some of the points Alois made might surprise you. For example:
Scalability does not improve performance
- Increases complexity and degrades performance
- Slower in single user mode
- performance is still an issue
How can this be? Well, to understand this, you have to think about the difference between performance and throughput. Performance is actually a measure of throughput per unit something. Say you have a computer and you have a process that receives some kind of input and produces some kind of output. You could define your performance as being the amount of output data that is produced by that single machine in an hour. So:
Performance = OutputDataBytes per Hour
Now, let's say your application is a success, and more customers want to send you input data and receive your output data products. You're sufficiently successful that your one machine cannot process all the input data requests. What do you need to do? You need to scale your application.
"Easy!" you say. "I'll buy another computer!" Fine, so now you have two computers. But there are some problems:
- how are you going to determine which computer receives which input requests?
- what if you receive only a single giant request? How do you split that single request between your two computers? And if you're able to do this, how do you repackage the output into a single entity to send it back to the requestor?
Well, the answer is: you have to add new software to your application, overhead software that makes these assessments and performs these kind of tasks. Suddenly, your application has grown in size and complexity. So, is a bigger, more complex application, that performs more processing on the same amount of incoming data, going to have better performance or worse performance than a simpler application? Clearly, performance is worse in the bigger, more complex app, right?
And here's where our original definition of performance was incorrect. Performance is really the amount of throughput that a single node produces per unit time:
Performance = OutputDataBytes per Node per Hour
As soon as you introduce a second node and add overhead software to manage and coordinate the processing performed by each node, your performance drops, because you are doing more work per unit of output data.
So, if performance decreases, then why scale? Because even if your performance is reduced by 10%, your throughput can be increased. Your throughput, in our example, can be defined as the total amount of output data your entire system produces:
Throughtput = Total OutputDataBytes
So, here's the theoretical relationship between performance and throughput for an unscaled application running on one computer and a scaled application running on multiple computers:
Ah, but if only the real world was as simple as this! Because, in fact, as you add successively more machines, your overhead processing that scales your application inevitably begins to bump up against bottlenecks of various kinds. The greater the number of nodes, the lower your performance factor. Take a look at the "Limiting factors" section in Harold's notes .
A more realistic table might look like this:
In the bottom row, you've multiplied your number of machines by a factor of 10, but your throughput has increased only by a factor of 7. The "law of diminishing returns" has kicked in.
It looks like "Why applications do not scale" was a very interesting and enlightening session. You can learn a lot (or be re-reminded of a lot) just by reading Harold's notes . I'm glad he chose to document his Jazoon sessions so thoroughly!
In Java Today , Harold Carr sends us his Notes from Tuesday morning Jazoon : "Here are my notes from the Tuesday morning at jazoon.com ..."
Arun Gupta presents his Javali 2009 Trip Report : "I, along with several other speakers, presented at
href="http://javali.org.br/">Javali (an ancillary event of FISL ) earlier today. The event was sponsored by Sun Microsystems. Many thanks to
href="http://www.soujava.org.br/display/v/Inicial">Sou Java and RS JUG for organizing the event and thanks to Serpro for
hosting the event..."
Fabrizio Giudici reports about Wine delivered at OSGi DevCon : "Well, so I'm at OSGi DevCon Europe (the only day I'm being in Zurich). One of the missions I had to accomplish is to deliver some fine italian wine to Felipe Gaucho , for thanking him as he's hosting some CPU-intensive Hudson jobs for blueMarine)...
In today's Weblogs , Jaroslav Tulach asks people to Help me shape future of Java libraries : "For a week I am teasing myself with a little puzzle: how to split rt.jar into smaller pieces that could be compiled, downloaded and executed separatelly."
John Ferguson Smart writes about Installing Sonar on a linux build server : "Anyone who has read many of my blog entries or articles will know that I'm a great fan of code quality metrics. By code quality metrics, I am referring to coding standards, best practices, complexity, but also to other..."
And Amy Fowler posted The Ultimate Craftsman : "Absolutely nothing about Java or JavaFX here. Just a small tribute to my pop for leading me down a path to geekdom. Some of us are just driven to create; we arn't happy unless we are making something - houses, software, furniture, blogs, chocolate cake. Turns out that software engineering is a pretty good gig for such a person..."
In the Forums ,
elaltaico wonders how to go to next lines in a label : "Hello. I am using J2ME LWUIT to design my application. I take data from web server and display it on screen. I can do it without any problem. Unfortunately when the text is so long, I want Label to go to next line. But it writes all the text at same line.Then the user needs to wait the line to stop to read whole Label. Could you please tell me a way for user to go to next line when the text is long enough ? ..."
asks How to build JTDS JDBC driver
: "Hi, if anyone can help me with JTDS, I'd really appreciate it. I am new to JTDS and am having trouble compiling the source to build the JDBC driver. I am trying to modify the source code somewhat to enhance JTDS functionality for my application. First I'm trying to compile the basic source code to build the basic JDBC driver. I am testing on my laptop using a trial version of MS SQL Server 2008. I've downloaded and unzipped jtds-1.2.2-src.zip (from sourceforge.net) and created the JAVA_HOME variable to point to C:\Program Files\Java\jdk1.6.0_13 on my machine. Then I go to... "
a_schroeder has an issue where Deriving components breaks ActionListener? : "Hello All, I've encountered a problem with ActionListener that has me scratching my head: I'm deriving from Form since I want to keep some of the data operations inside the Form (I'm currently porting an older project using J2ME to LWUIT, the data-crunching in the background is a bit...errm...hairy so I'd like to touch it as little as possible). The problem is: When I create an ActionListener for my derived class and use setCommandListener on an instance of the class, the ActionListener is never triggered when I press the softkeys. It doesn't matter if I have my derived class implement ActionListener itself, or pass an external ActionListener obejct (like for instance having the main application implement the ActionListener and passing it to the instance of my derived class)... "
The current Spotlight is the final installment of Janice J. Heiss's "Developer Insight Series" Part 4: Favorite and Funny Code : "Over the years I've heard noted developers talk about their favorite code, funniest code, most beautiful code, how to write code, how not to write code, the obstacles to writing good code, what they love and hate about writing code, and so on. In the process, I've encountered a lot of insight that is worth preserving--and heard some funny stories... In the fourth and final part of the series, three developers share their funniest and most favorite code, and tell funny stories..."
This week's java.net Poll asks Which project and community (P/C) content would you like to see more of on java.net? . Today (Thursday) is the last full day of voting.
Our Feature Articles include Felipe Gaucho's new article, Exposing Domain Models through the RESTful Service Interface, Part 1 , which describes domain models and demonstrates how to create a generic CRUD application. Also, Thomas Kuenneth recently published Hacking JavaFX Binding , which describes how to apply binding within JavaFX in a manner similar to what can be accomplished using Beans Binding (JSR-295).
The latest Java Mobility Podcast is Java Mobility Podcast 81: JTDF , in which Eric Areseneau talks about Victor D'yakov talks about the new Java Device Testing Framework project in the Mobile & Embedded Community.
The latest OpenJDK Podcast is
The latest JavaOne Community Corner Podcast is
Current and upcoming Java
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
Archives and Subscriptions: This blog is delivered weekdays as
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
Harold Carr attended Alois Reitbauer's session "Why applications do not scale" at Jazoon09...