Inspiration

Communication clients like Discord face increasing centralization and control which limits user privacy and freedom. We sought to make a decentralized, easy-to-use communication platform for all.

When services no longer serve their users, sometimes the users must "reinvent the wheel" in a way that benefits them!

What it does

Sporesong creates decentralized networks of servers, clients, and proxies to join them together. Each network can be hosted by users and customized to their desires, and only the proxy host has to deal with network configuration.

How we built it

Our implementation is in Python, particularly making use of Asyncio, Cryptography.io, and Websockets libraries to accomplish our goal. Our first hours of the Hackathon were spent solidifying the communication protocol definitions that we would be following. We put significant thought into the structure here which made our implementation a breeze. We were then on to library packages that would be used across all three types of entity in our network. The goal was easy to use, object-oriented, and nicely packaged functions for data definitions, encryption, and rx/tx. Last (and by far the shortest) has been actually implementing the server, client, and proxy entities. Much of the server and client code is similar, with both of them acting as TCP clients to the proxy. The server uses a Postgresql database for storage and querying of messages and the client has a more polished UI.

Challenges we ran into

We ran into three major challenges. The first was the classic dependency hell, where we needed the latest development version of Cryptography.io to accomplish the key-pair security method we wanted to implement. We also ran into challenges understanding and navigating asynchronous computation in Python using Asyncio to implement our fundamental network approach. Lastly, we ran into issues with the network itself, learning how to use socket programming and make computers communicate with each other.

Accomplishments that we're proud of

We're super proud of our modular and expandable protocol design. While our implementation is the MVP of it, there's so much room to grow. I know I've learned more than I could have imaged about network design and TCP client handling which I'm super excited to apply in other projects. It feels really good to have struggled with something so difficult and found some meaningful success. Even if we don't have a super fancy GUI or extra features, we have a basic framework that is easily expanded upon with all of the hard work done.

What we learned

We have gotten to delve deep into the realm of network connection and their unique nature when working with many many at once. The change in mindset when shifting to asynchronous tasks is significant, and super applicable to other networking application! One of my favorite learning aspects of this project, however, is the process of defining a protocol exactly how we want it. Balancing on the line of how much is controlled by our definition versus what should be implementation defined has been an exercise in scope evaluation, operations planning, and conceptualization of an system of interacting components.

What's next for Sporesong.org

One of our primary goals while implementing the client, server, and proxy according to our spec was that other implementations could be dropped in with minimal effort. This means someone could write a rust proxy that interfaces with the same clients and servers, or there could be a rainbow of different implementations all on the same network. There is significant room for a fully featured client that manages Authorization over different sessions for one "account", a higher performance proxy that can actually thread (darn Python GIL), and servers that utilize our message tags for any number of extras like channels, permissions, additional encryption, file/image storage, and more! Our entire system is designed with modularity and additions in mind. The protocol could easily be expanding to define routes for voice, video, or anything else you can dream of! Personally, I want to implement a fully featured client and begin hosting of an official proxy. I fully intend on working to move my own communication to sporesong!

Built With

Share this project:

Updates