| By Java News | Article Rating: |
|
| December 4, 2007 12:00 PM EST | Reads: |
7,672 |
Speaking at JavaPolis on 14 December, Luciad will share some
of its eight years of advanced Java experience in the context of advanced
graphical applications. The presentation focuses on some of the
techniques used to obtain the high performance of LuciadMap and discusses pros
and cons, do's and don'ts. For developers new to Java graphics, it should
be clear that Java holds no limitations for high performance graphics, the more
advanced Java graphics developer may pick up a few new ideas.
Foolish or brave
From the start in 1999, LuciadMap was implemented in Java.
The Java platform has proven to be very well suited for high performance
graphical applications, such as high demanding 3D and 2D visualization for air
traffic management systems. Moreover, the Java platform has allowed
LuciadMap to take advantage of the recent hardware evolutions (such as the availability
of multi-core CPUs) in a transparent way.
Java, OpenGL, and Swing
The high performance requirement for displaying static and
moving geo-referenced recorded or realtime air traffic data in 3D has had a big
impact on the design choices. In the early design stages, OpenGL was
preferred over Java3D because OpenGL allows direct rendering of the data,
without building a 3D scene graph. An internal abstraction layer allows
to easily choose a specific OpenGL binding. The supported OpenGL bindings
have evolved over the years, from GL4Java over JOGL to the JSR-231 binding
(actually also known as JOGL). The JSR-231 binding has proven to be the
most stable one, and currently provides the most rich API capability.
The use of NIO buffers is important. NIO buffers allow the setup of a pipeline to quickly pass terrain data from disk to the OpenGL hardware, without involving Java memory allocation.
A number of language independent OpenGL techniques are
employed, such as the use of vertexbuffers and other primitives for fast
rendering.
Using OpenGL components in a SWING application also needs
special attention, since OpenGL components are heavyweight components.
Issues with moving and resizing windows, with heavyweight menu bars and tabbed
panes, can often be solved by applying “Context sharing”, an OpenGL
functionality that is only available in the JSR-231.
Java for high performance soft-realtime applications
Java’s garbage collection has always been one of the key Java characteristics, being a blessing for the developer who does not have to worry too much about memory management and at the same time a source of worry for those who are concerned with responsiveness, efficient memory usage, and performance in general. Soft-realtime applications need an almost 100% guarantee of reaching a given display rate and responsiveness of the application. Operational ATC (Air Traffic Control) applications, for instance, require a guarantee that an update of the screen is done each 300ms. Therefore it is a challenge building soft-realtime applications with Java.
Techniques such as object pooling try to give the developer more control over memory management, but they do not always provide the optimal solution. To a large extent, the solution is provided by the Java platform itself by the garbage collection improvements and tuning possibilities in the JVM.
In the context of high performance graphical applications, special attention should be given to the concept of multi-threading.
Multi-threading
A well known principle for building responsive applications is to make proper use of multithreading. Basically all time consuming processing or I/O needs to be done in another thread than the GUI updates, so that the GUI thread is minimally blocked and can respond to user interactions. In the context of graphical applications this may not be sufficient: the graphical rendering that is part of the GUI updates may already consume a considerable amount of time, and hence have an impact on the responsiveness of the application. A typical time consuming process in the context of 2D graphical applications is label decluttering.
LuciadMap’s “Paint in background” functionality uses the commonly known idea of drawing the GUI in an image on a separate thread, and then visualizing the image on the screen. Although this sounds simple, it is not always the case, since it is possible that rendering settings are changed while the rendering on the offline image is still ongoing. It means that applying the changes and the actual drawing must be properly sequenced.
Published December 4, 2007 Reads 7,672
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Java News
JDJ News Desk monitors the world of Java to present IT professionals with updates on technology advances, business trends, new products and standards in the Java and i-technology space.
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?






































