Implementation of resource discovery mechanisms on peersim: Enabling up to one million nodes P2P simulation