GCAPM: A Generic Context-Aware Model in Peer-to-Peer Environment