LLC u Interested in open-source, cloud and technology evangelism u Experienced in various Full stack technologies (UI to backend with DevOps added latest in armory) u Technical conference and meetup junkie u Open source contributor to various open source and Apache products (eg: Hystrix, Spinakker, etc.) u Reviewer in various JSRs u President, founder and member of various organizations/groups • Sunnyvale Java User Group • San Francisco Java User Group • Google Developer Group (SF Edition) • Java Community Program u Twitter: • https://twitter.com/mukteshkrmishra u Linked-in • https://www.linkedin.com/in/mukteshkrmishra/
playing with JDK 10 EA releases. u We are going to walk through 10 JDK 10 features * which could be game changer for developers. * Disclaimer: Please note for every release these features are tracked through either Java Enhancement Process (JEP) or Java Community Process (JCP) and some of these features can be discarded in final version (GA).
has evolved as an eco system rather than a programming language with usage in light weight systems to doing heavy lifting of batch processing in distributed systems. u We all know Java has gone now into most discussed 6 months release cycles with Java 10 is already knocking the door and Java 11 is getting ready for September release. u Finally, wait is over and Java 10 (JDK10) is scheduled for coming in March for general availability. However as a member of Java review community, I got my hands dirty on early releases (EA). Although there are around 149 JEPs/JSRs are going to be part of JDK 10, however based on my opinion these features are going to be game changers (especially for developers*):
Software. It has changed the paradigms of Software development to deployment. There are various container solutions available in the market docker, rocker, DCOS and many more) which are suitable for various usages. u With JDK 10 release Java is going to be self aware whether it is running inside a container or on a host. u New JVM options for container to for controlling Memory and CPU settings. Both options will be used for configuring JVM inside container so that it takes Max Heap size from Linux CGroup: u XX:-UseContainerSupport ( to allow the container support to be disabled. Default : True ie: Enabled) u -XX:+UseCGroupMemoryLimitForHeap (to opt-in to using the value in /sys/fs/cgroup/memory/memory.limit_in_bytes as the value for phys_mem) u -XX:ActiveProcessorCount=xx (this allows the number of CPUs to be overridden. This flag will be honored even if UseContainerSupport is not enabled) u -XX:+UnlockExperimentalVMOptions (enables experimental VM options supported for containers)
variable by enhancing type inference in other words declare variables without defining the associated type. u So this becomes legal in Java 10: u var myList = new ArrayList<String>(); u var myStream = list.stream(); u This will be limited to local variables and indexes in loop. u This will not be available for method formals, constructor formals, method return types, fields, catch formals, or any other kind of variable declaration.
upgrade has been added to collections. New methods toUnmodifiableList, toUnmodifiableSet, and toUnmodifiableMapwere added to the Collectors class in the Stream package, allowing the elements of a Stream to be collected into an unmodifiable collection.
API): u Through this JDL developers are trying to expose VM functionalities via API. This can be implemented via: u Graal : The Dynamic compiler u Truffle: For implementing languages which uses Graal as compilier u SubstrateVM: to implement Ahead of time compilation of Java applications leveraging Graal u Graal SDK : API collection for Graal VM
Java since a long time and used for lot of benefits such as improving JVM start up performance and reducing memory by sharing same data between different Java process. u However it has been enhanced to a new level in JDK 10 by allowing the built-in system class loader, the built-in platform class loader, and custom class loaders to load archived classes. Earlier, it was restricted to the bootstrap class loader only. u -XX:+UseAppCDS will allow all class loaders to share data u Also it can be turn off by allowing only specified set of classes to be archived. It can be achieved by turning off entire sharing and only enabling selected sharing.
(part of JDK) contains a set of root certs. Currently it comes empty which is why configuring security protocols (such as TLS) becomes a nightmare. With JDK 10 it will provide a default set of root certification certificates in JDK
collection is going to be improved a lot. u Parallel full garbage collection for G! garbage collector: u G1 was made default GC in JDK 9 and now it is becoming more powerful by allowing full GC parallel. u Garbage collector interface has been added in JDK which will enable users to configure alternative garbage collectors.
to allocate JVM heap onto multiple devices u This is a WIP but will enable large applications such as big data applications to run in multiple and heaps. As of now it is not fully decided what will stay in DRAM and what will go in alternate memory location.
lot of efficiency in concurrent code by allowing execution of a callback on threads without performing a global VM safe point. u This will make it easy and cheaper to stop individual threads also improving VM latency since it has to spend less efforts in querying thread states in global VM.
u This will allow develops to defines flat data types ie: reference free data types in Heap. u This will result in reduced memory usage and increased locality.
going to start a series of improvements in a frequent release cycle. The core areas where JDKs roadmap is more focused and committed is containerization and optimization. With a new version coming up in every 6 month we will see a series of improvements in JDK over a course of period. However, I would encourage all of you to go and try out (JDK10) and check all these features by youself. Please note for every release these features are tracked through either Java Enhancement Process (JEP) or Java Community Process (JCP) and some of these features can be discarded in final version (GA).