I simplified my overengineered project
I love programming languages and I love coding so sometimes I get carried away. I'm also interested in productivity tool so I started working on one that allows me manage my notes, projects, calenders, etc. This is necessary context, trust me.
The blunder#
My tool has this concept of AI pets that use a couple of tools to do work in the application like: create a list view for my shopping, create a calender view to help me mange birthdays - stuff like that. It also exports data to MD, PDF and DOCX.
I was inspired to build this tool and wanted to prepare for millions of users. Empowered by Claude and a divine cause, I slapped in a Queue, Go workers (PS: I am a .Net dev who does typescript and python sometimes), I ended up with this design for a small self host tool:
Diagram source
flowchart LR
subgraph CoreAPI["Core API (.NET)"]
JobOutbox["worker_job + outbox"]
end
JobOutbox -->|"publishes hint"| RabbitMQ["RabbitMQ<br/>4 exchanges, 8 queues"]
RabbitMQ --> Notify["go: notify"]
RabbitMQ --> Calendar["go: calendar"]
RabbitMQ --> Export["go: export"]
RabbitMQ --> Import["go: import"]
RabbitMQ --> Plugins["go: plugins"]
RabbitMQ --> SitesWorker["ts: sites worker"]
Companion["go: companion"] -.->|"Pets, HTTP"| CoreAPI
Collab["node: collab"]
SitesServe["sites-serve"]
classDef removed fill:#fee,stroke:#c00
class RabbitMQ,Notify,Calendar,Export,Import,Plugins removedAfter#
The goal of the project was to make a premium product that I could manage. Because I didn't have mastery of Go, I ended up vibe coding that bit of functionality and didn't really understand it in depth even though the syntax was easy to read. I ultimately had to burn through more tokens to convert the workers into languages I understand and ended up with this:
Diagram source
flowchart LR
subgraph CoreAPI["Core API (.NET)"]
NixWorkers["Nix.Workers<br/>notify · calendar<br/>export · import<br/><i>hosted services</i>"]
JobTable["worker_job<br/>lease / claim / renew<br/>apply result<br/><i>(unchanged SQL)</i>"]
end
subgraph NixNode["nix-node<br/>(one Node process)"]
Collab["collab"]
Companion["companion"]
SitesWkr["sites wkr"]
end
NixWorkers --> JobTable
NixNode -->|"polls /internal/worker-dispatch/jobs/lease<br/>every 5 s"| JobTable
SitesServe["sites-serve<br/><i>stays apart</i>"]
note["removed: RabbitMQ,<br/>plugins, Go workers"]
classDef kept fill:#efe,stroke:#0a0
class NixWorkers,JobTable,NixNode kepThThe result ended up being something much more maintainable and I ended up using less idle memory usage by switching back to .NET! I've learned not to get carried away. At least I made the mistake before getting any users.
Container | Before, idle (MiB) | After, idle (MiB) |
|---|---|---|
api | 217 | 222 |
collab service | 174 | 144 |
rabbitmq | 126 | removed |
go workers (import, export, plugin, calendar, notify) | 7 + 6 + 8 + 10 + 9 | removed |
web app | 56 | 45 |
postgres | 57 | 57 |
versitygw (S3 storage) | 18 | 18 |
zitadel + zitadel-db 9auth) | 109 + 33 | 103 + 56 |
Total | 830 | 645 |
The next thing to tackle is the UX when writing. This blog was written in said project and the UX needs some work. Thank you for reading this small rant.