by grepLeigh · 4y ago · 0 comments
- $236.99 in usage, approx 1% of project's total revenue
- ~20 hours to implement pub/sub applications running on a mix of Raspberry Pi & GCP VMs. Implementations were in Rust and Python. It would have taken much, much longer to stand up a managed MQTT broker and identity/key management that I felt comfortable using in my own home, let alone providing to customers.
- Hundreds of hours implementing and debugging glue between GCP's Pub/Sub product, websocket-based subscribers, and MQTT subscribers/publishers.
I don't regret my decision (wouldn't have shipped otherwise), but I'm looking forward to the next phase. Here's what I'm migrating towards:
- NATs message broker. NATS supports connections via MQTT and Websocket protocols, besides NATS own protocol.
- django-nats-nkeys for org, identity, and JWT management (not production-ready, don't use this until I've been eating my own dog food for a few months) [1]
- AsyncAPI schemas [2] for core message APIs, including schemas for 3rd-party printer software events (OctoPrint, Moonraker, Repetier, etc). This will underpin PrintNanny's plugin system.
Once we see legit demand we will make sure it's supported.
We use NATS for pretty much all of our MQ / Service Bus type stuff, we were using GCP Iot, AWS IoT and recently moved to EMQX as it has native MQTTv5 support.
NATS would have been a much better choice for us but the support wasn't there.
Build it and they will come :)