5. How hard can it be?
TextText
ExampleExample
TextText
TextText
ExampleExample
StepStep
ExampleExample
Filtering
Filtering
by name
by name
by previous
by previous
Execution
Execution
concurrent
concurrent
conditional
conditional
Reporting
Reporting
console
console
htmlhtml
6. How hard can it be?
Configuration(s)Configuration(s)ResourcesResources
FileSystemFileSystem
“Flow”“Flow”
StateState
CompositionComposition
ErrorsErrors
3 years of specs1, 4 years of specs2
Html output: I suck at html / javascript
Open Source = find people! Clinton -> new design, new CSS
But implementation: ugh…
Simplification / Composition / extension
What about being “pure”
Lots of possibilities
More knowledge
What happened: Success or Failure?
This is eventually looking good and possibly looking fantastic
Simple structure:
But complex execution model -> even not enough separation between declaration and run
And several functionalities on top
- by tag -> read command line
- by previous -> read files
Execution:
- must respect steps!
- must be fully concurrent
Reporting:
- console must flow!
- statistics must be stored
Memory?
Thread pool?
Interested by the Cake Pattern and the ability to “hide” the implementation + Daniel Spiewak presentation on parametrizing it with a Monad
But how far can you go with small functions?
Use an elaborate data structure right away
Process[Task, T] is a stream of Ts produced by a Task
Process1 is like a map or filter operation
A Task is an Error/Future monad stack
Use a for comprehension
Can be a bit tedious to retrofit the code like that
But this is mostly a mechanical transformation
And this provides a benefit
Liberally use the configuration to influence the behaviour of your programming
That’s dependency injection!
Better than I feared
In Scala you need to build a special stack for what you are doing, Reader Writer State won’t work easily
Build your own collection of operators to create values, fromIO, failure,…
Question : can you keep Configuration modular?
Question: how to operate with another stack like Action <-> Task
Use an elaborate data structure right away
Not composable because the fragments are going to be executed twice
Use a Fold to accumulate state
Stacks not too hard to use
Streamz a very powerful model, but very recent library and might need to come up with Folds for additional composition
Being Functional = Honest brings opportunities
- inject anything anywhere
- careful execution model + flatmap == better execution control