Show HN: Drop-In SQS Replacement Based on SQLite
SmoothMQ is a user-friendly replacement for SQS, featuring a functional UI, observability, message scheduling, and rate-limiting. It allows private SQS instances on any cloud, compatible with existing clients.
Read original articleSmoothMQ is a drop-in replacement for SQS designed to offer a more user-friendly experience. It provides a functional UI, observability, tracing, message scheduling, and rate-limiting features. Users can deploy SmoothMQ as a single Go binary, enabling compatibility with existing SQS clients. The tool allows for running a private SQS instance on any cloud platform. SmoothMQ operates a UI on port `:3000` and an SQS-compatible server on port `:3001`, facilitating queue management and message search functionalities. It is compatible with SQS clients in any programming language, with a provided Python example for connection. SmoothMQ aims to enhance the developer experience when working with message queues, offering a smoother alternative to SQS.
Related
+1 for k8s, kubernetes, cloud native, self-hosted, edge-enabled at low cost, no cost.
I ran rq and minio for years on k8s, but been watching sqlite as a drop-in-replacement since most of my work has been early stage at or near the edge.
Private cloud matters. This is an enabler. We've done too much already in public cloud where many things don't belong.
BTLE sensors are perfectly happy talking to my Apple Watch directly with enough debugging.
I'd argue the trip through cloud was not a win and should be corrected in the next generation of tools like this, where mobile is already well-primed for SQLite.
Makes me think quite positively of go lang and of the dev for designing in such a way. Can understand why teams like it because of easier maintenance
Quite elegant from my uneducated pov.
are you monetizing this as a separate business from: https://www.ycombinator.com/companies/scratch-data
I assume this would work without much issue with Litestream, though I'm curious if you've already tried it. This would make a great ephemeral queue system without having to worry about coordinating backend storage.
I also love writing AWS API-compatible services. That's why I did Dyna53 [1] ;P
(I know, unrelated, but hopefully funny)
Move all the structs from models/ into the root directory.
This allow users of this package to have nice and short names like: q.Message and q.Queue, and avoids import naming conflicts if the user has its own „models“ package.
I swear they reimplement stuff we have just so there are more places to bill us.
The "TODO: check for errors" comment, combined with what seems like disabling foreign key constraint checks, makes me a bit hesitant to try this out.
https://github.com/crowdwave/sasquatch
sasquatch is also a message queue, also written in Golang and also based on sqlite.
sasquatch implements behaviour very similar to SQS but does not attempt to be a dropin replacement.
sqsquatch is not a complete project though, nor even really a prototype, just early code. Likely it does not compile.
HOWEVER - sasquatch is MIT license (versus this project which is AGPL) so you are free to do with it as you choose.
sasquatch is a single file of 700 lines so easy to get your head around: https://raw.githubusercontent.com/crowdwave/sasquatch/main/s...
Just remember as I say it's early code, won't even compile yet but functionally should be complete.
I never cared to figure out what parts of SQS are clients-side and server side, but - does SmoothMQ support long polling, batch delivery, visibility timeouts, error handling, and - triggers? Or are triggers left to whatever is implementing the queue? Both FiFo and simple queues? Do you have throughput numbers?
As an SQS user, a table of SQS features vs SmoothMQ would be handy. If it's just an API-compatible front-end then that would be good to know. But if it does more that would also be good to know.
The reason you'd use this is because there are lots of clients who still want on-prem solutions (go figure). Being able to switch targets this way would be handy.
go get github.com/poundifdef/SmoothMQ/models
go: github.com/poundifdef/SmoothMQ@v0.0.0-20240630162953-46f8b2266d60 requires go >= 1.22.2; switching to go1.22.4
go: github.com/poundifdef/SmoothMQ@v0.0.0-20240630162953-46f8b2266d60 (matching github.com/poundifdef/SmoothMQ/models@upgrade) requires github.com/poundifdef/SmoothMQ@v0.0.0-20240630162953-46f8b2266d60: parsing go.mod:
module declares its path as: q
but was required as: github.com/poundifdef/SmoothMQ
My lab also developed an SQS-esque system based on the filesystem, so no dependencies whatsoever and no need for any operational system other than the OS. It doesn't support all SQS commands (because we haven't needed them), but it also supports commands that SQS doesn't have (like release all messages to visible status).
I'll grant it's small to infinitesimal, but you asked for feedback.
Are there maintenance actions that the admin needs to perform on the database? How are those done?
Rate limiting is something I miss on Sidekiq (only available on the premium plan that I can't afford) and the gems that extend it break compatibility often.
I'll probably try poking at it directly through the HTTP API rather than an SDK ... does it need AWS V4 auth signatures or anything?
Loving all these self-hosted KISS stuff :)