Strategy pattern for DataSink
I propose to change the implementation of the DataSink
class where it is a base class for all various writers such as the load balancing, memory consumption etc. They all share common functions like opening and closing of the file etc. I suggest a strategy pattern.
Benefits:
- less code + simplifies adding new writers
- better code overview
- easier runtime selection of writers