Linked by Thom Holwerda on Fri 21st Sep 2007 10:10 UTC, submitted by Jean-Marie Dautelle
Java 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.
Order by: Score:
Rover
by sard on Fri 21st Sep 2007 11:02 UTC
sard
Member since:
2005-11-16

And Bjarne Stroustrup was so proud (rightfully) of C++ being used in the Mars Rover.

Reply Score: 2

RE: Rover
by FunkyELF on Fri 21st Sep 2007 14:08 UTC in reply to "Rover"
FunkyELF Member since:
2006-07-26

Even if they use Java...what is the VM written in?

Reply Score: 1

RE[2]: Rover
by slashdev on Fri 21st Sep 2007 14:35 UTC in reply to "RE: Rover"
slashdev Member since:
2006-05-14

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.

Reply Score: 4

Starts by spin
by renox on Fri 21st Sep 2007 11:56 UTC
renox
Member since:
2005-07-06

"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..

Reply Score: 2

RE: Starts by spin
by joshv on Fri 21st Sep 2007 12:38 UTC in reply to "Starts by spin"
joshv Member since:
2006-03-18

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.

Reply Score: 4

RE[2]: Starts by spin
by hashnet on Sat 22nd Sep 2007 05:17 UTC in reply to "RE: Starts by spin"
hashnet Member since:
2005-11-15

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

Reply Score: 1

Javalution
by rondeth on Fri 21st Sep 2007 12:38 UTC
rondeth
Member since:
2005-12-05

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...

Reply Score: 1

Cost savings ?
by mounty on Fri 21st Sep 2007 12:57 UTC
mounty
Member since:
2005-12-12

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.

Reply Score: 2

RE: Cost savings ?
by gustl on Fri 21st Sep 2007 13:07 UTC in reply to "Cost savings ?"
gustl Member since:
2006-01-19

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.

Reply Score: 9

RE[2]: Cost savings ?
by dautelle on Fri 21st Sep 2007 14:10 UTC in reply to "RE: Cost savings ?"
dautelle Member since:
2007-04-18

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.

Reply Score: 1

RE[3]: Cost savings ?
by gustl on Mon 24th Sep 2007 08:54 UTC in reply to "RE[2]: Cost savings ?"
gustl Member since:
2006-01-19

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.

Reply Score: 1

java fans and real time.
by bnolsen on Fri 21st Sep 2007 13:29 UTC
bnolsen
Member since:
2006-01-06

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

Reply Score: 1

RE: java fans and real time.
by ahmetaa on Fri 21st Sep 2007 13:41 UTC in reply to "java fans and real time."
ahmetaa Member since:
2005-07-06

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.

Reply Score: 3

RE[2]: java fans and real time.
by renox on Fri 21st Sep 2007 17:45 UTC in reply to "RE: java fans and real time."
renox Member since:
2005-07-06

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.

Reply Score: 1

RE[3]: java fans and real time.
by ossprinter on Fri 21st Sep 2007 19:46 UTC in reply to "RE[2]: java fans and real time."
ossprinter Member since:
2006-02-24

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?

Reply Score: 4

RE[4]: java fans and real time.
by renox on Sat 22nd Sep 2007 08:27 UTC in reply to "RE[3]: java fans and real time."
renox Member since:
2005-07-06

>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..

Reply Score: 2

RE: java fans and real time.
by angryrobot on Fri 21st Sep 2007 16:42 UTC in reply to "java fans and real time."
angryrobot Member since:
2006-04-26

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.

Reply Score: 3

RE: java fans and real time.
by timefortea on Fri 21st Sep 2007 17:12 UTC in reply to "java fans and real time."
timefortea Member since:
2006-10-11

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?

Reply Score: 4

RE[2]: java fans and real time.
by bnolsen on Sat 22nd Sep 2007 04:11 UTC in reply to "RE: java fans and real time."
bnolsen Member since:
2006-01-06

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.

Reply Score: 2

So..a new JVM?
by TemporalBeing on Fri 21st Sep 2007 13:56 UTC
TemporalBeing
Member since:
2007-08-22

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.

Reply Score: 1

RE: So..a new JVM?
by bariole on Fri 21st Sep 2007 14:27 UTC in reply to "So..a new JVM?"
bariole Member since:
2007-04-17

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.

Reply Score: 1

RE: So..a new JVM?
by smitty on Fri 21st Sep 2007 14:59 UTC in reply to "So..a new JVM?"
smitty Member since:
2005-10-13

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.

Reply Score: 3

Scala would be good...
by sigzero on Fri 21st Sep 2007 20:44 UTC
sigzero
Member since:
2006-01-03

It has a lot of good features that would help it in the NASA kind of scenario.

Reply Score: 1

But
by fffffh on Fri 21st Sep 2007 21:08 UTC
fffffh
Member since:
2006-01-04

When Java on the desktop will become modular and more skinner ?

Reply Score: 2

RE: But
by chekr on Fri 21st Sep 2007 23:45 UTC in reply to "But"
chekr Member since:
2005-11-05

With Update 4 of the current Java release you will see a cut down "Java Kernel" which will download components as it requires them.

Reply Score: 2