41
Supercharged Java 8

Supercharged java 8 : with cyclops-react

Embed Size (px)

Citation preview

Page 1: Supercharged java 8 : with cyclops-react

SuperchargedJava 8

Page 2: Supercharged java 8 : with cyclops-react

“Create a platform that offers the power as Scala, but as easy to use as Java.

Page 3: Supercharged java 8 : with cyclops-react

“Extend the JDKReuse JDK InterfacesSupport reactive-streamsBuild cross-library abstractions

Page 4: Supercharged java 8 : with cyclops-react

1reactive-streams

A standard for interoperability

Page 5: Supercharged java 8 : with cyclops-react

“Provides a mechanism for integrating data publishers and subscribers.All cyclops-react data structures support reactive-streams.

Page 6: Supercharged java 8 : with cyclops-react

Cross Project Example

Page 7: Supercharged java 8 : with cyclops-react

2Collection Extensions

Extend the JDK

Page 8: Supercharged java 8 : with cyclops-react

“Provide a more powerful stream-like interface into Java Collections.

Page 9: Supercharged java 8 : with cyclops-react

Transform a Java List

Page 10: Supercharged java 8 : with cyclops-react

Transform ListX

Page 11: Supercharged java 8 : with cyclops-react

Group a SetX

Page 12: Supercharged java 8 : with cyclops-react

Schedule Work

Page 13: Supercharged java 8 : with cyclops-react

3Persistent Collection Extensions

Extend the JDK & pCollections

Page 14: Supercharged java 8 : with cyclops-react

“Persistent collections are efficient immutable collections. New versions are created with plus / minus ops.

Page 15: Supercharged java 8 : with cyclops-react

Add to a List

(and some other stuff)

Page 16: Supercharged java 8 : with cyclops-react

Remove from a List

Page 17: Supercharged java 8 : with cyclops-react

4ReactiveSeq

Extend the JDK, support reactive-streams

Page 18: Supercharged java 8 : with cyclops-react

“A powerful engine for sequential Streaming. Implements reactive-streams, supports asynchronous streaming.

Page 19: Supercharged java 8 : with cyclops-react

ForEachX

Page 20: Supercharged java 8 : with cyclops-react

Generator sequence

Page 21: Supercharged java 8 : with cyclops-react

5Stream Source

Extend the JDK, support reactive-streams

Page 22: Supercharged java 8 : with cyclops-react

“An engine for pushing data into Streams.

Page 23: Supercharged java 8 : with cyclops-react

Pushing to a Stream

Page 24: Supercharged java 8 : with cyclops-react

6FutureStreams

Extend the JDK, support reactive-streams

Page 25: Supercharged java 8 : with cyclops-react

“Asynchronous streaming - perfect for I/O.

Page 26: Supercharged java 8 : with cyclops-react

Concurrent I/O

Page 27: Supercharged java 8 : with cyclops-react

Why?

Page 28: Supercharged java 8 : with cyclops-react

7Data Types

More power to your elbow

Page 29: Supercharged java 8 : with cyclops-react

EvalLazy or immediate evaluation

Tail recursive

Page 30: Supercharged java 8 : with cyclops-react

MaybeLazy evaluation

Tail recursive

Applicative or monad

Page 31: Supercharged java 8 : with cyclops-react

XoreXclusive Or

Useful for validation

Page 32: Supercharged java 8 : with cyclops-react

8Pattern

Matching

Exhaustive option checking

Page 33: Supercharged java 8 : with cyclops-react

“Objects have a composition structure (an algebra!)Pattern matching occurs against that structure.

Page 34: Supercharged java 8 : with cyclops-react

Visitor

Page 35: Supercharged java 8 : with cyclops-react

Matchables

Page 36: Supercharged java 8 : with cyclops-react

Predicates

Page 37: Supercharged java 8 : with cyclops-react

9Transformers

Robots in disguise!

Page 38: Supercharged java 8 : with cyclops-react

“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.

Page 39: Supercharged java 8 : with cyclops-react

Nested List

Page 40: Supercharged java 8 : with cyclops-react

ListT

Page 41: Supercharged java 8 : with cyclops-react

Thanks!

Any questions?You can find me at @cyclops_aol & [email protected]