L

Lighthouse

A Swift & Secure P2P Media Sharing App. Lighthouse uses WebRTC Data Channels to create multiplexed TCP tunnels to share media. Authenticated users can share media using this.

Created on 13th December 2020

L

Lighthouse

A Swift & Secure P2P Media Sharing App. Lighthouse uses WebRTC Data Channels to create multiplexed TCP tunnels to share media. Authenticated users can share media using this.

The problem Lighthouse solves

Peer-to-peer networks only survive when peers, along with leaching, seed some data back to the network. There is no enforcement on maintaining a seed-leach ratio. Lighthouse solves this by using a concept of coins. Coins are worth the data here. To get coins, the peers can seed back some media to the network. They can use up those coins by consuming some media from the network. After registration, each user gets an initial 100 coins (worth 100mb of data). To earn more, they just seed back media.

The blockchain

To guarantee the integrity of the wallet, and its history, lighthouse uses blockchain.

Each time a file is sent, the blockchain is requested to deduct coins from the receiver, and add the same number to the sender. This is logged in a blockchain. The last record containing the hash of the last-to-last record is serialized into a binary format using

msgpack

, and then hashed to a 512-bit long hash using

blake2b

. The hash is stored along with the current amount of coins and the added/deducted amount against the public key of the peer.

Visit the Github, every repo in there is incorporated in the Lighthouse application.

Do check out our basic presentation of Lighthouse.

Discussion

Builders also viewed

See more projects on Devfolio