Allow programmer to write same code for different possible environments.
For instance:
val pipeline: DataPipelineT[F, A, Sequential] = ???
val pipeline2: DataPipelineT[F, A, Akka[NotUsed] Or Spark]
.to[Akka[NotUsed]]
.orTo[Spark](condition = ???)
. // some possible heavy operations
This should allow more flexible applicaitons which can be run on different environments depending on some condition (for isntance amount of your data).
Additionaly such implicit derivation should work:
def func[E <: Environment](implicit ev: E Supports CanGroupBy) = ???
func[Akka[NotUsed] Or Spark]
And this shouldn't
def func2[E <: Environment](implicit ev: E Supports CanSort) = ???
func[Akka[NotUsed] Or Spark] // doesn't compile
Allow programmer to write same code for different possible environments. For instance:
This should allow more flexible applicaitons which can be run on different environments depending on some condition (for isntance amount of your data). Additionaly such implicit derivation should work:
And this shouldn't