Implementing p2p architecture

first version