Implemented resource interface for algorithm resource and add id field to algorithm.