Database and Task distribution