p2p framework for medusa