Supercharged java 8 : with cyclops-react
-
Upload
john-mcclean -
Category
Technology
-
view
5.516 -
download
1
Transcript of Supercharged java 8 : with cyclops-react
SuperchargedJava 8
“Create a platform that offers the power as Scala, but as easy to use as Java.
“Extend the JDKReuse JDK InterfacesSupport reactive-streamsBuild cross-library abstractions
1reactive-streams
A standard for interoperability
“Provides a mechanism for integrating data publishers and subscribers.All cyclops-react data structures support reactive-streams.
Cross Project Example
2Collection Extensions
Extend the JDK
“Provide a more powerful stream-like interface into Java Collections.
Transform a Java List
Transform ListX
Group a SetX
Schedule Work
3Persistent Collection Extensions
Extend the JDK & pCollections
“Persistent collections are efficient immutable collections. New versions are created with plus / minus ops.
Add to a List
(and some other stuff)
Remove from a List
4ReactiveSeq
Extend the JDK, support reactive-streams
“A powerful engine for sequential Streaming. Implements reactive-streams, supports asynchronous streaming.
ForEachX
Generator sequence
5Stream Source
Extend the JDK, support reactive-streams
“An engine for pushing data into Streams.
Pushing to a Stream
6FutureStreams
Extend the JDK, support reactive-streams
“Asynchronous streaming - perfect for I/O.
Concurrent I/O
Why?
7Data Types
More power to your elbow
EvalLazy or immediate evaluation
Tail recursive
MaybeLazy evaluation
Tail recursive
Applicative or monad
XoreXclusive Or
Useful for validation
8Pattern
Matching
Exhaustive option checking
“Objects have a composition structure (an algebra!)Pattern matching occurs against that structure.
Visitor
Matchables
Predicates
9Transformers
Robots in disguise!
“Transformers allow nested objects to be manipulated.E.g. A stream of lists can be manipulated by a List Transformer as if it were just a single List.
Nested List
ListT
Thanks!
Any questions?You can find me at @cyclops_aol & [email protected]