2. Existing presentations
• Новое в JDK 8. Александр Ильин, Oracle
https://www.youtube.com/watch?v=lSnNWRABA1s
• JDK8: Stream style, Sergey Kuksenko, Oracle
http://www.slideshare.net/SergeyKuksenko/jdk8-stream-style
• More on slideshare
3. What this talk is about
• Streams
• Stream notes
• Some other new features in Java 8
– Optional<?>
– Annotations
– parallelSort
– Concurrency
– Some other stuff
32. Parallel sort of 50M elements
(on my 4 core laptop)
• Single threaded DualPivotQuickSort: 47sec
• Parallel merge sort: 21sec
• Sequential stream: 95sec
• Parallel stream: 104sec
33. Parallelism, is it good or bad?
(example)
• 2 CPU
• Concurrent clients - 1000 queries per second
• Single sequential sort - 2ms
• Single parallel sort - 1ms + sync overhead ~1.2ms
• Less transactions per second with parallel sort
• Parallel algorithms do not always fit well
37. MissionControl
• Cool tool for JVM diagnostics
• Comes with JDK installation (jmc executable
• Now we have 3 similar tools in JDK
– jconsole
– jvisualvm
– jms
38. Future of frameworks
• Type-safe property references in Hibernate-
like query languages
• JUnit, Mockito-like frameworks with method
references
• Event handlers
• Better XML and JSON serializers
• - ….