Giter VIP home page Giter VIP logo

chatterapp's Introduction

Experimental project

This project is a learning exercise. I am experimenting with Rust, Docker, distributed systems and p2p networks.

At the time of writing this readme page, anyone should be able to test this program by cloning the repo and running cargo run chatterapp.

The program will create a floodsub network and discover peers using mdns, it will also listen to input on a terminal and publish two types of messages:

  • For input "A" it will submit a hardcoded string of text with an specific node as the recipient. Currently the recipient is hardcoded and is the same node that is submitting the messages. All nodes will discard this message as it is not meant for them.

  • For any other input, it will submit a hardcoded string of text with no specific node as a recipient, thus, the message will be printed to the terminal.

There is also a rudimentary crud app written with python on this repo, but it is currently not used for this project.

On the long run, this project should become a rudimentary RPC framework running on top of a p2p stack.

As it currently is, there are many problems with how this program was coded and I am confident the serialization and deserialization is both inefficient and not memory-safe.

My next few commits should be focused on:

  • Addressing memory safety.
  • Replacing the serialization process with bebop
  • Adding tests

Further ahead I will:

  • Improve the user interface by either using a CLI utility (like enquirer) or making a web app for the UI.
  • Encrypt RPC in such a way that only the recipient would be able to decrypt them.
  • Maybe also experiment with adding a different discovery service as an alternative to mDNS. I was thinking maybe a leader election algorithm designating an entry-point to the network and then using magicDNS to resolve who is the leader (?)

chatterapp's People

Contributors

dsnvs avatar

Watchers

 avatar

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.