This seems to be a common challenge – maybe even common enough to be called a “pattern”!
It was recently discussed in
and references therein.
Perhaps the moderators could merge these threads into one and build a megathread – it might also be a good idea to link it from the tutorial page (see links in the posted thread) which deals with it?