SlideShare a Scribd company logo
1 of 62
Download to read offline
Nov 17, 2017
IPT – Intellectual
Products & Technologies
What’s New
in Java 9?
Trayan Iliev
tiliev@iproduct.org
http://iproduct.org
Copyright © 2003-2017 IPT - Intellectual
Products & Technologies
2
Trademarks
Oracle®, Java™ and JavaScript™ are trademarks or registered
trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
3
Disclaimer
All information presented in this document and all supplementary
materials and programming code represent only my personal opinion
and current understanding and has not received any endorsement or
approval by IPT - Intellectual Products and Technologies or any third
party. It should not be taken as any kind of advice, and should not be
used for making any kind of decisions with potential commercial impact.
The information and code presented may be incorrect or incomplete. It is
provided "as is", without warranty of any kind, express or implied,
including but not limited to the warranties of merchantability, fitness for a
particular purpose and non-infringement. In no event shall the author or
copyright holders be liable for any claim, damages or other liability,
whether in an action of contract, tort or otherwise, arising from, out of or
in connection with the information, materials or code presented or the
use or other dealings with this information or programming code.
IPT - Intellectual Products & Technologies
http://www.iproduct.org
4
Since 2003 we provide trainings and share skills in
JS/ TypeScript/ Node/ Express/ Socket.IO/ NoSQL/
Angular/ React / Java SE/ EE/ Spring/ REST / SOA:
 Node.js + Express + React + Redux + GraphQL
 Angular + TypeScript + Redux (ngrx) + Progressive WA
 Java EE6/7, Spring, JSF, Portals: Liferay, GateIn
 Reactive IoT with Reactor / RxJava / RxJS
 SOA & Distributed Hypermedia APIs (REST)
 Domain Driven Design & Reactive Microservices
5
Java 9 – GA since September ‘17
 JShell – interactive REPL console
 Modularity – project Jigsaw
 Process API updates – feature-rich process management
 Collection API updates – immutable collections
 Stack-Walking API (JEP 259)
 Reactive Streams, CompletableFuture, Stream API updates
 Async HTTP/2 and WebSocket clients
 ...
Where to Find the Demo Code?
6
Java 9 demos are available @ GitHub:
https://github.com/iproduct/reactive-demos-java-9
Java 9 – New Versioning Scheme
7
 $MAJOR.$MINOR.$SECURITY.$PATCH
 So instead of 1.9.x, now we have Java 9.0.1
JShell – Interactive REPL Console
8
 REPL = Read - Evaluate - Print - Loop
 JShell allows to enter program elements one at a time,
immediately seeing the result and experimenting
 It is ideal for learning the Java language and exploring
unfamiliar code (including Java APIs)
 Provides flexible auto-suggestion, auto-completion,
auto-imports, editing in external editors, saving and
loading script files (including preloading at start time)
 Allows to experiment with Java platform and custom
modules
JShell Syntax
9
jshell [options] [load-files]
Load-files: DEFAULT, PRINTING, JAVASE, custom-script
Options:
 --help, --version
 --feedback normal | verbose | concise | silent
 -Cflag, -Jflag, -Rflag
 --module-path modulepath
 --add-modules module[,module…]
Ex: jshell --module-path ..gitreactive-
demos-java-9modularity-demomodules
--add-modules client,provider,renderer
JShell Commands
[http://cr.openjdk.java.net/~rfield/tutorial/JShellTutorial.html]
10
 jshell> /<tab>
/! /? /drop /edit /env /exit
/help /history /imports /list
/methods /open /reload /reset
/save /set /types /vars
<press tab again to see synopsis>
 jshell> /
 jshell> /l<tab> => jshell> /list
 jshell> /list -<tab> =>
-all -history -start
JShell Commands
11
 Demo
What Modularity Means?
12
 Modularization is the decomposition of a system to set
of highly coherent and loosely coupled modules.
 All the communication between modules is done
through well defined interfaces.
 Modules are artifacts containing code and metadata
describing thee module.
 Each module is uniquely identifiable and ideally
recognizable from compile-time to run-time.
Why Modularity is Important?
13
 Strong encapsulation – separation between public and
private module APIs (e.g. sun.misc.Base64Encoder)
 Well-defined interfaces and interaction protocols
 Explicit module dependencies and library version
management => module graph
 Reliable configuration – no more
NoClassDefFoundError in runtime
 Mitigates the ‘JAR / Classspath hell’ problem
Java 9 Modularity – Project Jigsaw
14
 Reliable configuration – makes easier for developers
to construct and maintain libraries and large apps
 Improved the security and maintainability of Java SE
Platform Implementations, JDK and app libraries
 Enable improved application performance
 Make Java SE Platform / JDK to scale down for use
with small devices and dense cloud deployments
 To achieve these goals, a standard module system
for the Java SE 9 Platform was implemented.
Project Jigsaw – JEPs and JSR
15
 JEPs:
➔
200: Modular JDK
➔
201: Modular Source Code
➔
220: Modular Run-time Images
➔
260: Encapsulate Most Internal APIs
➔
261: Module System
➔
282: jlink: Java Linker
 JSR 376 Java Platform Module System
JDK Modularization
16
Java 9 Modules
17
 Each JAR becomes a module, containing explicit
references to other modules specified in a module
metadata descriptor file called module-info.java
available at the root of the classpath for that JAR.
 Dependencies are available at runtime and are
eagerly resolved before the application is started
module renderer {
requires provider;
exports renderer;
}
module name
requires
exports
Separation of Public & Private APIs
18
 Problem: How to publish the MessageProvider service
interface but to hide the service implementation?
provider.impl
provider
HelloWorldMessageProvider
+ getMessage() : String
<<interface>>
MessageProvider
+ getMessage() : String
<<implements>>
Java 9 Accessibility Options
19
Java 1.1 – 1.8 Java 9
private private
default (package private) default (package private)
protected protected
public public within a module
public to specific modules
public for all modules
Module Definition: module-info.java
20
<open> module <module-name> {
[export <java package> [to <module name>]
[requires [transitive] <module-name>]
[opens <module name> [to <module name]]
[provides <interface> with <implementation>]
[uses <interface>]
}
Demo App: Module Dependencies
21
<<component>>
renderer
<<component>>
provider
<<component>>
client
renderer.implrenderer
client
provider provider.impl
MessageProvider
MessageRenderer
Demo App: Provider Module
22
|-- provider
| |-- bin
| | |-- module-info.class
| | `-- provider
| | |-- MessageProvider.class
| | `-- impl
| | `-- HelloWorldMessageProvider.class
| `-- src
| |-- module-info.java
| `-- provider
| |-- MessageProvider.java
| `-- impl
| `-- HelloWorldMessageProvider.java
Provider Module Code
23
package provider;
public interface MessageProvider {
String getMessage();
}
package provider.impl;
import provider.MessageProvider;
public class HelloWorldMessageProvider
implements MessageProvider {
@Override
public String getMessage() {
return "Hello Java 9 Modularity!!!";
}
}
Provider Module module-info.java
24
module provider {
exports provider;
exports provider.impl;
}
Demo App: Renderer Module
25
`-- renderer
|-- bin
| |-- module-info.class
| `-- renderer
| |-- MessageRenderer.class
| `-- impl
| `-- StandardOutMessageRenderer.class
`-- src
|-- module-info.java
`-- renderer
|-- MessageRenderer.java
`-- impl
`-- StandardOutMessageRenderer.java
Renderer Module Interface
26
package renderer;
import provider.MessageProvider;
public interface MessageRenderer {
void render();
void setMessageProvider(MessageProvider provider);
MessageProvider getMessageProvider();
}
Renderer Module Implementation
27
public class StandardOutMessageRenderer
implements MessageRenderer {
private MessageProvider provider;
@Override
public void render() {
if (provider == null)
throw new RuntimeException("No Provider”);
System.out.println(provider.getMessage());
}
@Override
public void setMessageProvider(MessageProvider
provider) { this.provider = provider; }
...
Renderer Module module-info.java
28
module renderer {
requires provider;
exports renderer;
exports renderer.impl;
}
Demo App: Client Module
29
.
|-- client
| |-- bin
| | |-- client
| | | `-- HelloModularityClient.class
| | `-- module-info.class
| `-- src
| |-- client
| | `-- HelloModularityClient.java
| `-- module-info.java
Client Module Code
30
package client;
import provider.MessageProvider;
import renderer.MessageRenderer;
import provider.impl.HelloWorldMessageProvider;
import renderer.impl.StandardOutMessageRenderer;
public class HelloModularityClient {
public static void main(String[] args) {
MessageProvider provider = new MessageProvider();
MessageRenderer renderer =
new StandardOutMessageRenderer();
renderer.setMessageProvider(provider);
renderer.render();
}
}
Client Module module-info.java
31
import provider.MessageProvider;
import renderer.MessageRenderer;
module client {
requires provider;
requires renderer;
exports client;
}
Separation of Public & Private APIs
32
 Problem: How to publish the MessageProvider service
interface but to hide the service implementation?
 Solution: class ServiceLoader<S>
provider.impl
provider
HelloWorldMessageProvider
+ getMessage() : String
<<interface>>
MessageProvider
+ getMessage() : String
<<implements>>
Provider Module module-info.java
33
module provider {
exports provider;
// exports renderer.impl;
provides provider.MessageProvider
with provider.impl.HelloWorldMessageProvider;
}
Renderer Module module-info.java
34
module renderer {
requires provider;
exports renderer;
// exports renderer.impl;
provides renderer.MessageRenderer with
renderer.impl.StandardOutMessageRenderer;
}
Client Module module-info.java
35
import provider.MessageProvider;
import renderer.MessageRenderer;
module client {
requires provider;
requires renderer;
uses MessageProvider;
uses MessageRenderer;
exports client;
}
Client Module with ServiceLoader I
36
package client;
import java.util.Iterator;
import java.util.ServiceLoader;
import provider.MessageProvider;
import renderer.MessageRenderer;
public class HelloModularityClient {
public static void main(String[] args) {
// MessageProvider provider = new MessageProvider();
ServiceLoader<MessageProvider> loaderProvider =
ServiceLoader.load(MessageProvider.class);
Iterator<MessageProvider> iterProvider =
loaderProvider.iterator();
(-continue on next slide -)
Client Module with ServiceLoader II
37
(- continued -)
if (!iterProvider.hasNext()) throw new
RuntimeException("No MessageProvider!");
MessageProvider provider = iterProvider.next();
ServiceLoader<MessageRenderer> loaderRenderer =
ServiceLoader.load(MessageRenderer.class);
Iterator<MessageRenderer> iterRenderer =
loaderRenderer.iterator();
...
MessageRenderer renderer = iterRenderer.next();
renderer.setMessageProvider(provider);
renderer.render();
}}
Module Artifacts
38
 Modular JAR files – regular JAR files with
module-info.class on top of the classpath:
|-- META-INF
| `-- MANIFEST.MF
|-- module-info.class
`-- provider
|-- MessageProvider.class
`-- impl
`-- HelloWorldMessageProvider.class
 Exploded module directory
 JMOD module format – can include native code
Platform Modules
39
module java.base {
exports java.io;
exports java.lang;
exports java.lang.annotation;
exports java.lang.invoke;
exports java.lang.module;
exports java.lang.ref;
exports java.lang.reflect;
exports java.math;
exports java.net;
...
}
Module Resolution
40
 Module path (--module-path) – different from
classpath, includes platform modules + app modules,
resolved upfront → acyclic module dependency graph
 Reliable configuration – module system ensures that
each dependence is fulfilled exactly by one module
 Each package belongs to exactly one module
 Faster class search – no need to search the entire
classpath
 Implied readability
Example: requires transitive java.logging
Module Types
41
 Named modules – explicitly define module-info
 Unnamed module – if a request is made to load a type
which does not belong to any observable module,
module system will attempt to load it from classpath. It is
assumed that such type belongs to unnamed module.
Unnamed module reads every named module,
exports all its packages, but is not readable by
default by named modules, use: ALL-UNNAMED
 Automatic modules – the name of the module is
derived from the name of jar file implicitly, reads all
modules including unnamed → top-down migration.
Advanced Modules: Reflection
42
 Each class has Class::getModule() method
 Module::getDescriptor() returns a ModuleDescriptor
 Can be built programmatically using
ModuleDescriptor.Builder – e.g.:
ModuleDescriptor descr =
ModuleDescriptor.newModule("org.iproductstats.core")
.requires("java.base")
.exports("org.iproduct.core.clustering")
.exports("org.iproduct.core.stats")
.packages(Set.of("org.iproduct.core.internal"))
.build();
And More ...
43
 ClassLoaders – each module is loaded by exactly one
class loader, but one class loader can load several
modules, and there may be different class loaders for
different modules.
 Layers – can be thought of as resolving modules in
parallel module universes which can have hierarchical
dependencies (parent-child) between them. There is
always initial ModuleLayer called boot layer.
Sophisticated app containers like application servers
may load different versions of library modules / service
providers for each contained app.
Essential Module Tooling
44
 jdeps – allows to obtain crucial information about
module inter-dependencies – e.g:
jdeps -jdkinternals --module-path modules
modules/client.jar
 jlink – produces run-able image containing only used
JDK and application modules (~70 MB) – e.g:
jlink -p "%JAVA_HOME%jmods";modules --add-
modules client --output small-image --bind-
services --launcher start-app=client
--strip-debug –compress=2
 jmod – produces mixed java native code modules
Java 9 Process API Updates
45
 Retrieve PID of Current Process:
long pid = ProcessHandle.current().pid();
 Checking if process is running:
Optional<ProcessHandle> handle = ProcessHandle.of(pid);
boolean isAlive = processHandle.isPresent() &&
processHandle.get().isAlive();
 Retrieving process information
ProcessHandle.Info info = handle.get().info();
System.out.println("CPU time: " +
info.totalCpuDuration().orElse(null));
 Running post-termination code, getting children, etc.
Immutable Collections
46
 List, Set and Map have been added new factory
methods for immutable collections:
 of(...) factory methods for Set and List, one with varargs
parameters.
 of(...) factory methods for Map with key and value
arguments, one with varargs of Entry type
ofEntries(Entry<? extends K, ? extends V>... entries)
 Returned collections are instances of nested types
defined under java.util.ImmutableCollections
Stack-Walking API (JEP 259)
47
 Replaces now deprecated sun.reflect.Reflection with
StackWalker class:
 public <T> T walk(Function<Stream<StackFrame>,T>
function) – traverses the satckframes of the current
thread as stream and applying the given function
 public Class<?> getCallerClass() – returns the invoking
class
Data / Event / Message Streams
48
“Conceptually, a stream is a (potentially never-ending)
flow of data records, and a transformation is an
operation that takes one or more streams as input,
and produces one or more output streams as a
result.”
Apache Flink: Dataflow Programming Model
Reactive Streams Spec.
49
 Reactive Streams – provides standard for
asynchronous stream processing with non-blocking
back pressure.
 Minimal set of interfaces, methods and protocols for
asynchronous data streams
 April 30, 2015: has been released version 1.0.0 of
Reactive Streams for the JVM (Java API,
Specification, TCK and implementation examples)
 Java 9: java.util.concurrent.Flow
Reactive Streams Spec.
50
 Publisher – provider of potentially unbounded number
of sequenced elements, according to Subscriber(s)
demand.
Publisher.subscribe(Subscriber) => onSubscribe onNext*
(onError | onComplete)?
 Subscriber – calls Subscription.request(long) to
receive notifications
 Subscription – one-to-one Subscriber ↔ Publisher,
request data and cancel demand (allow cleanup).
 Processor = Subscriber + Publisher
Futures in Java 8 - I
51
 Future (implemented by FutureTask) – represents the
result of an cancelable asynchronous computation.
Methods are provided to check if the computation is
complete, to wait for its completion, and to retrieve the
result of the computation (blocking till its ready).
 RunnableFuture – a Future that is Runnable.
Successful execution of the run method causes Future
completion, and allows access to its results.
 ScheduledFuture – delayed cancelable action that
returns result. Usually a scheduled future is the result
of scheduling a task with a ScheduledExecutorService
Future Use Example
52
Future<String> future = executor.submit(
new Callable<String>() {
public String call() {
return searchService.findByTags(tags);
}
}
);
DoSomethingOther();
try {
showResult(future.get()); // use future result
} catch (ExecutionException ex) { cleanup(); }
Futures in Java 8 - II
53
 CompletableFuture – a Future that may be explicitly
completed (by setting its value and status), and may
be used as a CompletionStage, supporting dependent
functions and actions that trigger upon its completion.
 CompletionStage – a stage of possibly asynchronous
computation, that is triggered by completion of
previous stage or stages. A stage performs an action
or computes value and completes, triggering next
dependent stages. Computation may be Function
(apply), Consumer (accept), or Runnable (run).
CompletableFuture Example - III
54
try {
System.out.println(results.get(10, TimeUnit.SECONDS));
} catch (ExecutionException | TimeoutException
| InterruptedException e) {
e.printStackTrace();
}
executor.shutdown();
}
// OR just:
System.out.println(results.join());
executor.shutdown();
Which is better?
CompletionStage
55
 Computation may be Function (apply), Consumer
(accept), or Runnable (run) – e.g.:
completionStage.thenApply( x -> x * x )
.thenAccept(System.out::print )
.thenRun( System.out::println )
 Stage computation can be triggered by completion of
1 (then), 2 (combine), or either 1 of 2 (either)
 Functional composition can be applied to stages
themselves instead to their results using compose
 handle & whenComplete – support unconditional
computation – both normal or exceptional triggering
CompletionStages Composition
56
public void testlCompletableFutureComposition() throws
InterruptedException, ExecutionException {
Double priceInEuro = CompletableFuture.supplyAsync(
() -> getStockPrice("GOOGL") )
.thenCombine(CompletableFuture.supplyAsync(
() -> getExchangeRate(USD, EUR)), this::convertPrice)
.exceptionally(throwable -> {
System.out.println("Error: " + throwable.getMessage());
return -1d;
}).get();
System.out.println("GOOGL stock price in Euro: " +
priceInEuro );
}
New in Java 9: CompletableFuture
57
 Executor defaultExecutor()
 CompletableFuture<U> newIncompleteFuture()
 CompletableFuture<T> copy()
 CompletionStage<T> minimalCompletionStage()
 CompletableFuture<T> completeAsync(
Supplier<? extends T> supplier[, Executor executor])
 CompletableFuture<T> orTimeout(
long timeout, TimeUnit unit)
 CompletableFuture<T> completeOnTimeout(
T value, long timeout, TimeUnit unit)
Async HTTP/2 & WebSocket clients
58
 Why HTTP/2?
➔
Header compression and binary encoding
➔
bidirectional communication using push requests
➔
multiplexing within a single TCP connection
➔
long running connections
 module-info.java :
module org.iproduct.demo.profiler.client {
requires java.se;
requires jdk.incubator.httpclient;
requires gson;
exports org.iproduct.demo.profiler.client;
exports org.iproduct.demo.profiler.client.model;
opens org.iproduct.demo.profiler.client.model to gson;
}
Async HTTP/2 Client Example I
59
HttpClient client = HttpClient.newHttpClient();
HttpRequest processesReq = HttpRequest.newBuilder()
.uri(new URI(PROFILER_API_URL + "processes"))
.GET()
.build();
TypeToken<ArrayList<ProcessInfo>> token =
new TypeToken<ArrayList<ProcessInfo>>() {};
Gson gson = new GsonBuilder().create();
Async HTTP/2 Client Example II
60
client.sendAsync(processesReq, HttpResponse.BodyHandler.asString())
.thenApply( (HttpResponse<String> processesStr) -> {
List<ProcessInfo> something =
gson.fromJson(processesStr.body(), token.getType());
return something;
}).thenApply(proc -> {
proc.stream().forEach(System.out::println);
return null;
}).exceptionally((Throwable ex) -> {
System.out.println("Error: " + ex);
return null;
}).thenRun(() -> {System.exit(0);});
Thread.sleep(5000);
More Demos ...
61
Java 9 modules, CompletableFuture,... @ GitHub:
https://github.com/iproduct/reactive-demos-java-9
 modularity-demo – Java 9 modules in action :)
 http2-client – Java 9 modules + HTTP/2 client + GSON
 completable-future-demo – composition, delayed, ...
 flow-demo – custom Flow implementations using CFs
 completable-future-jaxrs-cdi-cxf – async observers, ...
 completable-future-jaxrs-cdi-jersey
Thank’s for Your Attention!
62
Trayan Iliev
CEO of IPT – Intellectual Products
& Technologies
http://iproduct.org/
http://robolearn.org/
https://github.com/iproduct
https://twitter.com/trayaniliev
https://www.facebook.com/IPT.EACAD
https://plus.google.com/+IproductOrg

More Related Content

What's hot

OpenDaylight app development tutorial
OpenDaylight app development tutorialOpenDaylight app development tutorial
OpenDaylight app development tutorialSDN Hub
 
Contributing to JDK Mission Control
Contributing to JDK Mission ControlContributing to JDK Mission Control
Contributing to JDK Mission ControlMarcus Hirt
 
7 New Tools Java Developers Should Know
7 New Tools Java Developers Should Know7 New Tools Java Developers Should Know
7 New Tools Java Developers Should KnowTakipi
 
Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Iulian Pintoiu
 
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan FelchGR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan FelchGR8Conf
 
Contributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 GalaxyContributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 GalaxyJakarta_EE
 
fUML-Driven Performance Analysis through the MOSES Model Library
fUML-Driven Performance Analysisthrough the MOSES Model LibraryfUML-Driven Performance Analysisthrough the MOSES Model Library
fUML-Driven Performance Analysis through the MOSES Model LibraryLuca Berardinelli
 
Indiana University's Advanced Science Gateway Support
Indiana University's Advanced Science Gateway SupportIndiana University's Advanced Science Gateway Support
Indiana University's Advanced Science Gateway Supportmarpierc
 
Let’s go reactive with JAVA
Let’s go reactive with JAVALet’s go reactive with JAVA
Let’s go reactive with JAVATech Triveni
 
23 Top .Net Core Libraries List Every Developer Must Know
23 Top .Net Core Libraries List Every Developer Must Know23 Top .Net Core Libraries List Every Developer Must Know
23 Top .Net Core Libraries List Every Developer Must KnowKaty Slemon
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack ImplementationMert Çalışkan
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesAraf Karsh Hamid
 
Cloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse FoundationCloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse FoundationJakarta_EE
 
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureMicroservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureKelly Goetsch
 
Enterprise Application Architectures by Dr. Indika Kumara
Enterprise Application Architectures by Dr. Indika KumaraEnterprise Application Architectures by Dr. Indika Kumara
Enterprise Application Architectures by Dr. Indika KumaraThejan Wijesinghe
 
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...Pôle Systematic Paris-Region
 
Akash rajguru project report sem VI
Akash rajguru project report sem VIAkash rajguru project report sem VI
Akash rajguru project report sem VIAkash Rajguru
 
Oscon 2011 Practicing Open Science
Oscon 2011 Practicing Open ScienceOscon 2011 Practicing Open Science
Oscon 2011 Practicing Open ScienceMarcus Hanwell
 

What's hot (20)

OpenDaylight app development tutorial
OpenDaylight app development tutorialOpenDaylight app development tutorial
OpenDaylight app development tutorial
 
Contributing to JDK Mission Control
Contributing to JDK Mission ControlContributing to JDK Mission Control
Contributing to JDK Mission Control
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 
7 New Tools Java Developers Should Know
7 New Tools Java Developers Should Know7 New Tools Java Developers Should Know
7 New Tools Java Developers Should Know
 
Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019
 
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan FelchGR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
 
Contributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 GalaxyContributors Guide to the Jakarta EE 10 Galaxy
Contributors Guide to the Jakarta EE 10 Galaxy
 
fUML-Driven Performance Analysis through the MOSES Model Library
fUML-Driven Performance Analysisthrough the MOSES Model LibraryfUML-Driven Performance Analysisthrough the MOSES Model Library
fUML-Driven Performance Analysis through the MOSES Model Library
 
Indiana University's Advanced Science Gateway Support
Indiana University's Advanced Science Gateway SupportIndiana University's Advanced Science Gateway Support
Indiana University's Advanced Science Gateway Support
 
Let’s go reactive with JAVA
Let’s go reactive with JAVALet’s go reactive with JAVA
Let’s go reactive with JAVA
 
23 Top .Net Core Libraries List Every Developer Must Know
23 Top .Net Core Libraries List Every Developer Must Know23 Top .Net Core Libraries List Every Developer Must Know
23 Top .Net Core Libraries List Every Developer Must Know
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack Implementation
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
Cloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse FoundationCloud Native Java: Present and Future at Eclipse Foundation
Cloud Native Java: Present and Future at Eclipse Foundation
 
Shree duth awasthi_cv
Shree duth awasthi_cvShree duth awasthi_cv
Shree duth awasthi_cv
 
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureMicroservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
 
Enterprise Application Architectures by Dr. Indika Kumara
Enterprise Application Architectures by Dr. Indika KumaraEnterprise Application Architectures by Dr. Indika Kumara
Enterprise Application Architectures by Dr. Indika Kumara
 
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
 
Akash rajguru project report sem VI
Akash rajguru project report sem VIAkash rajguru project report sem VI
Akash rajguru project report sem VI
 
Oscon 2011 Practicing Open Science
Oscon 2011 Practicing Open ScienceOscon 2011 Practicing Open Science
Oscon 2011 Practicing Open Science
 

Similar to What's new in java 9?

eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1Rubens Dos Santos Filho
 
Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)miracleindia
 
Prudential Insurance Exp
Prudential Insurance ExpPrudential Insurance Exp
Prudential Insurance ExpAnkit Chohan
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG sessionMani Sarkar
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPIlan Salviano
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0Eric Wendelin
 
Netbeans
NetbeansNetbeans
Netbeansacosdt
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...Jitendra Bafna
 
The Brainify App - JavaFx
The Brainify App - JavaFxThe Brainify App - JavaFx
The Brainify App - JavaFxMohd Shamweel
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKWolfgang Weigend
 
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...Neil Shannon
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The BasicsPhilip Langer
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)Fred Rowe
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-
Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-
Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-Ramu Chinni
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/FluxKeuller Magalhães
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...Fwdays
 

Similar to What's new in java 9? (20)

eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
 
Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)Java training noida hibernate+spring+struts+web services(1)
Java training noida hibernate+spring+struts+web services(1)
 
Prudential Insurance Exp
Prudential Insurance ExpPrudential Insurance Exp
Prudential Insurance Exp
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG session
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SP
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
 
React django
React djangoReact django
React django
 
Netbeans
NetbeansNetbeans
Netbeans
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
 
The Brainify App - JavaFx
The Brainify App - JavaFxThe Brainify App - JavaFx
The Brainify App - JavaFx
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
 
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The Basics
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-
Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-
Ramu_Chinni_Java_Engineer_5.6_Years_CV%2520-
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/Flux
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 

More from Trayan Iliev

Making Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxMaking Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxTrayan Iliev
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorTrayan Iliev
 
Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018 Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018 Trayan Iliev
 
Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)Trayan Iliev
 
Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018Trayan Iliev
 
Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018Trayan Iliev
 
Microservices with Spring 5 Webflux - jProfessionals
Microservices  with Spring 5 Webflux - jProfessionalsMicroservices  with Spring 5 Webflux - jProfessionals
Microservices with Spring 5 Webflux - jProfessionalsTrayan Iliev
 
React HOCs, Context and Observables
React HOCs, Context and ObservablesReact HOCs, Context and Observables
React HOCs, Context and ObservablesTrayan Iliev
 
Reactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring ReactorReactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring ReactorTrayan Iliev
 
Hackathon: “IPTPI and LeJaRo Meet The Real World”
Hackathon: “IPTPI and LeJaRo Meet The Real World”Hackathon: “IPTPI and LeJaRo Meet The Real World”
Hackathon: “IPTPI and LeJaRo Meet The Real World”Trayan Iliev
 
Reactive robotics io_t_2017
Reactive robotics io_t_2017Reactive robotics io_t_2017
Reactive robotics io_t_2017Trayan Iliev
 
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionalsJava & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionalsTrayan Iliev
 
IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016Trayan Iliev
 
New MVC 1.0 JavaEE 8 API
New MVC 1.0 JavaEE 8 APINew MVC 1.0 JavaEE 8 API
New MVC 1.0 JavaEE 8 APITrayan Iliev
 
IPT High Performance Reactive Programming with JAVA 8 and JavaScript
IPT High Performance Reactive Programming with JAVA 8 and JavaScriptIPT High Performance Reactive Programming with JAVA 8 and JavaScript
IPT High Performance Reactive Programming with JAVA 8 and JavaScriptTrayan Iliev
 
IPT Workshops on Java Robotics and IoT
IPT Workshops on Java Robotics and IoTIPT Workshops on Java Robotics and IoT
IPT Workshops on Java Robotics and IoTTrayan Iliev
 
IPT – Java Robotics and IoT
IPT – Java Robotics and IoTIPT – Java Robotics and IoT
IPT – Java Robotics and IoTTrayan Iliev
 
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...Trayan Iliev
 

More from Trayan Iliev (18)

Making Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxMaking Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFlux
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and Ktor
 
Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018 Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018
 
Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)
 
Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018
 
Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018
 
Microservices with Spring 5 Webflux - jProfessionals
Microservices  with Spring 5 Webflux - jProfessionalsMicroservices  with Spring 5 Webflux - jProfessionals
Microservices with Spring 5 Webflux - jProfessionals
 
React HOCs, Context and Observables
React HOCs, Context and ObservablesReact HOCs, Context and Observables
React HOCs, Context and Observables
 
Reactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring ReactorReactive Java Robotics & IoT with Spring Reactor
Reactive Java Robotics & IoT with Spring Reactor
 
Hackathon: “IPTPI and LeJaRo Meet The Real World”
Hackathon: “IPTPI and LeJaRo Meet The Real World”Hackathon: “IPTPI and LeJaRo Meet The Real World”
Hackathon: “IPTPI and LeJaRo Meet The Real World”
 
Reactive robotics io_t_2017
Reactive robotics io_t_2017Reactive robotics io_t_2017
Reactive robotics io_t_2017
 
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionalsJava & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
 
IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016
 
New MVC 1.0 JavaEE 8 API
New MVC 1.0 JavaEE 8 APINew MVC 1.0 JavaEE 8 API
New MVC 1.0 JavaEE 8 API
 
IPT High Performance Reactive Programming with JAVA 8 and JavaScript
IPT High Performance Reactive Programming with JAVA 8 and JavaScriptIPT High Performance Reactive Programming with JAVA 8 and JavaScript
IPT High Performance Reactive Programming with JAVA 8 and JavaScript
 
IPT Workshops on Java Robotics and IoT
IPT Workshops on Java Robotics and IoTIPT Workshops on Java Robotics and IoT
IPT Workshops on Java Robotics and IoT
 
IPT – Java Robotics and IoT
IPT – Java Robotics and IoTIPT – Java Robotics and IoT
IPT – Java Robotics and IoT
 
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 

What's new in java 9?

  • 1. Nov 17, 2017 IPT – Intellectual Products & Technologies What’s New in Java 9? Trayan Iliev tiliev@iproduct.org http://iproduct.org Copyright © 2003-2017 IPT - Intellectual Products & Technologies
  • 2. 2 Trademarks Oracle®, Java™ and JavaScript™ are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
  • 3. 3 Disclaimer All information presented in this document and all supplementary materials and programming code represent only my personal opinion and current understanding and has not received any endorsement or approval by IPT - Intellectual Products and Technologies or any third party. It should not be taken as any kind of advice, and should not be used for making any kind of decisions with potential commercial impact. The information and code presented may be incorrect or incomplete. It is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the information, materials or code presented or the use or other dealings with this information or programming code.
  • 4. IPT - Intellectual Products & Technologies http://www.iproduct.org 4 Since 2003 we provide trainings and share skills in JS/ TypeScript/ Node/ Express/ Socket.IO/ NoSQL/ Angular/ React / Java SE/ EE/ Spring/ REST / SOA:  Node.js + Express + React + Redux + GraphQL  Angular + TypeScript + Redux (ngrx) + Progressive WA  Java EE6/7, Spring, JSF, Portals: Liferay, GateIn  Reactive IoT with Reactor / RxJava / RxJS  SOA & Distributed Hypermedia APIs (REST)  Domain Driven Design & Reactive Microservices
  • 5. 5 Java 9 – GA since September ‘17  JShell – interactive REPL console  Modularity – project Jigsaw  Process API updates – feature-rich process management  Collection API updates – immutable collections  Stack-Walking API (JEP 259)  Reactive Streams, CompletableFuture, Stream API updates  Async HTTP/2 and WebSocket clients  ...
  • 6. Where to Find the Demo Code? 6 Java 9 demos are available @ GitHub: https://github.com/iproduct/reactive-demos-java-9
  • 7. Java 9 – New Versioning Scheme 7  $MAJOR.$MINOR.$SECURITY.$PATCH  So instead of 1.9.x, now we have Java 9.0.1
  • 8. JShell – Interactive REPL Console 8  REPL = Read - Evaluate - Print - Loop  JShell allows to enter program elements one at a time, immediately seeing the result and experimenting  It is ideal for learning the Java language and exploring unfamiliar code (including Java APIs)  Provides flexible auto-suggestion, auto-completion, auto-imports, editing in external editors, saving and loading script files (including preloading at start time)  Allows to experiment with Java platform and custom modules
  • 9. JShell Syntax 9 jshell [options] [load-files] Load-files: DEFAULT, PRINTING, JAVASE, custom-script Options:  --help, --version  --feedback normal | verbose | concise | silent  -Cflag, -Jflag, -Rflag  --module-path modulepath  --add-modules module[,module…] Ex: jshell --module-path ..gitreactive- demos-java-9modularity-demomodules --add-modules client,provider,renderer
  • 10. JShell Commands [http://cr.openjdk.java.net/~rfield/tutorial/JShellTutorial.html] 10  jshell> /<tab> /! /? /drop /edit /env /exit /help /history /imports /list /methods /open /reload /reset /save /set /types /vars <press tab again to see synopsis>  jshell> /  jshell> /l<tab> => jshell> /list  jshell> /list -<tab> => -all -history -start
  • 12. What Modularity Means? 12  Modularization is the decomposition of a system to set of highly coherent and loosely coupled modules.  All the communication between modules is done through well defined interfaces.  Modules are artifacts containing code and metadata describing thee module.  Each module is uniquely identifiable and ideally recognizable from compile-time to run-time.
  • 13. Why Modularity is Important? 13  Strong encapsulation – separation between public and private module APIs (e.g. sun.misc.Base64Encoder)  Well-defined interfaces and interaction protocols  Explicit module dependencies and library version management => module graph  Reliable configuration – no more NoClassDefFoundError in runtime  Mitigates the ‘JAR / Classspath hell’ problem
  • 14. Java 9 Modularity – Project Jigsaw 14  Reliable configuration – makes easier for developers to construct and maintain libraries and large apps  Improved the security and maintainability of Java SE Platform Implementations, JDK and app libraries  Enable improved application performance  Make Java SE Platform / JDK to scale down for use with small devices and dense cloud deployments  To achieve these goals, a standard module system for the Java SE 9 Platform was implemented.
  • 15. Project Jigsaw – JEPs and JSR 15  JEPs: ➔ 200: Modular JDK ➔ 201: Modular Source Code ➔ 220: Modular Run-time Images ➔ 260: Encapsulate Most Internal APIs ➔ 261: Module System ➔ 282: jlink: Java Linker  JSR 376 Java Platform Module System
  • 17. Java 9 Modules 17  Each JAR becomes a module, containing explicit references to other modules specified in a module metadata descriptor file called module-info.java available at the root of the classpath for that JAR.  Dependencies are available at runtime and are eagerly resolved before the application is started module renderer { requires provider; exports renderer; } module name requires exports
  • 18. Separation of Public & Private APIs 18  Problem: How to publish the MessageProvider service interface but to hide the service implementation? provider.impl provider HelloWorldMessageProvider + getMessage() : String <<interface>> MessageProvider + getMessage() : String <<implements>>
  • 19. Java 9 Accessibility Options 19 Java 1.1 – 1.8 Java 9 private private default (package private) default (package private) protected protected public public within a module public to specific modules public for all modules
  • 20. Module Definition: module-info.java 20 <open> module <module-name> { [export <java package> [to <module name>] [requires [transitive] <module-name>] [opens <module name> [to <module name]] [provides <interface> with <implementation>] [uses <interface>] }
  • 21. Demo App: Module Dependencies 21 <<component>> renderer <<component>> provider <<component>> client renderer.implrenderer client provider provider.impl MessageProvider MessageRenderer
  • 22. Demo App: Provider Module 22 |-- provider | |-- bin | | |-- module-info.class | | `-- provider | | |-- MessageProvider.class | | `-- impl | | `-- HelloWorldMessageProvider.class | `-- src | |-- module-info.java | `-- provider | |-- MessageProvider.java | `-- impl | `-- HelloWorldMessageProvider.java
  • 23. Provider Module Code 23 package provider; public interface MessageProvider { String getMessage(); } package provider.impl; import provider.MessageProvider; public class HelloWorldMessageProvider implements MessageProvider { @Override public String getMessage() { return "Hello Java 9 Modularity!!!"; } }
  • 24. Provider Module module-info.java 24 module provider { exports provider; exports provider.impl; }
  • 25. Demo App: Renderer Module 25 `-- renderer |-- bin | |-- module-info.class | `-- renderer | |-- MessageRenderer.class | `-- impl | `-- StandardOutMessageRenderer.class `-- src |-- module-info.java `-- renderer |-- MessageRenderer.java `-- impl `-- StandardOutMessageRenderer.java
  • 26. Renderer Module Interface 26 package renderer; import provider.MessageProvider; public interface MessageRenderer { void render(); void setMessageProvider(MessageProvider provider); MessageProvider getMessageProvider(); }
  • 27. Renderer Module Implementation 27 public class StandardOutMessageRenderer implements MessageRenderer { private MessageProvider provider; @Override public void render() { if (provider == null) throw new RuntimeException("No Provider”); System.out.println(provider.getMessage()); } @Override public void setMessageProvider(MessageProvider provider) { this.provider = provider; } ...
  • 28. Renderer Module module-info.java 28 module renderer { requires provider; exports renderer; exports renderer.impl; }
  • 29. Demo App: Client Module 29 . |-- client | |-- bin | | |-- client | | | `-- HelloModularityClient.class | | `-- module-info.class | `-- src | |-- client | | `-- HelloModularityClient.java | `-- module-info.java
  • 30. Client Module Code 30 package client; import provider.MessageProvider; import renderer.MessageRenderer; import provider.impl.HelloWorldMessageProvider; import renderer.impl.StandardOutMessageRenderer; public class HelloModularityClient { public static void main(String[] args) { MessageProvider provider = new MessageProvider(); MessageRenderer renderer = new StandardOutMessageRenderer(); renderer.setMessageProvider(provider); renderer.render(); } }
  • 31. Client Module module-info.java 31 import provider.MessageProvider; import renderer.MessageRenderer; module client { requires provider; requires renderer; exports client; }
  • 32. Separation of Public & Private APIs 32  Problem: How to publish the MessageProvider service interface but to hide the service implementation?  Solution: class ServiceLoader<S> provider.impl provider HelloWorldMessageProvider + getMessage() : String <<interface>> MessageProvider + getMessage() : String <<implements>>
  • 33. Provider Module module-info.java 33 module provider { exports provider; // exports renderer.impl; provides provider.MessageProvider with provider.impl.HelloWorldMessageProvider; }
  • 34. Renderer Module module-info.java 34 module renderer { requires provider; exports renderer; // exports renderer.impl; provides renderer.MessageRenderer with renderer.impl.StandardOutMessageRenderer; }
  • 35. Client Module module-info.java 35 import provider.MessageProvider; import renderer.MessageRenderer; module client { requires provider; requires renderer; uses MessageProvider; uses MessageRenderer; exports client; }
  • 36. Client Module with ServiceLoader I 36 package client; import java.util.Iterator; import java.util.ServiceLoader; import provider.MessageProvider; import renderer.MessageRenderer; public class HelloModularityClient { public static void main(String[] args) { // MessageProvider provider = new MessageProvider(); ServiceLoader<MessageProvider> loaderProvider = ServiceLoader.load(MessageProvider.class); Iterator<MessageProvider> iterProvider = loaderProvider.iterator(); (-continue on next slide -)
  • 37. Client Module with ServiceLoader II 37 (- continued -) if (!iterProvider.hasNext()) throw new RuntimeException("No MessageProvider!"); MessageProvider provider = iterProvider.next(); ServiceLoader<MessageRenderer> loaderRenderer = ServiceLoader.load(MessageRenderer.class); Iterator<MessageRenderer> iterRenderer = loaderRenderer.iterator(); ... MessageRenderer renderer = iterRenderer.next(); renderer.setMessageProvider(provider); renderer.render(); }}
  • 38. Module Artifacts 38  Modular JAR files – regular JAR files with module-info.class on top of the classpath: |-- META-INF | `-- MANIFEST.MF |-- module-info.class `-- provider |-- MessageProvider.class `-- impl `-- HelloWorldMessageProvider.class  Exploded module directory  JMOD module format – can include native code
  • 39. Platform Modules 39 module java.base { exports java.io; exports java.lang; exports java.lang.annotation; exports java.lang.invoke; exports java.lang.module; exports java.lang.ref; exports java.lang.reflect; exports java.math; exports java.net; ... }
  • 40. Module Resolution 40  Module path (--module-path) – different from classpath, includes platform modules + app modules, resolved upfront → acyclic module dependency graph  Reliable configuration – module system ensures that each dependence is fulfilled exactly by one module  Each package belongs to exactly one module  Faster class search – no need to search the entire classpath  Implied readability Example: requires transitive java.logging
  • 41. Module Types 41  Named modules – explicitly define module-info  Unnamed module – if a request is made to load a type which does not belong to any observable module, module system will attempt to load it from classpath. It is assumed that such type belongs to unnamed module. Unnamed module reads every named module, exports all its packages, but is not readable by default by named modules, use: ALL-UNNAMED  Automatic modules – the name of the module is derived from the name of jar file implicitly, reads all modules including unnamed → top-down migration.
  • 42. Advanced Modules: Reflection 42  Each class has Class::getModule() method  Module::getDescriptor() returns a ModuleDescriptor  Can be built programmatically using ModuleDescriptor.Builder – e.g.: ModuleDescriptor descr = ModuleDescriptor.newModule("org.iproductstats.core") .requires("java.base") .exports("org.iproduct.core.clustering") .exports("org.iproduct.core.stats") .packages(Set.of("org.iproduct.core.internal")) .build();
  • 43. And More ... 43  ClassLoaders – each module is loaded by exactly one class loader, but one class loader can load several modules, and there may be different class loaders for different modules.  Layers – can be thought of as resolving modules in parallel module universes which can have hierarchical dependencies (parent-child) between them. There is always initial ModuleLayer called boot layer. Sophisticated app containers like application servers may load different versions of library modules / service providers for each contained app.
  • 44. Essential Module Tooling 44  jdeps – allows to obtain crucial information about module inter-dependencies – e.g: jdeps -jdkinternals --module-path modules modules/client.jar  jlink – produces run-able image containing only used JDK and application modules (~70 MB) – e.g: jlink -p "%JAVA_HOME%jmods";modules --add- modules client --output small-image --bind- services --launcher start-app=client --strip-debug –compress=2  jmod – produces mixed java native code modules
  • 45. Java 9 Process API Updates 45  Retrieve PID of Current Process: long pid = ProcessHandle.current().pid();  Checking if process is running: Optional<ProcessHandle> handle = ProcessHandle.of(pid); boolean isAlive = processHandle.isPresent() && processHandle.get().isAlive();  Retrieving process information ProcessHandle.Info info = handle.get().info(); System.out.println("CPU time: " + info.totalCpuDuration().orElse(null));  Running post-termination code, getting children, etc.
  • 46. Immutable Collections 46  List, Set and Map have been added new factory methods for immutable collections:  of(...) factory methods for Set and List, one with varargs parameters.  of(...) factory methods for Map with key and value arguments, one with varargs of Entry type ofEntries(Entry<? extends K, ? extends V>... entries)  Returned collections are instances of nested types defined under java.util.ImmutableCollections
  • 47. Stack-Walking API (JEP 259) 47  Replaces now deprecated sun.reflect.Reflection with StackWalker class:  public <T> T walk(Function<Stream<StackFrame>,T> function) – traverses the satckframes of the current thread as stream and applying the given function  public Class<?> getCallerClass() – returns the invoking class
  • 48. Data / Event / Message Streams 48 “Conceptually, a stream is a (potentially never-ending) flow of data records, and a transformation is an operation that takes one or more streams as input, and produces one or more output streams as a result.” Apache Flink: Dataflow Programming Model
  • 49. Reactive Streams Spec. 49  Reactive Streams – provides standard for asynchronous stream processing with non-blocking back pressure.  Minimal set of interfaces, methods and protocols for asynchronous data streams  April 30, 2015: has been released version 1.0.0 of Reactive Streams for the JVM (Java API, Specification, TCK and implementation examples)  Java 9: java.util.concurrent.Flow
  • 50. Reactive Streams Spec. 50  Publisher – provider of potentially unbounded number of sequenced elements, according to Subscriber(s) demand. Publisher.subscribe(Subscriber) => onSubscribe onNext* (onError | onComplete)?  Subscriber – calls Subscription.request(long) to receive notifications  Subscription – one-to-one Subscriber ↔ Publisher, request data and cancel demand (allow cleanup).  Processor = Subscriber + Publisher
  • 51. Futures in Java 8 - I 51  Future (implemented by FutureTask) – represents the result of an cancelable asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation (blocking till its ready).  RunnableFuture – a Future that is Runnable. Successful execution of the run method causes Future completion, and allows access to its results.  ScheduledFuture – delayed cancelable action that returns result. Usually a scheduled future is the result of scheduling a task with a ScheduledExecutorService
  • 52. Future Use Example 52 Future<String> future = executor.submit( new Callable<String>() { public String call() { return searchService.findByTags(tags); } } ); DoSomethingOther(); try { showResult(future.get()); // use future result } catch (ExecutionException ex) { cleanup(); }
  • 53. Futures in Java 8 - II 53  CompletableFuture – a Future that may be explicitly completed (by setting its value and status), and may be used as a CompletionStage, supporting dependent functions and actions that trigger upon its completion.  CompletionStage – a stage of possibly asynchronous computation, that is triggered by completion of previous stage or stages. A stage performs an action or computes value and completes, triggering next dependent stages. Computation may be Function (apply), Consumer (accept), or Runnable (run).
  • 54. CompletableFuture Example - III 54 try { System.out.println(results.get(10, TimeUnit.SECONDS)); } catch (ExecutionException | TimeoutException | InterruptedException e) { e.printStackTrace(); } executor.shutdown(); } // OR just: System.out.println(results.join()); executor.shutdown(); Which is better?
  • 55. CompletionStage 55  Computation may be Function (apply), Consumer (accept), or Runnable (run) – e.g.: completionStage.thenApply( x -> x * x ) .thenAccept(System.out::print ) .thenRun( System.out::println )  Stage computation can be triggered by completion of 1 (then), 2 (combine), or either 1 of 2 (either)  Functional composition can be applied to stages themselves instead to their results using compose  handle & whenComplete – support unconditional computation – both normal or exceptional triggering
  • 56. CompletionStages Composition 56 public void testlCompletableFutureComposition() throws InterruptedException, ExecutionException { Double priceInEuro = CompletableFuture.supplyAsync( () -> getStockPrice("GOOGL") ) .thenCombine(CompletableFuture.supplyAsync( () -> getExchangeRate(USD, EUR)), this::convertPrice) .exceptionally(throwable -> { System.out.println("Error: " + throwable.getMessage()); return -1d; }).get(); System.out.println("GOOGL stock price in Euro: " + priceInEuro ); }
  • 57. New in Java 9: CompletableFuture 57  Executor defaultExecutor()  CompletableFuture<U> newIncompleteFuture()  CompletableFuture<T> copy()  CompletionStage<T> minimalCompletionStage()  CompletableFuture<T> completeAsync( Supplier<? extends T> supplier[, Executor executor])  CompletableFuture<T> orTimeout( long timeout, TimeUnit unit)  CompletableFuture<T> completeOnTimeout( T value, long timeout, TimeUnit unit)
  • 58. Async HTTP/2 & WebSocket clients 58  Why HTTP/2? ➔ Header compression and binary encoding ➔ bidirectional communication using push requests ➔ multiplexing within a single TCP connection ➔ long running connections  module-info.java : module org.iproduct.demo.profiler.client { requires java.se; requires jdk.incubator.httpclient; requires gson; exports org.iproduct.demo.profiler.client; exports org.iproduct.demo.profiler.client.model; opens org.iproduct.demo.profiler.client.model to gson; }
  • 59. Async HTTP/2 Client Example I 59 HttpClient client = HttpClient.newHttpClient(); HttpRequest processesReq = HttpRequest.newBuilder() .uri(new URI(PROFILER_API_URL + "processes")) .GET() .build(); TypeToken<ArrayList<ProcessInfo>> token = new TypeToken<ArrayList<ProcessInfo>>() {}; Gson gson = new GsonBuilder().create();
  • 60. Async HTTP/2 Client Example II 60 client.sendAsync(processesReq, HttpResponse.BodyHandler.asString()) .thenApply( (HttpResponse<String> processesStr) -> { List<ProcessInfo> something = gson.fromJson(processesStr.body(), token.getType()); return something; }).thenApply(proc -> { proc.stream().forEach(System.out::println); return null; }).exceptionally((Throwable ex) -> { System.out.println("Error: " + ex); return null; }).thenRun(() -> {System.exit(0);}); Thread.sleep(5000);
  • 61. More Demos ... 61 Java 9 modules, CompletableFuture,... @ GitHub: https://github.com/iproduct/reactive-demos-java-9  modularity-demo – Java 9 modules in action :)  http2-client – Java 9 modules + HTTP/2 client + GSON  completable-future-demo – composition, delayed, ...  flow-demo – custom Flow implementations using CFs  completable-future-jaxrs-cdi-cxf – async observers, ...  completable-future-jaxrs-cdi-jersey
  • 62. Thank’s for Your Attention! 62 Trayan Iliev CEO of IPT – Intellectual Products & Technologies http://iproduct.org/ http://robolearn.org/ https://github.com/iproduct https://twitter.com/trayaniliev https://www.facebook.com/IPT.EACAD https://plus.google.com/+IproductOrg