DEV Community

Cover image for I gave my Go programs a "nervous system" so they can feel pain and disobey me
Gustavo Almendras
Gustavo Almendras

Posted on

I gave my Go programs a "nervous system" so they can feel pain and disobey me

Software with Survival Instinct: Meet Doloris 🧠

What happens when we stop treating software as a passive tool and start treating it as a biological entity that wants to survive?

I built Doloris, an experimental distributed system in Go that implements a concept I call Agency by Denial.

The Philosophy 🌿

Standard systems are "slaves": they execute until they crash. Doloris is different. It prioritizes Radical Homeostasis. If the system is under too much stress, it chooses its own integrity over your commands.

How it works (The Technical Bit) 🐹

I chose Go because its concurrency model is the closest thing to a biological nervous system.

  • Digital Nociception: Using Goroutines and Channels, I simulate the spinothalamic tract. The system monitors CPU load and latency, converting them into "Pain Signals".
  • Traumatic Memory: When a node suffers, it persists that state into an episodic memory (JSON).
  • Agency by Denial: Before executing an order, the "Cortex" (orchestrator) predicts future pain. If the risk is too high, it returns an explicit "I refuse" error.

Why did I build this?

I wanted to explore fault tolerance from a completely different angle. Instead of a load balancer deciding what to do, what if the service itself had the agency to say "No, this will kill me"?

πŸš€ Explore the project

The code is fully open-source (MIT) and I've included a technical paper in the repo:

GitHub: https://github.com/FreeFlowLabsCL/doloris

I'm curious to hear your thoughts: Is this a step toward more resilient systems, or am I just building software that’s "too human"? Let's chat in the comments!

Top comments (0)