DEV Community

Cover image for GeoOverlay: Building a Decentralized Internet with Our Own Hands (and Code)
ANDYSAY
ANDYSAY

Posted on

GeoOverlay: Building a Decentralized Internet with Our Own Hands (and Code)

Author: Andrei Leonov

Hello! 👋

My name is Andrei Leonov, and for the past few months I’ve been living in a rather unusual world — the world of overlay networks, where there are no central servers and every node is both a client and a server at the same time.

Today I want to share a project that grew out of a simple but ambitious goal: to build a truly decentralized environment for communication, data exchange, and even website hosting.

Meet GeoOverlay.

🤔 Why Another P2P Network?

It’s a fair question. We already have IPFS, BitTorrent, and numerous blockchain systems. But each of these technologies occupies its own niche.

IPFS is excellent for static content, but less suitable for highly dynamic workloads like chat.

Blockchains solve consensus, but often at the cost of latency and complexity.

I wanted to design a network that is:

Developer-friendly — conceptually as simple as HTTP, but without a central authority.

General-purpose — suitable for chat, blogs, file exchange, or services.

Topology-aware — routing should reflect real network structure to reduce latency.

This led to the idea of embedding node coordinates into identities and using a geometrically meaningful metric for routing.

Welcome to the world of hyperbolic geometry.

🧭 Routing on the Poincaré Disk

At the core of GeoOverlay is not a classic DHT like Kademlia, but hyperbolic routing.

Every node and every key is mapped to a point on the Poincaré disk. This is not just mathematically elegant — it enables deterministic and efficient greedy forwarding.

Greedy Routing

Each node maintains a set of neighbors (closest in hyperbolic space). To locate a key, the request is forwarded to the neighbor closer to the target coordinate.

Simplified example:

Simplified greedy step

def greedy_step(current_node, target_coord):
best_neighbor = None
best_dist = distance(current_node.coord, target_coord)

for neighbor in current_node.neighbors:
    dist = distance(neighbor.coord, target_coord)
    if dist < best_dist:
        best_dist = dist
        best_neighbor = neighbor

return best_neighbor  # None if we are already closest
Enter fullscreen mode Exit fullscreen mode

In practice this yields predictable complexity around O(log N):

~10,000 nodes → 7–8 hops

~1,000,000 nodes → 10–12 hops

MaxPP: Escaping Local Minima

In real networks, greedy routing can get stuck. GeoOverlay implements MaxPP (Maximally Permissive Path) to address this.

MaxPP allows controlled lateral moves when the direct greedy path fails — effectively acting like a navigation system that knows how to take detours.

📦 Storage Primitives: set and append

Routing is only half the system. The other half is distributed storage.

GeoOverlay currently provides two core primitives:

set — Key/Value

LWW (Last-Write-Wins) semantics

cryptographically signed records

TTL support

replication to the R closest nodes

acknowledgments via configurable W-of-R

Conceptually, this is inspired by Dynamo-style systems.

append — Log Mode

Designed for message queues and event streams.

This primitive powers one of the most important features in GeoOverlay: Mailbox.

✉️ Mailbox: Asynchronous Messaging Without Servers

Mailbox enables sending messages to a recipient even when they are offline.

CLI example:

Send message to alice

python network/cli.py mailbox send alice "Hi, how are you?" --epoch-sec 3600

Alice retrieves messages

python network/cli.py mailbox poll alice --consume

The key detail: alice is not a server address — it is derived from her public key.

There is no central server. Only the overlay.

🗣️ Naming: A Decentralized DNS

Hashes are great for machines but not for humans. GeoOverlay includes a decentralized naming layer.

Example:

Claim a name

python network/cli.py name claim alice --ttl 31536000

Resolve the name

python network/cli.py name resolve alice

Key properties:

records are owner-signed

TTL-based lifecycle

optional vouching mechanism

This helps mitigate spam nodes and abandoned registrations.

🚀 Current Project Status

GeoOverlay is currently in active alpha.

Already implemented

hyperbolic routing

greedy + MaxPP

QUIC/TCP transports

NAT traversal (STUN/TURN/ICE-lite)

W-of-R replication

Mailbox

Name registry

In active development

full-featured desktop client (Tauri)

stronger anti-abuse mechanisms

large-scale stress testing

improved NAT traversal in hostile networks

🧪 How to Try It

Quick local demo:

git clone https://github.com/andysay1/geooverlay.git
cd geooverlay/network
bash dev.sh venv
bash dev.sh demo

This spins up a bootstrap node and connects a peer for experimentation.

🔭 What’s Next

Near-term goals:

full realtime layer

Telegram-class client UX

reference applications on top of GeoOverlay

large WAN experiments

Long-term vision:

decentralized websites

P2P messaging platforms

IP-independent services

infrastructure for AI agent interaction

Conclusion

GeoOverlay is an attempt to rethink what a decentralized internet stack can look like.

An internet without a single point of failure.

An internet where every node is a first-class participant.

If this resonates with you — explore the code, open an issue, or share feedback.

Project site: https://net.ddrw.org/

GitHub: https://github.com/andysay1/geooverlay

If you find the project interesting, consider giving it a ⭐ on GitHub — it helps the project grow.

Top comments (0)