Welcome!

Java Authors: Liz McMillan, Pat Romanski, Yeshim Deniz, Carmen Gonzalez, Yakov Fain

Related Topics: Java

Java: Article

The Challenges of Developing Distributed Java Applications

The Challenges of Developing Distributed Java Applications

In just a few years the Java language and platform has become the technical approach of choice for building complex, distributed and Web-enabled applications across the enterprise. Thanks to its cross-platform runtime environment, object-oriented development model, and facilities for working with object request brokers and other code components, Java is well equipped for building such applications.

Java enables software developers to provide seamless communication and application access to the rapidly growing world of Internet computers and communications devices, from UNIX servers and PCs to cell phones and beyond. IDC Research estimates that the Java products market will grow by 85% annually through 2004.

Java applications - especially those designed to work with other applications and components (often written in other languages) in a distributed environment - have different development requirements than traditional applications. For example, Java's execution model virtually eliminates traditional memory errors, but can introduce performance problems stemming from poor resource utilization. For those used to addressing traditional programming errors and other issues, Java's unique execution model and language characteristics may make building error-free and efficient applications more difficult.

The distributed nature of many Java applications can also make it difficult to pinpoint performance issues or diagnose programming errors. As a result, Java developers need software development tools and techniques for viewing and analyzing code execution on multiple systems on the network and from multiple code bases.

Issues Surrounding the Development of Distributed Java
Java is unique - it's a mainstream programming language that works like no other. Its rules aren't well understood yet by many application developers. Part of the reason for this is that its capabilities and limitations haven't been fully explored.

As a result, while many of the problems may be similar, recognizing them and knowing what to do when you find them remains challenging, even to experienced Java developers. What follows are just a few of the development issues and what they mean for Java.

Performance
Performance is a concern of applications written in any language. Most programmers are familiar with common performance issues using a conventional language such as C with a stand-alone or even a client/server application. Such issues often involve improper allocation, deallocation of memory and poor use of system APIs.

These aren't even characteristics of the Java language. For example, relating Java code to how the JVM manages memory is difficult and error-prone. However, it's vital to improve Java performance because its execution model has additional overhead that tends to degrade performance more than native applications do.

In addition to typical performance requirements and issues surrounding traditional stand-alone applications, distributed Java applications must contend with problems surrounding the interactions between components running on different systems. Performance problems may manifest themselves in unexpected ways or appear to be caused by different parts of the code other than the actual problem area. Identifying and locating performance bottlenecks rapidly is a significant challenge in distributed application development.

Reliability
Enterprise Java applications, especially distributed ones, are often mission-critical in nature: all aspects of the application must work perfectly at all times. Developers and development managers must be able to gauge the reliability of their applications accurately. While the characteristics of the language tend to make Java applications less error-prone, there are still plenty of ways to introduce runtime errors.

With distributed Java applications the reliability equation is even more difficult. It means assessing not only the individual applications but also the components as they interact. Java also makes it possible to write highly threaded applications that make sense in a distributed environment. But using threads means that problems with resource contention and deadlock are much greater.

Testing
Java applications face the same testing problems as traditional ones. They must be tested as thoroughly as possible before fielded, and developers should have a good idea of the extent of the test coverage before certifying an application. Distributed software systems written in Java, however, are extraordinarily difficult to test and debug. Because components reside on different computers and must work together perfectly for the application to work properly, all components must be tested simultaneously.

Memory Management
Since JVMs perform all the memory management tasks for applications, understanding the memory usage of the underlying platform and influencing memory allocation and use to affect performance is difficult to do and not intuitive. That's especially true because developers have no easy way of determining the relationship between code and the underlying memory use. Analyzing underlying memory use is a key component of building efficient applications (see Figure 1).

Software Tools Can Make Java Transparent
Several of the integrated development environments for Java are quite good, combining visual development, context-sensitive editing, JIT compilation and runtime debugging. What they lack, however, is the ability to determine the efficiency and reliability of the application, especially if it's distributed across several servers.

Most developers do without such tools, due in part to the relatively poor selection. There are many different Java-oriented development environments, but few tools to move code beyond the development stage. A few tools, such as the Compuware DevPartner for Java suite, combine components that evaluate performance issues, examine memory usage, analyze threads and track testing progress (see Figure 2).

Many Java developers fail to recognize that it's not enough for Java applications to be debugged within the development environment because of several myths regarding the use of Java as a development language and environment. One myth is that the VM eliminates programming errors and bugs. While direct memory errors aren't usually possible in Java development, it's still possible for Java applications to contain serious errors that affect the proper operation of the program.

Another myth is that the application developer has no control over the performance of the software since the VM manages the low-level details that determine how fast the code runs. How developers use specific language instructions can have a significant impact on application performance. Often a few simple changes can greatly improve performance if developers know their underlying effect in advance.

Java development tools assist and accelerate the development of reliable, high-performance applications, especially distributed ones. They go beyond the traditional development environments to include components that help make applications more reliable and efficient. When choosing a set of tools to supplement those found in development environments and improve the reliability and performance of Java applications, developers and development teams should take the following characteristics into account.

  • Support for multiple, unmodified VMs: Different operating systems often use different JVMs with different performance and behavior characteristics. In addition, some Java tools require the use of specially modified VMs that may not represent the characteristics of production systems.

    To obtain accurate information to improve the performance and reliability of distributed Java and mixed-language applications, developers should select tools that run in the actual deployment environment. This way they can be certain that the behavior observed and analyzed during development and testing will be the same once the application is deployed.

  • Minimal impact on Java runtime resources: During application testing and analysis, the Java development tools that are used can often be intrusive - their presence may influence the test results. If developers attempt to deploy the tools for further testing and tuning in the production environment, they may also encounter unacceptable performance degradation due to high resource utilization.

    If developers need accurate information on resource utilization, performance and system load, they should consider software tools that don't use large amounts of Java runtime resources. Tools with minimal Java and computing resource impact are more likely to provide the accurate information needed to improve the performance and reliability of distributed applications.

  • Support for Web technologies such as JavaScript and Active Server Pages (ASP): Large distributed applications that use Java often go beyond it to include many different software technologies, including JavaScript and ASP. Web software technologies can be a source of reliability and performance problems, and software tools that are unable to test for and identify these problems are of limited use.

    Application developers need tools that work with whatever software technologies they're using. Multilanguage tools, especially those that support industry-standard Web languages, provide the range of capabilities needed to find performance and reliability problems anywhere in the application (see Figure 3).

  • Ability to track Java memory utilization to the function and line level: Knowing you have a performance or reliability problem isn't any good unless you're able to pinpoint the source rapidly and easily. The more precise the diagnosis and analysis, the faster application developers can address the problem.

    Java application development tools should focus as specifically as possible on the exact location of a performance bottleneck or software error, especially for large, distributed applications. Developers working on deadlines need the most exacting information possible from their tools.

  • Ability to find thrashing and starvation conditions graphically: Some of the toughest software problems to find are those that involve resource starvation and code thrashing. These error conditions don't prevent the application from running; however, they cause severe performance bottlenecks and may even cause the application to hang while running.

    The problems are especially prevalent in Java applications in which multiple running threads contend for limited virtual machine resources. To ensure the reliability of deployed applications, Java developers require software tools that enable them to identify and locate the complex combination of conditions that can cause resource starvation and thrashing.

  • Ability to measure code base stability: Rapidly changing code during debugging and testing usually means that the application may be unreliable or needs additional testing before deployment. Conversely, an application with few changes to the code base during debugging and testing will more likely be fully tested and stable.

    It's important, therefore, for application developers to understand how much and how rapidly their application code is changing during the latter stages of the development process. An application development tool should measure the stability of the code base to enable both the development team and the managers to determine when the application can be used reliably in production.

  • Support for multiple operating systems: Mixed operating environments are the rule rather than the exception. Even if developers code on one platform, it's increasingly likely that the application will be deployed across several different types of systems. This is especially true of Java-based applications, which are designed to run unmodified on multiple operating systems.

    Application development tools have to support multiple development and runtime environments to eliminate the expense of purchasing different tool sets for different platforms, and to reduce the need for developer training on multiple tool sets and platforms.

Delivering Higher Quality Java Applications
Today's Web-enabled, distributed applications combine many different technologies and are prone to performance and reliability problems. Software developers using Java technology can spend a substantial amount of time trying to resolve these problems, leading to schedule delays and applications with ongoing problems.

Most of the Java development environments available are excellent for writing small to medium-sized stand-alone applications. It's growing increasingly difficult to write applications that are large or distributed, and to work with legacy components or databases. Performance and reliability issues overshadow the advantages of rapid, object-oriented development.

Visualizing these types of problems is an important aspect of debugging, tuning and testing applications because developers can quickly identify and localize the code responsible. If the developer can see where the deadlocked thread is, it's easier to pinpoint the resource that's deadlocked and its cause.

The kinds of problems that don't arise or are trivial in smaller applications take on critical importance in distributed processing. By using performance analyzers, memory profilers and thread inspectors such as those found in DevPartner Java Edition, distributed application developers can be sure their applications will run as expected.

Large-scale Java and distributed applications are easy to write but difficult to write well. To bridge the gap between mediocre or poorly performing applications and highly efficient ones, developers need to leverage software tools that help build reliable high-performance applications and components with Java technology. Such tools would allow Java developers to quickly and easily identify problems in key areas like runtime performance, memory utilization and multithreading.

More Stories By Peter Varhol

Peter Varhol is a Product Manager at Compuware Corporation, with graduate degrees in Mathematics and Computer Science, and has worked in software development and systems management. As a former college professor, he has substantial experience speaking on technical topics. He has written extensively on software development topics in a variety of trade magazines.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories

SUNNYVALE, Calif., Oct. 20, 2014 /PRNewswire/ -- Spansion Inc. (NYSE: CODE), a global leader in embedded systems, today added 96 new products to the Spansion® FM4 Family of flexible microcontrollers (MCUs). Based on the ARM® Cortex®-M4F core, the new MCUs boast a 200 MHz operating frequency and support a diverse set of on-chip peripherals for enhanced human machine interfaces (HMIs) and machine-to-machine (M2M) communications. The rich set of periphera...

WebRTC defines no default signaling protocol, causing fragmentation between WebRTC silos. SIP and XMPP provide possibilities, but come with considerable complexity and are not designed for use in a web environment. In his session at Internet of @ThingsExpo, Matthew Hodgson, technical co-founder of the Matrix.org, will discuss how Matrix is a new non-profit Open Source Project that defines both a new HTTP-based standard for VoIP & IM signaling and provides reference implementations.
SYS-CON Events announced today that Aria Systems, the recurring revenue expert, has been named "Bronze Sponsor" of SYS-CON's 15th International Cloud Expo®, which will take place on November 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Aria Systems helps leading businesses connect their customers with the products and services they love. Industry leaders like Pitney Bowes, Experian, AAA NCNU, VMware, HootSuite and many others choose Aria to power their recurring revenue business and deliver exceptional experiences to their customers.
The Internet of Things (IoT) is going to require a new way of thinking and of developing software for speed, security and innovation. This requires IT leaders to balance business as usual while anticipating for the next market and technology trends. Cloud provides the right IT asset portfolio to help today’s IT leaders manage the old and prepare for the new. Today the cloud conversation is evolving from private and public to hybrid. This session will provide use cases and insights to reinforce the value of the network in helping organizations to maximize their company’s cloud experience.
The Internet of Things (IoT) is making everything it touches smarter – smart devices, smart cars and smart cities. And lucky us, we’re just beginning to reap the benefits as we work toward a networked society. However, this technology-driven innovation is impacting more than just individuals. The IoT has an environmental impact as well, which brings us to the theme of this month’s #IoTuesday Twitter chat. The ability to remove inefficiencies through connected objects is driving change throughout every sector, including waste management. BigBelly Solar, located just outside of Boston, is trans...
SYS-CON Events announced today that Matrix.org has been named “Silver Sponsor” of Internet of @ThingsExpo, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Matrix is an ambitious new open standard for open, distributed, real-time communication over IP. It defines a new approach for interoperable Instant Messaging and VoIP based on pragmatic HTTP APIs and WebRTC, and provides open source reference implementations to showcase and bootstrap the new standard. Our focus is on simplicity, security, and supporting the fullest feature set.
Predicted by Gartner to add $1.9 trillion to the global economy by 2020, the Internet of Everything (IoE) is based on the idea that devices, systems and services will connect in simple, transparent ways, enabling seamless interactions among devices across brands and sectors. As this vision unfolds, it is clear that no single company can accomplish the level of interoperability required to support the horizontal aspects of the IoE. The AllSeen Alliance, announced in December 2013, was formed with the goal to advance IoE adoption and innovation in the connected home, healthcare, education, aut...
SYS-CON Events announced today that Red Hat, the world's leading provider of open source solutions, will exhibit at Internet of @ThingsExpo, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Red Hat is the world's leading provider of open source software solutions, using a community-powered approach to reliable and high-performing cloud, Linux, middleware, storage and virtualization technologies. Red Hat also offers award-winning support, training, and consulting services. As the connective hub in a global network of enterprises, partners, a...
The only place to be June 9-11 is Cloud Expo & @ThingsExpo 2015 East at the Javits Center in New York City. Join us there as delegates from all over the world come to listen to and engage with speakers & sponsors from the leading Cloud Computing, IoT & Big Data companies. Cloud Expo & @ThingsExpo are the leading events covering the booming market of Cloud Computing, IoT & Big Data for the enterprise. Speakers from all over the world will be hand-picked for their ability to explore the economic strategies that utility/cloud computing provides. Whether public, private, or in a hybrid form, clo...
Software AG helps organizations transform into Digital Enterprises, so they can differentiate from competitors and better engage customers, partners and employees. Using the Software AG Suite, companies can close the gap between business and IT to create digital systems of differentiation that drive front-line agility. We offer four on-ramps to the Digital Enterprise: alignment through collaborative process analysis; transformation through portfolio management; agility through process automation and integration; and visibility through intelligent business operations and big data.
The Transparent Cloud-computing Consortium (abbreviation: T-Cloud Consortium) will conduct research activities into changes in the computing model as a result of collaboration between "device" and "cloud" and the creation of new value and markets through organic data processing High speed and high quality networks, and dramatic improvements in computer processing capabilities, have greatly changed the nature of applications and made the storing and processing of data on the network commonplace.
Be Among the First 100 to Attend & Receive a Smart Beacon. The Physical Web is an open web project within the Chrome team at Google. Scott Jenson leads a team that is working to leverage the scalability and openness of the web to talk to smart devices. The Physical Web uses bluetooth low energy beacons to broadcast an URL wirelessly using an open protocol. Nearby devices can find all URLs in the room, rank them and let the user pick one from a list. Each device is, in effect, a gateway to a web page. This unlocks entirely new use cases so devices can offer tiny bits of information or simple i...
Things are being built upon cloud foundations to transform organizations. This CEO Power Panel at 15th Cloud Expo, moderated by Roger Strukhoff, Cloud Expo and @ThingsExpo conference chair, will address the big issues involving these technologies and, more important, the results they will achieve. How important are public, private, and hybrid cloud to the enterprise? How does one define Big Data? And how is the IoT tying all this together?
The Internet of Things (IoT) is going to require a new way of thinking and of developing software for speed, security and innovation. This requires IT leaders to balance business as usual while anticipating for the next market and technology trends. Cloud provides the right IT asset portfolio to help today’s IT leaders manage the old and prepare for the new. Today the cloud conversation is evolving from private and public to hybrid. This session will provide use cases and insights to reinforce the value of the network in helping organizations to maximize their company’s cloud experience.
TechCrunch reported that "Berlin-based relayr, maker of the WunderBar, an Internet of Things (IoT) hardware dev kit which resembles a chunky chocolate bar, has closed a $2.3 million seed round, from unnamed U.S. and Switzerland-based investors. The startup had previously raised a €250,000 friend and family round, and had been on track to close a €500,000 seed earlier this year — but received a higher funding offer from a different set of investors, which is the $2.3M round it’s reporting."
The Industrial Internet revolution is now underway, enabled by connected machines and billions of devices that communicate and collaborate. The massive amounts of Big Data requiring real-time analysis is flooding legacy IT systems and giving way to cloud environments that can handle the unpredictable workloads. Yet many barriers remain until we can fully realize the opportunities and benefits from the convergence of machines and devices with Big Data and the cloud, including interoperability, data security and privacy.
All major researchers estimate there will be tens of billions devices - computers, smartphones, tablets, and sensors - connected to the Internet by 2020. This number will continue to grow at a rapid pace for the next several decades. Over the summer Gartner released its much anticipated annual Hype Cycle report and the big news is that Internet of Things has now replaced Big Data as the most hyped technology. Indeed, we're hearing more and more about this fascinating new technological paradigm. Every other IT news item seems to be about IoT and its implications on the future of digital busines...
Cultural, regulatory, environmental, political and economic (CREPE) conditions over the past decade are creating cross-industry solution spaces that require processes and technologies from both the Internet of Things (IoT), and Data Management and Analytics (DMA). These solution spaces are evolving into Sensor Analytics Ecosystems (SAE) that represent significant new opportunities for organizations of all types. Public Utilities throughout the world, providing electricity, natural gas and water, are pursuing SmartGrid initiatives that represent one of the more mature examples of SAE. We have s...
The Internet of Things needs an entirely new security model, or does it? Can we save some old and tested controls for the latest emerging and different technology environments? In his session at Internet of @ThingsExpo, Davi Ottenheimer, EMC Senior Director of Trust, will review hands-on lessons with IoT devices and reveal privacy options and a new risk balance you might not expect.
IoT is still a vague buzzword for many people. In his session at Internet of @ThingsExpo, Mike Kavis, Vice President & Principal Cloud Architect at Cloud Technology Partners, will discuss the business value of IoT that goes far beyond the general public's perception that IoT is all about wearables and home consumer services. The presentation will also discuss how IoT is perceived by investors and how venture capitalist access this space. Other topics to discuss are barriers to success, what is new, what is old, and what the future may hold.