An Integrated Architecture For Ad Hoc Grids