Merge Dot2 and Dot algorithms

Merge Dot and Dot2 and let the user select the blocking/non-blocking version of the interaction.