Lurker News
Hi! I wanted to share an open source API-compatible replacement for SQS. It's written in Go, distributes as a single binary, and uses SQLite for underlying storage.

I wrote this because I wanted a queue with all the bells and whistles - searching, scheduling into the future, observability, and rate limiting - all the things that many modern task queue systems have.
But I didn't want to rewrite my app, which was already using SQS. And I was frustrated that many of the best solutions out there (BullMQ, Oban, Sidekiq) were language-specific.
So I made an SQS-compatible replacement. All you have to do is replace the endpoint using AWS' native library in your language of choice.
For example, the queue works with Celery - you just change the connection string. From there, you can see all of your messages and their status, which is hard today in the SQS console (and flower doesn't support SQS.)
It is written to be pluggable. The queue implementation uses SQLite, but I've been experimenting with RocksDB as a backend and you could even write one that uses Postgres. Similarly, you could implement multiple protocols (AMQP, PubSub, etc) on top of the underlying queue. I started with SQS because it is simple and I use it a lot.
It is written to be as easy to deploy as possible - a single go binary. I'm working on adding distributed and autoscale functionality as the next layer.
Today I have search, observability (via prometheus), unlimited message sizes, and the ability to schedule messages arbitrarily in the future.
In terms of monetization, the goal is to just have a hosted queue system. I believe this can be cheaper than SQS without sacrificing performance. Just as Backblaze and Minio have had success competing in the S3 space, I wanted to take a crack at queues.
I'd love your feedback!

Comments (156) 39 threads

davidthewatson3 replies#
The whole idea here is superlative.

+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.

memset3 replies#
Really interesting. Question: when it comes to running these software on k8s, do you prefer to manage and host yourself, or do you use managed solutions on top of your own infra? (Do you pay for minio support?)

Asking from a business perspective - I of course intend to keep developing this, but am also really trying to think through the business case as well.

davidthewatson#
Good question!

The answer depends on funding, i.e. in my own never-leaves-my-house case it is always self-host, much like SOC work.
In the case of startup or research lab work (day-job, for lack of a better descriptor). It's frequently a slice of AWS, GCP, or Azure, i.e. 6 figure/mo cloud bills.
I think those two broad cases are worth considering.

cpill1 reply#
k3s for on premises deployments. I'm also using it for local self hosting side projects.
davidthewatson#
Definitely a fan of k3s as k8s lite - complexity that your particular project may not need, particularly since every project doesn't need k8s and many are better off with less.

If you look at the history from J2EE to the k8s prototype in Java to what we have now, it's a great idea to encapsulate all of these things into a single container, particularly at Google scale, but many unintended consequences arise from complexity accruing to features and functions which weren't actually requirements for your particular project being supported, i.e. the notion that YAGNI because few orgs have Google scale problems. If so, great! Carry on... If not, consider k3s or aptible or more emergent platforms I haven't actually used.
The mere presence of unneeded items in source and documentation presents a "why am I here?" choice paradox. That's before we even get into keeping track of deprecations in the never-at-rest source/release evolution.
Federation is a good example. I've worked at places that needed it and places that didn't.

kmacdough#
Managed systems make a lot of sense in small companies, where keeping head count down is the key to agility & communication. For personally funded projects it's never worth the cost and for big teams (100+) its typically worth the savings to self-host IF you can find good people. Low quality/rushed/novice self-hosting is almost never a good idea for any size company.
pfix2 replies#
rq as in Redis Queue?
davidthewatson#
I linked Redis Queue on the previous reply but had not heard of rqlite so thanks for this!

It looks like this may solve at least another part of my quest to replace various back-ends with sqlite.

raihansaputra1 reply#
can you share more about the BTLE sensors talking with Apple Watch? I'm aware that BLE heartrate sensors are detected as 'Health Devices' if I want to connect to it, but what other sensors are you working with?
davidthewatson1 reply#
Yes, thanks for asking.

Continous Glucose Monitors (CGM). That used to be a diabetic-only problem until Abbott, Dexcom,and other vendors expanded their markets beyond diagnosed diabetics into pre-diabetes markets and exercise, health, and well-being applications like:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10635370/
and:
https://www.levelshealth.com/
This has exploded beyond the hundred years of ketogenic research and as research on glycemic variability in mental health has grown.
My current kit includes an Apple Watch series 9 and an iPhone SE. Prior to that it was Google Pixel and a Fitbit Sense, though direct BTLE->Watch was not an option in that generation.
I have two complications: Abbott Freestyle Libre 3 and Dexcom G7. Continuous Glucose Monitors (CGM). The Dexcom is entirely proprietary. The Abbott is accomplished via a series of 3rd party hacks:
https://www.youtube.com/watch?v=YqUZjXo5VXY
I'd say open source, but I'm not certain that every link in the chain is open source. I've run many generations of various open source tools on Android and iPhone since no vendor ships a complete end-to-end solution that is perfect.
Nightscout and watchdrip are two open source examples:
https://nightscout.github.io/
https://watchdrip.org/
When G7 originally shipped last year, sensor data left the sensor and used the iPhone as a proxy-to-cloud storage, as has become the default mode across many IoT devices because it was easy, obvious, despite the unintended consequences of the design choices here.
At that point, because the data has already taken a long and perilous journey into cloud when BTLE->Watch was dramatically shorter, cheaper (in terms of hops and requirement for service), and arguably better. Hence, any data request pays that full routing price into and out of cloud, even the most trivial display, such as watch.
After a latent Dexcom BTLE->Apple Watch update a year later, I don't even need to carry my iPhone anymore, despite the fact that I don't have service beyond WiFi on my Apple Watch, since the data exchange is entirely BTLE.
The sad fact is that straightforward questions around a person's glycemia were not answerable directly without an entire belt-worn cloud ecosystem being paid for and fully functional 24x7x365.
BTLE->Apple Watch is by no means perfect, but it's dramatically better than my previous 5 years of 24x7x365 routing through cloud.
HTH!

raihansaputra1 reply#
i'm kinda interested in doing that too. do you wear the CGM all day? what's your recommendation? looking to link to my Apple Watch as well if possible.

Continue this thread — 1 reply

hrisen1 reply#
Keeping questions from scale & benchmarks aside, this is a cool thing for functional/unit testing module that uses SQS, instead of dumb mocks.
memset1 reply#
Thank you! Yes, you should definitely use this instead of localstack :)
thrauat#
Although I wouldn't recommend using LocalStack's SQS implementation for production workloads, calling it a dumb mock is a bit outdated. It emulates pretty much every SQS behvaior including long polling, delayed messages, visibility timeouts, DLQ redrive, batch send/receive, ...
dav433 replies#
Tangential but I looked at the codebase - because I like to imagine I can code (I can’t) - and for a laymen, I could follow the code.

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.

memset#
Thank you for the kind words! I'll be sure to work on making it as complicated as I can :)
x-complexity#
Honestly shows the capabilities of both:

- The dev for making it both fast & simple to understand
- Golang for making the codebase easy to follow

silisili1 reply#
That's the beauty of Go, generally, and why I immediately became attracted to it. The code is supremely readable because it enforces a style guide, and doesn't allow much magic.

A number of people don't like it for limiting their expression and abilities, which I understand that feeling too. But as a middle aged programmer I realized that readability trumps conciseness and cleverness in the long run.

bilekas1 reply#
I can't remember who said it but I remember hearing that a good go Dev and a new go Dev should be able to produce generally similar code in order for maintainability. I do like playing with go, it's sits in a nice little playground in my head, mostly thanks to the compile times I think.
ayuhito#
Two experienced Go devs tackle the same task, and their code will look almost identical.

Two experienced Rust devs tackle the same task, and their solutions will be worlds apart.
(I write both, but I do love Go for its simpleness)

jerrygenser2 replies#
> In terms of monetization, the goal is to just have a hosted queue system. I believe this can be cheaper than SQS without sacrificing performance. Just as Backblaze and Minio have had success competing in the S3 space, I wanted to take a crack at queues.

are you monetizing this as a separate business from: https://www.ycombinator.com/companies/scratch-data

memset1 reply#
Truthfully, I don't know yet - I haven't even built a paid/hosted version at all. It is related to my existing business in the sense that it deals with realtime data.

But I started working this as something I wish existed as opposed to having some big VC strategy and pitch deck behind it.
(Also, I appreciate all of your feedback on this a month ago! It was really helpful to encourage me to keep looking into this and also figuring out the "first" things to launch with!)

Kwpolska3 replies#
Not every open source project needs to be monetized. Projects that were created to "scratch one's itch" tend to fare better than those built to make money. Devs put more love and less stress into them than into things they want to build a business out of.

The monetization paragraph reads really weird, as if you believe HN is a community of VC-adjacent people looking for new ways to make money (it isn't), and talking about how you plan to exploit your new project is mandatory (it isn't either).

fragmede#
> HN is a community of VC-adjacent people looking for new ways to make money

it kinda is. There are all sorts of people here, but HN is owned by YC, a well known VC fund. That doesn't mean that everyone here is one, but it certainly influences the community here.
> and talking about how you plan to exploit your new project is mandatory
it's not mandatory but it's a frequently asked question. OP might as well answer it while they have the mic.

pc86#
There are plenty of people here not interested in the VC space, not interested in startups (in the pg sense of the word), and not strictly looking for new ways to wake money. But it's run by a VC firm. It's primary purpose is one part of a large funnel for getting new applicants to that VC firm. It is by definition VC-adjacent, and by extension many or perhaps even most people on here, certainly most of the people posting and commenting a lot, will be somewhat in that market as well. You can ignore that if you want at no risk to yourself but just declaring "it isn't" as objective incontrovertible fact is kind of silly when at the very least it's up for debate. But honestly whatever HN is or is not is a pretty irrelevant point to argue.

What isn't irrelevant, I think, is the accusation that monetizing something you've worked on is somehow exploiting it. If this brings value to people, and they can make money using it, or make more money using, the OP deserves to charge them for it if they want to. There's nothing wrong or exploitative about that. You are free to donate all your time and not charge anyone for anything but it's silly to frame someone charging for their work as an exploitation of either that thing or the people paying for it.

samatman#
> Not every open source project needs to be monetized.

Where was this claim made? I missed it.
> Projects that were created to "scratch one's itch" tend to fare better than those built to make money. Devs put more love and less stress into them than into things they want to build a business out of.
This project is based on SQLite, which is several people's livelihood. As a result, it's rock-solid, reliable, and available to all without fee or restriction.
So it's an odd choice of project to choose to express this sort of eminently debatable sentiment.

Onavo2 replies#
What's the point of AGPL though? The enterprises with the budget for self hosting this sort of software usually have requirements and scale beyond what SQLite can offer out of the box.
jerrygenser1 reply#
He's going to make backends pluggable. So other more scalable backends than sqlite could work
memset#
In practice, I don’t plan on adding an entire proprietary layer - that is just way too much work, and it defeats the purpose. If the open source code has bad performance, why would someone even bother with a hosted version? Like, I want people to be so impressed by the open source code that they’d trust a cloud version to be even better. Clickhouse and duckdb do this very well.

The main difference I expect with a hosted solution are things like multiple tenants or billing integrations. These aren’t core to the product and only necessary when you need to host someone else’s data.

andrewstuart3 replies#
Ugh I didn't see that.

My enthusiasm has instantly waned.
Why is AGPL needed? Just be MIT and make it easy for people, espefcially if you're not planning on monetising it.
I won't use AGPL code just on principle.

ctippett6 replies#
Why? Does AGPL really matter if you're not planning on monetising whatever it is you're using it for?

Not trying to be snarky, I'm genuinely curious why you'd be so vehemently opposed to it.

Continue this thread — 6 replies

bigstrat2003#
Not gonna lie, man - this is just as obnoxious as when GPL zealots shit on someone's permissively licensed project because they think it should be GPL. The man has a right to use whatever license he wants.
lupusreal#
Provoking this sort of response is the best feature of the AGPL. I love it.

Load more comments