JavolutionReal-Time System Design project,Stoenescu Serban
"The ability to simplify means to eliminate theunnecessary so that the necessary may speak."Hans Hoffmann
What is Javolution?● Javolution is a Java API for real-time softwaresystems● Real-time systems imply:● Higher execution sp...
Advantages● Some classes are easier to use than standardclasses in some SDKs or APIs.● Example: „You dont need to guess th...
Advantages (continued)● Javolution makes it easy for concurrentalgorithms to take advantage of multi-processors systems. [...
Advantages (continued)● Real-time collection classes● Example: ArrayList (standard) vs. FastTable(Javolution:● ArrayList m...
Advantages (continued)● Provides Struct and Union classes for directinteroperability with C/C++;
Advantages (continued)● Most Javolution classes are stateless ([1])● state passed through parameters to methods oravailabl...
Important Features● Context classes allow true separation ofconcerns (eg. logging, performance, etc.)● Testing framework● ...
Example Classes
Context● This class represents an execution context;they can be associated to particular threads orobjects.● Applications ...
SecurityContext● Used for separating security concerns.Example for addressing security requirements([1])public static bool...
High Performance IO Classes● CharSequenceReader● UTF8ByteBufferReader● UTF8ByteBufferWriter● UTF8StreamReader● UTF8StreamW...
The Realtime Package● RealTimeInterface: defines RTSJ safe classes● RealtimeThread: time-predictable threads● Reflection.C...
The javolution.util Package● Includes a lot of Javolution collection classesthat have counterparts in standard Javapackage...
The javolution.util Package(continued)● StandardLog class: represents a specializedlogging context forwarding events to a ...
More features● javolution.xml and subpackages provide fastXML processing features
Sample Application
Sample application● Application is similar reaction time tests indriving schools● Used for testing and improving reaction ...
Sample application (continued)● Uses RealtimeThread for controlling the outputand measuring reaction times● Also measures ...
Reaction Time Measurement
Log and Statistics
Thread delays measurement(milliseconds)
References● [1] „Javolution” - http://javolution.org/
Upcoming SlideShare
Loading in …5
×

Javolution rtsd

734 views
617 views

Published on

Javolution project for RTSD (university project)

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
734
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Javolution rtsd

  1. 1. JavolutionReal-Time System Design project,Stoenescu Serban
  2. 2. "The ability to simplify means to eliminate theunnecessary so that the necessary may speak."Hans Hoffmann
  3. 3. What is Javolution?● Javolution is a Java API for real-time softwaresystems● Real-time systems imply:● Higher execution speed● Time predictability
  4. 4. Advantages● Some classes are easier to use than standardclasses in some SDKs or APIs.● Example: „You dont need to guess the capacityof a TextBuilder, FastTable or a FastMap, theirsize expand gently without ever incurringexpensive resize/copy or rehash operations(unlike StringBuilder, ArrayList or HashMap).„ [1]
  5. 5. Advantages (continued)● Javolution makes it easy for concurrentalgorithms to take advantage of multi-processors systems. [1]● Example: Class ConcurrentContext● When a thread enters a concurrent context, itmay call the execute method, then continuewith a concurrent thread immediately (or thethread itself if there is no concurrent threadimmediately available)
  6. 6. Advantages (continued)● Real-time collection classes● Example: ArrayList (standard) vs. FastTable(Javolution:● ArrayList may throwConcurrentModificationException● FastTable does not throw it (more thread-safe)
  7. 7. Advantages (continued)● Provides Struct and Union classes for directinteroperability with C/C++;
  8. 8. Advantages (continued)● Most Javolution classes are stateless ([1])● state passed through parameters to methods oravailable through Context classes● This design approach makes Javolution andany product based on Javolution highlyparrallelizable with no need for synchronization
  9. 9. Important Features● Context classes allow true separation ofconcerns (eg. logging, performance, etc.)● Testing framework● Allows assertions on execution time innanoseconds● Worlds fastest and first hard real-time XMLmarshalling/unmarshalling facility([1])
  10. 10. Example Classes
  11. 11. Context● This class represents an execution context;they can be associated to particular threads orobjects.● Applications may extend this to facilitateseparation of concerns● Extended by:● ConcurrentContext (see slide 5)● SecurityContext
  12. 12. SecurityContext● Used for separating security concerns.Example for addressing security requirements([1])public static boolean isReadAllowed(Table table) {SecurityContext policy = SecurityContext.current();return (policy instanceof DatabaseAccess.Permission) ?((DatabaseAccess.Permission)policy).isReadable(table) :false;}
  13. 13. High Performance IO Classes● CharSequenceReader● UTF8ByteBufferReader● UTF8ByteBufferWriter● UTF8StreamReader● UTF8StreamWriter● Differences between this and standardStreamWriters:– Instances of this class can be reused for different outputstreams.– Wrapping using a java.io.BufferedWriter is unnescessaryas instances of this class embed their own data buffers.
  14. 14. The Realtime Package● RealTimeInterface: defines RTSJ safe classes● RealtimeThread: time-predictable threads● Reflection.Constructor and Reflection.Method:● Achieves some of the features provided byreflection● Reflection is known to be slow
  15. 15. The javolution.util Package● Includes a lot of Javolution collection classesthat have counterparts in standard Javapackages.● Examples:– FastMap<K,V> - HashMap<K,V>– FastSet<E> - Set<E>– FastTable<E> - ArrayList<E>
  16. 16. The javolution.util Package(continued)● StandardLog class: represents a specializedlogging context forwarding events to a standardlogger (java.util.logging.Logger) ([1])● ReentrantLock: same functionality as standardlocks
  17. 17. More features● javolution.xml and subpackages provide fastXML processing features
  18. 18. Sample Application
  19. 19. Sample application● Application is similar reaction time tests indriving schools● Used for testing and improving reaction times● User is shown some letters● He is supposed to press a key as fast as he canif a vocal appears, before it disappears● Otherwise he is not supposed to press anything
  20. 20. Sample application (continued)● Uses RealtimeThread for controlling the outputand measuring reaction times● Also measures delays caused by threads● Uses FastSet to keep records of events
  21. 21. Reaction Time Measurement
  22. 22. Log and Statistics
  23. 23. Thread delays measurement(milliseconds)
  24. 24. References● [1] „Javolution” - http://javolution.org/

×