introduction to cyclops-react

55
AOL’s return to Open Source and

Upload: john-mcclean

Post on 16-Apr-2017

555 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Introduction to cyclops-react

AOL’s return to Open Source and

Page 2: Introduction to cyclops-react

Java 8 cambrian explosion

Page 3: Introduction to cyclops-react

Inspiration

Page 4: Introduction to cyclops-react

JDK Libraries

Page 5: Introduction to cyclops-react

Unify the JDK

Page 6: Introduction to cyclops-react

Stream Transform

JDK

Page 7: Introduction to cyclops-react

Optional Transform

JDK

Page 8: Introduction to cyclops-react

CompletableFuture Transform

JDK

Page 9: Introduction to cyclops-react

List Transform

JDK

Page 10: Introduction to cyclops-react

FutureW Transform

cycl

ops-

reac

t

Page 11: Introduction to cyclops-react

Functor

cycl

ops-

reac

t

Page 12: Introduction to cyclops-react

Implement Functor

cycl

ops-

reac

t

Page 13: Introduction to cyclops-react

Functor Transform

cycl

ops-

reac

t

Page 14: Introduction to cyclops-react

ListX Transform

cycl

ops-

reac

t

Page 15: Introduction to cyclops-react

JDK Type Extended TypeStream ReactiveSeq

LazyFutureStream

Optional Maybe

CompletableFuture FutureW

List ListX, PStackX, PVectorX

Set, SortedSet SetX, SortedSetX, PSetX, POrderedSetX

Any class with ‘map’ AnyM

impl

emen

ts

Func

tor

Page 16: Introduction to cyclops-react

Why does this matter?

Page 17: Introduction to cyclops-react

Nested Stream

Page 18: Introduction to cyclops-react

For Comprehension

Page 19: Introduction to cyclops-react

Reactor Comprehension

Page 20: Introduction to cyclops-react

Unify the libs

Page 21: Introduction to cyclops-react

reactive-streams

Page 22: Introduction to cyclops-react

reactive-streams flatMap

Reactor

Page 23: Introduction to cyclops-react

reactive-streams flatMap

Reactor cyclops-react

Page 24: Introduction to cyclops-react

reactive-streams flatMap

Reactor cyclops-react

Page 25: Introduction to cyclops-react

reactive-streams Project Reactor

Page 26: Introduction to cyclops-react

Project Reactor amb

reactive-streams Reactor cyclops-react

Page 27: Introduction to cyclops-react

reactive-streams basic interop

Reactor cyclops-react

Page 28: Introduction to cyclops-react

reactive-streams one liner

Reactor cyclops-react

Page 29: Introduction to cyclops-react

reactive-streams support?

reactive-streams Javaslang Functional Java

Page 30: Introduction to cyclops-react

reactive-streams support?

reactive-streams Javaslang Functional Java cyclops-react

Page 31: Introduction to cyclops-react

reactive-streams interop

Reactor cyclops-react Javaslang Functional Java

Page 32: Introduction to cyclops-react

Iterable

Page 33: Introduction to cyclops-react

Iterable flatMap

Javaslang cyclops-react

Page 34: Introduction to cyclops-react

Iterable flatMap

Javaslang cyclops-react

Page 35: Introduction to cyclops-react

Iterable flatMap

Javaslang Functional Java

Page 36: Introduction to cyclops-react

Iterable flatMap

Javaslang Functional Java

Page 37: Introduction to cyclops-react

Abstracting over flatMap

Page 38: Introduction to cyclops-react

AnyM wrap Any Monad

Javaslang cyclops-react Functional Java

Page 39: Introduction to cyclops-react

AnyM flatMap

Javaslang cyclops-react Functional Java

Page 40: Introduction to cyclops-react

flatMap operations

Page 41: Introduction to cyclops-react

sequence : Stream / Future

JDK

Page 42: Introduction to cyclops-react

generic sequence

JDK cyclops-react

Page 43: Introduction to cyclops-react

sequence : Stream / Future

JDK cyclops-react

Page 44: Introduction to cyclops-react

sequence : Stream / Array

JDK Javaslang cyclops-react

Page 45: Introduction to cyclops-react

How far can we take this?

Page 46: Introduction to cyclops-react

Monad Transformers?

Page 47: Introduction to cyclops-react

Nested Lists

Page 48: Introduction to cyclops-react

Double Lists

Page 49: Introduction to cyclops-react

Double Lists via Transformer

Page 50: Introduction to cyclops-react

Back to Stream

Page 51: Introduction to cyclops-react

Sum Lists

Page 52: Introduction to cyclops-react

Sum Lists via Transformer

Page 53: Introduction to cyclops-react

sequence : Stream / List

JDK cyclops-react

Page 54: Introduction to cyclops-react

sequence : Stream / ListT

JDK cyclops-react

Page 55: Introduction to cyclops-react

Thank You.