# Simplifying algorithms by making parallel/composite-data support universal

**URL:** <https://discourse.vtk.org/t/simplifying-algorithms-by-making-parallel-composite-data-support-universal/4825>\
**Category:** Development\
**Tags:** proposal\
**Created:** [December 15, 2020, 2:46pm UTC](https://discourse.vtk.org/t/simplifying-algorithms-by-making-parallel-composite-data-support-universal/4825 "2020-12-15T14:46:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarshayachit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/utkarshayachit/32/379_2.png) [@utkarshayachit](https://discourse.vtk.org/u/utkarshayachit)\
**Post date:** [December 15, 2020, 2:46pm UTC](https://discourse.vtk.org/t/simplifying-algorithms-by-making-parallel-composite-data-support-universal/4825/1 "2020-12-15T14:46:58Z")

</div>

Time and time again we run into implementations of algorithms of this form:

- a basic implementation A
- a subclass of A, say B, to handle composite-dataset input
- a subclass of B, say C, to handle parallel/distributed use-cases

Such implementations are not only annoying to write but also tedious to debug, and obfuscate the algorithm to a point where it is barely understandable what’s the intent. The XML readers/writers and there PXML counterparts are a good example. Same is true for filters like vtkProbeFilter, vtkCompositeProbeFilter and vtkPProbeFilter. We really need to start moving away from such artificial splits.

To facilitate that, here’s what I believe is needed:

- move parallel controller and basic distributed processing support to a core module. algorithms should be able to depend on global controller without any hesitation.
- allow core filters to use DIY, as appropriate. This makes DIY a core dependency. DIY simplifies composite + distributed processing incredibly easy and hence we should use it as freely as possible too.

Thoughts? What do folks think?
