Disributed execution in Appium

Hi Team,
I am able to do Parallel execution in multiple android devices using Testng by creating parallel Tests with different parameter each with different appium server url.
Need your suggestion on how to create distributed appium Framework. I am creating Appium servers at run time and testng.xml also at runtime,

your inputs are much appreciated