A general architecture for grid-based PSE toolkits