Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peerboard (COSC473 Assignment 2)

This application was built to an assignment specification. It relies on a single well-known node to bootstrap the network. However, you can trial the functionality by creating 2 nodes on the same device (which will connect via MDNS). Pay attention to the command line arguments below to avoid starting 2 instances of the same node.

Prerequisites

  • Rust (stable)
  • Cargo

Running the app

clone the app with

git clone https://eng-git.canterbury.ac.nz/rdu46/cosc473-assignment2.git

then build the app via

cd cosc473-assignment2
cargo build

Now you are ready to run the app. You can run the app with

cargo run -- --[ARGUMENTS]

Some people have encountered issues with prost-build on (csse) windows machines. If this happens, try building it on Mac.

Supported arguments:

  • --nickname Specifies the nickname you want to use for this instance (but you can restore the same session with a different nickname)
  • --session This controls which node you want to run. By default, the most recent is rebooted. To run a specific node, specify the session UUID generated (it can be found in logs). Use --session="new" to make a new node
  • --level This controls the logging level used. The main options are error, warn, info, debug, trace. Defaults to info. Log files can be found under the logs directory (but its a bit of a lucky dip).

Using the TUI

  • to send a message hit Enter
  • to subscribe to a new topic use /sub [topic]
  • to unsubscribe from a topic use /unsub [topic]
  • to switch between topics, use the arrow keys ↑/↓ when focused on the sidebar
  • the protocol is added automatically so you shouldn't prefix topics with /peerboard/v1/ etc.
  • All messages persist across restarts but you need to re-subscribe to their topics to see them (except for general)

About

decentralised pubsub chat app built in rust for COSC473 with a TUI. Built using libp2p with gossipsub + kademlia + request-response, etc.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages