• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please an example of Real Time Java Programming  RSS feed

 
Rogerio Kioshi
Ranch Hand
Posts: 690
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'd like to know an example of using Real Time Java Programming. For me is not very clear in what kind of applications I would have to use that.

Thank you

 
Eric Bruno
author
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any application that has a time-based requirement, such as responding to a real-world event by a deadline. An example is an elevator control system that must stop the elevator within milliseconds of passing a floor sensor, or a trading application that must execute an order within a defined time-frame or the market may move unfavorably.
 
Rogerio Kioshi
Ranch Hand
Posts: 690
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Bruno wrote:Any application that has a time-based requirement, such as responding to a real-world event by a deadline. An example is an elevator control system that must stop the elevator within milliseconds of passing a floor sensor, or a trading application that must execute an order within a defined time-frame or the market may move unfavorably.

But in these kind of applications, couldn't I use Threads API? Java RTS is an specialized API for that?
 
Eric Bruno
author
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. In Java SE, java.lang.Thread is non-deterministic and does not offer predictable behavior in terms of time. You need to use a javax.realtime.RealtimeThread (or NoHeapRealtimeThread or AsyncEvenHandler) as defined by the RTSJ and as implemented in the Java RTS VM to get real-time behavior in your Java application.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!