Giter Club home page Giter Club logo

passerby's Introduction

passerby

Unit tests

Passerby Park gif

๐Ÿงญ Table of contents

๐ŸŒŽ What is Passerby?

Passerby is a peer-to-peer protocol for location-aware resource discovery. Using Passerby, you can find nearby people or resources โ€” or help people find you โ€” without requiring a coordinating central authority.

It's Byzantine fault tolerant* and it supports a full node on mobile devices.

You might use it to build decentralized hyperlocal applications โ€” like food delivery, ride hailing, or online dating. More broadly, our goal is to create the location layer for the decentralized web โ€” that is, a persistent, decentralized, and scalable mechanism for coordinating with peers based on geographic proximity.

๐Ÿ”จ Research emulator

The gif above was captured in Passerby Park โ€” a graphical research emulator for studying the behaviors of Passerby networks.

๐Ÿš€ Quickstart

A good first step is to operationalize Passerby in Passerby Park. This will create a local test network consisting of 10 peers and let you execute protocol functions from any peer's perspective using a browser-based GUI.

# Passerby depends on libsodium for cryptographic primitives
git clone https://github.com/jedisct1/libsodium.js

# Get Passerby and Passerby Park
git clone https://github.com/noahlevenson/passerby
git clone https://github.com/noahlevenson/park

# Configure Passerby
cd passerby
cp default.json passerby.json

# Edit passerby.json and supply the absolute path to libsodium-wrappers.js
# e.g. "/home/user/libsodium.js/dist/modules/libsodium-wrappers.js"

# Install Passerby Park's dependencies
cd park
npm i

# Configure Passerby Park
cd park/server
cp default.json park.json

# Edit park.json and supply the absolute path to Passerby (note the trailing slash)
# e.g. "/home/user/passerby/"

# Start Passerby Park
cd park/server/src
export NODE_PATH=/path/to/libsodium.js/dist/modules
node index.js

Direct your browser to localhost:9000 to load the GUI. Click on any peer to open its command menu.

SEARCH N: Execute a geosearch over N square miles. The GUI will draw a search box (to scale) and highlight peers that are returned by the search function. The search box and peer highlighting are independent functions. In other words, the box represents the ground truth, and the peer highlighting represents the real result of the geosearch operation. This is how we verify the correctness of the distributed algorithms.

MOVE: Move this peer to a new location. Click a second time to select a location on the map.

Click the broom in the upper left corner to clear the current search results.

โœ๏ธ Design goals

Low latency, high frequency updates

Passerby should support decentralized applications in which peer locations change rapidly, like ride hailing.

Mutual offline discovery

If Bob discovers Alice while Alice is experiencing a temporary loss of connectivity, Alice must hear about it when she reconnects โ€” even if at that point, Bob is far away.

Radical portability and zero dependencies

This reference implementation is designed to work in a variety of disparate JavaScript runtimes, including Node.js and Hermes (React Native). Passerby relies only on libsodium for cryptographic primitives.

โ— The asterisk

Passerby is currently in development. It is not production-grade software. Security vulnerabilities are likely to exist, both at the level of protocol design and concrete implementation.

๐Ÿ’พ Technology overview

Our research topics include distributed data structures, space filling curves, and applied cryptography. If that sounds interesting to you, consider becoming a contributor.

Thorough documentation is forthcoming. Until then, here's a guide to our source layout:

Module Description
consensus Byzantine consensus
core math, crypto, logging, cross platform compatibility, elementary data structures
dht distributed hash table
pht distributed trie
protocol protocol logic
psm passerby state machine
repman dynamic replica management
transport transport layer abstraction (reliable UDP or local network simulation)
whoami STUN-based NAT traversal and self-identification

passerby's People

Contributors

noahlevenson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

passerby's Issues

Missing JSONS

2 files are missing passerby.json and park.json in Park file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.