Real-Time Concurrent Issues Drive Ada versus Java Choice

A useful short article by Ben Brosgol in COTS Journal.

On the surface, Ada and Java offer similar features to support real-time embedded military applications. But under the hood, they differ significantly in their underlying philosophy...

All that said, the Java / Ada decision need not be either/or. Mixed-language programming is provided by Java through the Java Native Interface, and by Ada through a standard interfacing framework. The enhancements in Ada 2005 make such interfacing easier, and there is current implementation support for mixed Ada/Java development. In a large system it may make sense to program different components in different languages—for example, a user interface in Java, hard real-time elements in Ada—thus taking advantage of the strengths of both. Ada and Java, rather than competing in the embedded defense system arena, may turn out to be comrades in arms.

Ben Brosgol is an expert on both Ada and Java support for real time programming, and I've linked to his papers that provide more detailed analysis a few times in the past.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Why should one prefer Java over Ada?

What are the requirements that may lead to choosing Java over Ada? Ada has lots of features crafted especially for embedded real-time systems, which Java lacks. For example, the Ada's type system allows the declaration of interface specifications (messages) in a very easy manner, whereas in Java one needs to code an entire framework to do the same, and with very different performance characteristics.

I can only see Java managing the user interface and co-operate with Ada programs through message interfaces. I can't see why Java should be used in the hard real time part of a system.

How does Ada compares to Erlang

I read an interview mentioned here about Erlang and it seems to have some common goals as Ada's real time features.

I think that "Not a single call should be dropped" is pretty much similar to jet fighters in complexity.

They are very different

They are very different languages. While Ada has great support for concurrency, it is not based on the notion that everything has to be viewed as a process, nor on massive parallelism. Ada is strongly (and statically) typed, supports many encapsulation mechanisms, is not functional, and does support oop.

See Also

Both Ada and Java RTS have support for hard real-time applications. Erlang isn't there yet, but I just posted a topic on the subject.

The Use of Java in support of the Warfighter and the IC

Ben’s post is a good overview, especially with the Ada’s historical roots with the government. At Azul Systems we’ve been seeing strong growth in our military and overall government business, which is equal to saying there has been strong growth of Java within that community. I think in part it’s a combination of growing numbers of Java developers, COTS solutions for Java issues, robust tools/methodologies around Java, and the shrinking pool of Ada developers. If you’re interested in a deeper dialogue on these issues (and more technical depth) click here to check out my latest blog posting.

Signing up just in order to

Signing up just in order to drop the name of your company, and a link to your blog is in bad taste, so I'll just mention that Ben did quite a lot of work on Java real time support, in addition to being an Ada expert and advocate.

I have to agree

I have to agree with the statement made above.

Merits of Java over Ada for hard real-time systems?

Are there any advantages of Java over Ada for hard real-time systems? I think there are none, but a more educated member can give a better answer than me.

I am asking because I am surprised to see Java in the context of hard real-time systems.

As was said: pragmatics over robustness

Sad as it might be from a technical perspective, there are real-world issues which apparently are/must be factored in to the managerial decisions about what language to choose. Hiring people, for example. (Don't get me wrong, I personally kinda detest that approach to things, but I can't fully discount its validity.) And, in theory, with enough elbow-grease you could maybe get the technically lesser thing to be Good Enough.

And, consequently, people

And, consequently, people (such as Ben) work hard on improving Java (and Java implementations) to make it more suitable for RT work.

Are there any language advantages?

Besides economic reasons, are there any programming language advantages of Java over Ada for this kind of applications?

Economic reasons?

Does library availability count as economic or technical?