task as client and worker