/p2p-social

Distributed Social Networking System utilizing peer-to-peer, asynchronous communication and blockchain

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

P2P Social

P2P Social is a distributed social networking system built using peer-to-peer networks and blockchain.

Description

Peer-to-Peer (P2P) Social is a social network designed to be distributed across different devices. Through the use of blockchain technology, the social network is able to effectively distribute content across a network in a scalable, decentralized manner ensuring that all content posted by users is secure, immutable and free of any governing body. The network offers many advantages to users including the use of asymmetric encryption technology to validate the integrity of all posts, a secure encrypted private messaging system which facilitates true end-to-end encryption and methods to ensure the availability of the network should any singular node become unavailable.

Administrators of the network are also able to extend the network with new functionalities encompassed as blocks for users using the underlying blockchain, allowing new versions of the social network software to be released and placed in service without requiring the creation of a separate network. The network provides strong decoupling from user-interfaces, allowing developers and users to create and implement novel user-interfaces on platforms such as mobile, desktop and command line.

Core Features

  • Data Privacy & Security
  • Decentralized
  • Extensible
  • Scalable

Architecture & Design

Blockchain

P2P Social utlizes a versatile blockchain architecture for managing the creation of posts and messages within the application. An interface is provided for the creation of blocks which can be implemented within the network.

image

New blocks being published to the blockchain have a unique hash generated which is then signed using the key of the node. This signature and hash is then verified and evaluated by other nodes for acceptance into the blockchain.

image

Networking

Networking within P2P Social is done using Java NIO TCP connections. Upon starting the daemon, each node is assigned a listening socket for handling incoming connections. This socket is then used by other nodes for sending updates regarding new nodes, blockchain changes, etc.

image

Running Application

Clone the gihub repo

$ git clone https://github.com/Abbas-Rizvi/p2p-social.git

Compile java classes

javac -cp "./src/main/:./lib/*" *.java

Run Server UI java class

java -Xmx1028m -cp "./src/main/:./lib/*" network.ServerUI