For cost reasons the space agency is more and more interested in using Java for safety-critical missions. Until recently the lack of a time-predictable standard library has been a major hurdle to Java adoption in that particular field. It is no more the case as demonstrated by this AIAA (American Institute of Aeronautics and Astronautics) paper [.pdf] presented the first day of the Space 2007 conference (Long Beach, CA) and introducing the first fully time-deterministic (and open-source) library for Java: Javolution.
And Bjarne Stroustrup was so proud (rightfully) of C++ being used in the Mars Rover.
Even if they use Java…what is the VM written in?
Technically, with GCJ, it could be written in Java and Assembly (via JNI). But odds are, the VM is written in C or C++ and Assembly…or just Assembly i guess (if you are gung ho about it).
Folks, When we are talking about space travel, Java (and any other code in any other language) will be executed on embedded, highly specialized processors. Unlike the Desktop Processors (x86,etc), there has been massive progress in making JAVA run amazingly fast. One such CPU is the ARM ARM1176JZF (suppose to be in the iPhone i believe). More of them are coming, and being put into Cellphones, Settop Boxes (most notably BluRay Players), TVs and any other embedded spaces.
“critical applications are switching from Ada/C/C++ to Java, saving hundreds thousands of dollars off development cost in the process”
While I have no doubt that going from C or C++ to Java save costs (C is low level, C++ sucks), I find it hard to believe that going from Ada to Java save costs (except in the tools but in big developments tools’s cost doesn’t matter usually).
That said, this library seems interesting but the paper linked in the post is a bit hard to understand..
I am guessing the costs savings comes from the fact that Java developers are a dime a dozen. Even if you limit yourself to a highly skilled subset of developers, there are many more Java devs available.
The main cost factor is not writing the code, it’s testing and maintenance.
Ada comes much closer to writing program that are correct by design than Java, deterministic or not.
Sure you’d pay more for Ada code monkeys, but would get fewer bugs and thus reduced maintenance costs.
IOW I’d feel safer flying in a plane with control software written in Ada than in Java.
For software running webshop backends I’m not as picky.
Edited 2007-09-22 05:20
http://www.cnn.com/2004/TECH/space/01/16/space.mars.java.reut/
For the java devs out there, javalution also has a good amount of other useful features…high(er) performance collections, string & xml utils, context programming tools, etc. I’ve had good luck with this lib…
We’ll see … while Java is a big improvement on C/C++ (I say this as one whose major CV content is C++), it isn’t a patch on Ada for security. This just confirms that NASA is run by idiot managerdroids making decisions which they aren’t qualified to make. They are looking for tiny savings of initial production cost, without looking at the total cost of ownership, both cost of maintenance and the consequences of failure.
Well, when talking about consequences of failure, the whole US-American industry would be better of by making the switch to SI system of units as fast as they possibly can.
Because mixing up m and ft is not really a good idea.
And by the way – using imperial (or US) units in technical calculations is also a bad idea.
Actually, the JSR-275 “Units and Measure API” addresses this problem. Coincidently JScience ( http://jscience.org/ ), the reference implementation for JSR-275 is also based on Javolution.
Well, I just had to deal with US-American units lately (being European myself), and when viewed from an outsider like me, the imperial units system is so unbelievably bad, you as having grown up with this system would not believe it. If you could see it with my eyes, you would immediately travel to Washington D.C and demonstrate for an immediate switch to metric .
I’d like to tell you the anecdote, why I arrived a t my point of view:
I am working for an engineering company (for car engines) which had to deal with a flywheel and clutch manufacturer who is based in the USA lately.
I am responsible for the torsional vibration analysis, and for that I need the stiffnesses and mass inertias of all involved parts of the engine.
Well, I asked the flywheel manufacturer about the mass inertia of his parts, and I got back a nice EXCEL – sheet with several inertias of several parts. In this sheet there where two columns for the inertia, but you will never guess what units where used for each column.
I would have expected one imperial and one metric column, but they where BOTH imperial.
The unit of a mass inertia is: mass times lenght squared, and you can also write it as force times length times time squared.
The SI units are kg*m^2 or N*m*s^2, where 1 kg*m^2 of course is 1 N*m*s^2.
The imperial units are lb*ft^2 or lbf*ft*sec^2, where of course no sane conversation factor between the two numbers exists.
So I was sitting at my computer, staring unbelieving at this mess. I asked the flywheel supplier to do me a favor and add another column with SI units used. But when this sheet arrived I found out that it was completely wrong.
My take from that is, that unit conversion inside the imperial system and from imperial to SI is so complicated, that not even technitians can handle it without a high failure rate (otherwise the two columns with different imperial units would not have been in this EXCEL sheet). And basing something like space probes or cars, which are error-prone enough, on a system which helps you making errors is expensive.
And no programming language internal units converter can change this fundamentally, it can only try to help you make the same error only once.
I guess it’s good that java sort of somehow became more real time. I guess there must have been some effort to try to force resource release and resource deallocation and such on demand instead of lazily.
Interesting all the java fans come out of the woodwork.
My experience with java is dismal, the language has bad problems, the sun libraries are horribly designed.
Yes I’ve worked mostly with c++, ruby, IO some python and in a past life even perl.
I’ve read the “kingdom of nouns” satire about java and it’s a pretty good illustration of how java has fallen off the tracks
problem is, you haven’t worked with java maybe? All those languages you count has similar problems. But some has the luxury to break back compatibility due to their lack of user base.
While there is some truth to what you’re saying, the other trush is that Java at first was really rushed to the market and it showed: the language was missing basic features such as generics, properties, etc.
So Java is only an average language, and I hope that it’ll be replaced by Scala for example.
While there is some truth to what you’re saying, the other trush is that Java at first was really rushed to the market and it showed: the language was missing basic features such as generics, properties, etc. …
C,C++ lacks the support of multiple threading;
.Net lacks the capability of running across platforms;
Assembles lacks…
Perl lacks…
Python lacks…
Php lacks..
So they are all languages rushing to the market?
>C,C++ lacks the support of multiple threading
No multiple threading wasn’t that interesting when C++ was made, and definitedly not when C was made!
>.Net lacks the capability of running across platforms;
It’s made by Microsoft, why would Microsoft want to support other platform?
>So they are all languages rushing to the market?
Apparently you need to find better arguments to support your point..
Dude, if there is one good thing about Java it’s the API, which has incredible depth and is very well designed. I’m not saying it doesn’t have warts (all languages do), but maybe you could give an example of what you think is so horrible? Seriously.
Having working in C++ for years and now in Java for the last few years, I hope never to have to go back to C++. Java provides such a rich API, some excellent and free IDEs (Eclipse, NetBeans) and it has come on in leaps and bounds in terms of performance. I’ve seen a paper on how it can be optimised to run as fast as compiled C++ and as has already been pointed out, there are even CPUs designed to run it. I’m not saying its the best thing since sliced bread but it does everything I’d ever want and then some – and I feel much more productive using it.
So when you say “My experience with java is dismal, the language has bad problems, the sun libraries are horribly designed.” you’ll need to quantify it. Never mind the satire you’ve read, what have you experienced?
Early on review of a satellite visualization software written in Java. Those were the old days of java 1.2, the code had to be delivered with the JVM tha would work with it.
Several years ago inherited a disastrously coded GIS server. Fit few things into it, trashed and recoded some back end processing. The java servlets did tons of image processing. The servlets crashed 2-3 time a day (at the time they were backending all the DOQQs for terraserver). Three different JSP servers, 4 different platforms, 3 different cpu architectures, 4 different JVM’s all showed this behavior. This was in the 1.5 days.
I wrote some fresh code with the JAI stuff. I thought it was pretty convoluted how to get everything with all the object/subobject/delegate this/etc stuff.
But I am a bit c++ heavy. Looked at the current code base my partner and I have. In the last year and a half we’ve written 200k lines of code, I believe we only have 6 or 7 total inheritance hierachies. Very heavy scientific engineering stuff heavily threaded, scales 32+ cpus.
I’m curious…did they have to implement a new JVM to get this? Without integrating it highly into the JVM, you’d still be at the mercy of the JVM and the JVM scheduler for timing, so I’m not sure it would really work unless they did deeply integrated it into the JVM somehow.
Maybe. If they have used Java for robot control, than almost certainly they have use RTSJ dialect (http://www.rtsj.org/). RTSJ is extension of a JVM to real-time programming.
FTA:
“Ahead-Of-Time compilation, incremental
Garbage Collection and the use of RTSJ-compliant Virtual Machine” are required and already exist, but without a deterministic library they’re of limited use. Enter Javolution.
It has a lot of good features that would help it in the NASA kind of scenario.
When Java on the desktop will become modular and more skinner ?
With Update 4 of the current Java release you will see a cut down “Java Kernel” which will download components as it requires them.