parakeet-message

A decentralized messaging daemon built on top of the Kademlia routing protocol. IWasActingGIF

Now that you are done laughing…

pictures

image_0 image_1

what is it?
?

So basically, you host a server on your machine that everyone else is going to talk to. If anyone wants to leave messages there, they can. You can also send a request to this server to have it send a message to someone else. Right now there isn’t any security to stop you from sending a message from someone else’s machine but that would be an easy addition into the server code itself. You can poll this server for messages that other people have left, but in the future that may turn into a Websocket live feed. There is also an endpoint you can call that will list all of the users that the server knows about, and it is to those users that you can send messages. Getting into how the Kademlia protocol works is not something I want to do right now, but there are a plethora of resources online about it because it is a very popular, topical, and, most importantly, performant routing protocol. Just google Kademlia protocol and you will find it, if you don’t then you are lying.
?

why?
?‍?

I had just done a project for my Distributed Systems (CSE 40771) course on the Kademlia protocol and wanted to make something else with it. I liked the idea of having what is essentially a decentralized messaging service so that I could use it with my friends. Also, this is the culmination of hours of research and work and I feel like I need to at least put it somewhere. There are most definitely a lot of bugs, but I will certainly keep going through and both remove these bugs and add new features as I see fit, as long as my interest holds.

setup
?

  1. If you already know someone that is on the network, do this before starting the server.
  • export BOOTSTRAP_HOST=
    e.g., export BOOTSTRAP_HOST=127.0.0.1
  • export BOOTSTRAP_PORT=
    e.g., export BOOTSTRAP_PORT=8000
  1. Now, start the server.
  • python3 server.py --port=

client
?

  1. If you want a rudimentary implementation of a messaging client that will use one of these servers, I have provided the client.py program that you can use to do so.
  2. You execute it like so – python3 client.py SERVER_HOST SERVER_PORT – where SERVER_HOST and SERVER_PORT are the host and port of your server respectively. It is to this server that the client will call to send and receive messages. Type help within the fake shell to see a list of commands you can execute (note: there aren’t that many).

GitHub

View Github