Dynamic two-side matching of tasks and resources in wide-area distributed computing environments