Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Cons Environment #34

Open
vitaliihonta opened this issue Mar 18, 2019 · 0 comments
Open

Cons Environment #34

vitaliihonta opened this issue Mar 18, 2019 · 0 comments
Assignees

Comments

@vitaliihonta
Copy link
Collaborator

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant