Sun on tuesday released its first Java platform that offers real-time capabilities. The platform, Java Real-Time System 1.0, implements the Real-time Specification for Java (RTSJ), a blueprint for how Java can be extended to support real-time application programming.
Anyone care to post a quick summary of what Real-Time application programming is, and what it is good for? Does this mostly have to do with scheduling CPU time?
…has to do with getting a job done within a specified amount of time.
A great misunderstanding is that realtime equals a fast program. However, this is a misconception as realtime is not about fast or slow but about getting the job done in time.
a real time system behavior can be predicted and certain timings can be guaranteed. Normally a real time mechanism is highly depend on underlying OS too, it has to be a “RTOS” i assume. even so, they must be using a special kind of garbage collection mechanism.. well i think i should stop talking and read the specs
The headline is kind of misleading in that there have been implementations of the RTSJ out there for many years (TimeSys’ proprietary reference implementation and Open-Source projects like jRate (on sourceforge)).
Actually, the way the RTSJ spec works, they basically throw out garbage collection on anything hard real time, only allowing it for softer realtime tasks where you don’t care if you miss a deadline…
realtime GC is pretty much the holy grail these days for realtime java
Real Time Programming is like getting to the phone before the answering machine picks it up. When some happens, it has to have a guaranteed response time.
Then you get to prioritize things so that when event A happens, servicing it doesn’t delay responding to event B (which also must be serviced in some fixed amount of time).
Real Time OS’s provide facilities to write systems with those kinds of guarantees.
While technically speaking a speed-oriented definition of a realtime system is not the “default/mainstream” perspective of such a system, speed is definitely something that is guaranteed.
Another way to put it would be to point out that the specification does not say “realtime spec for systems allowing for ‘X’ delay”, just realtime. Point being that if you have a realtime system that has an allowance for 100 nanoseconds – before the answering machine kicks in, to use the above mentioned example – then it can be assumed that the realtime system itself (or the supporting framework) allow for operational speeds that are faster than 100 nanoseconds in order to respond within 100 nanoseconds.
http://javolution.org/
at least in embedded projects, real-time programming is really easy. To me, at least.
That said, I find it somewhat hard to imagine that an interpreted language could work for real-time applications.
Yes, Javalution is nice, but it is only one part of the deal. This JSR 1 (was it the first JSR ever?) will facilitate much more low level realtime stuff, while Javalution is an RT implementation of many high level api functions, though in a real time way of doing it.
Excerpt from Javolution collections presentation (http://javolution.org/doc/Javolution-Collections.pdf): “The real-time specification for Java (RTSJ) aims to make
your code more time predictable. But, this predictability can
easily be ruined by using standard library classes…”
In other words, standard Java classes are not time predictable and Javolution library aim to adress this problem.
Also, Javolution classes are faster than standard classes which might be of interest to any high-performance Java applications (e.g. games applications).
I think the person who posed the question is more right than anyone else. Realtime doesn’t mean anything is faster. It just means that the system guarantees a response within a certain amount of time. It’s typically used for critical systems. If you press the brakes in a car, the processor can’t be out smoking a cigarette.
Just because you’ve got a real-time system doesn’t mean that you’re taking advantage of it either. If you’re running a RTOS with a browser built-in, chances are that it’s not doing anything with the real-time extensions.