reactive streams condensed
TRANSCRIPT
REACT I V E S TR EAMS COND ENS ED
W H A T D O Y O U N E E D T O K N O W A B O U T N E W S T A N D A R D F R O M J V M W O R L D
The Java World was Sad Once…
... Here comes Java 8…
…And new King
Not Enough
STREAMS ARENot LAZY
stream.forEach(x -> {return x * 2;
})
DON’T HAVE API TO REALTIME, DISTRIBUTED PROCESSING
Only Push orPull
stream.forEach(x -> {return x * 2;
})
Iterator i = stream.iterator()while (i.hasNext()){// do execution
}
NOT A SPECIFICATIONNot A Specification
JVM is not just Java
Reactive Streams
Stream Over AsyncBoundaries
FAST PublisherSlow SubscriberProblem
Publisher Subscriber
Demand
Data
RxJavaReactor from SpringSourceAkka StreamsVert.x
INTEROPERATIBILITY
void onSubscribe(Subscription s)
void onNext(T t)
void onComplete()
void onError(Throwable t)
SUBSCRIBER
void subscribe(Subscriber<? super T> s)
PUBLISHER
SUBSCRIPTION
void cancel()
void request(long n)
extendsSubscriber<T>, Publisher<R>
PROCESSOR
Publisher Subscribersubscribe
onSubscribe
request
Subscription
onNext
• All call on subscriber must be async• All call on Subscription must not block• Publisher just create subscription
CONTRACT
• 1.0.0 RC-5 published 10th April• Technology Compatibility Kit Released • JVM Interface• JS Interface• Network Protocols
CURRENT STATE
Thank You!