HN user

maxpert

1,998 karma
Posts99
Comments466
View on HN
github.com 7mo ago

Show HN: Marmot v2.20 – A distributed SQLite server with MySQL wire compatbility

maxpert
5pts0
github.com 7mo ago

Show HN: Gophrql – A pure Go implementation of PRQL

maxpert
2pts0
github.com 8mo ago

Show HN: I used AI to build StrangeQ, a RabbitMQ compatible message broker

maxpert
3pts0
maxpert.github.io 2y ago

Show HN: Marmot and Isso and Fly.io = Free Distributed Disqus Alternative

maxpert
2pts0
arxiv.org 3y ago

Hyena a more efficient convolutional LLM when compared to GPT

maxpert
3pts0
github.com 3y ago

Show HN: SQLite store for node cache manager

maxpert
7pts0
doordash.engineering 4y ago

DoorDash scaled SSR with Next.js

maxpert
6pts0
doordash.engineering 4y ago

Overcoming Imposter Syndrome When Starting a Career in Tech

maxpert
5pts0
profit.pakistantoday.com.pk 4y ago

Airlift may have hit a billion, but is it for real?

maxpert
2pts0
github.com 4y ago

Show HN: Rues an Expression Evaluation Sidecar

maxpert
1pts0
doordash.engineering 4y ago

The Beginner’s Guide to Kotlin Coroutine Internals

maxpert
6pts0
doordash.engineering 5y ago

Building a scalable Machine Learning feature store for DoorDash

maxpert
3pts1
github.com 6y ago

Show HN: Drep – dynamic grep without restarting (written in Rust)

maxpert
3pts0
www.twitch.tv 6y ago

Twitch Runs Cockroach DB

maxpert
3pts0
news.ycombinator.com 6y ago

Ask HN: Have you deployed a sahred SQLite on NFS (or AWS EFS)?

maxpert
1pts3
www.youtube.com 6y ago

Improving Cache Speed at Scale – RedisConf 2020

maxpert
2pts0
community.wolfram.com 6y ago

Elaborating on Arrival's Alien Language, Part I., II. & III

maxpert
2pts0
christine.website 7y ago

V language playground exploited and destroyed

maxpert
7pts0
www.youtube.com 7y ago

Advanced Cache Optimization Techniques [video]

maxpert
2pts0
www.youtube.com 7y ago

Techniques to Improve Cache Speed (RedisConf 2019) [video]

maxpert
7pts0
doordash.engineering 7y ago

Speeding Up Redis with Compression (LZ4)

maxpert
2pts0
doordash.engineering 7y ago

Speeding up Redis using LZ4

maxpert
3pts0
eng-doordash.com 7y ago

Speeding up Redis with compression

maxpert
1pts0
eng-doordash.com 7y ago

Using LZ4 to Speed Up Redis at DoorDash

maxpert
4pts0
gitlab.com 7y ago

Show HN: Opensourcing geolocation server written in crystal language

maxpert
9pts1
iret.ml 7y ago

Show HN: My personal CLI URL shortner less than 200 LoC

maxpert
1pts0
dev.to 7y ago

A blockchain for dummies

maxpert
1pts0
github.com 7y ago

Braid a functional language that compiles to Go

maxpert
3pts0
dev.to 7y ago

GitHub extensions to boost your productivity

maxpert
1pts0
blog.doordash.com 7y ago

Using built-in Kotlin constructs instead of inventing another complex library

maxpert
1pts0

Working on Marmot https://github.com/maxpert/marmot recently added support for vector index. My local benchmarks show pretty decent QPS with less than GB of RSS on DBpedia dataset.

Interesting part is that I started off implementing a research paper for indexing and performance was not good enough. I ended up tuning things up for my own use-case and ended up with good enough replicatable RAG store.

I am as usual working on Marmot https://github.com/maxpert/marmot

I've got replicas now working with DML proxy. This essentially means I can now have a cluster of primaries, and then spin up replicas on demand and nodes talking to local host will never see their mutation work pretty transparently from readonly-replicas. While PoC works now the snapshot restore is extremely inefficient IMO yet.

GPT-5.3-Codex 6 months ago

Tell me that you are hurt without telling me that you are hurt this applies to Sam right now

GPT-5.3-Codex 6 months ago

Is this me or Sam is being absolute sore loser he is and trying to steal Opus thunder?

A lot of skepticism in comments. Let me remind them doing N loops over local disk with in memory cached pages is absolutely different compared to doing RT over typical VPS network. Having said that there is no silver bullet for dumb code! So let's not conflate the argument the author is trying to make.

Disclaimer: I am author of Marmot https://github.com/maxpert/marmot so I will sound extremely bias.

I have been asked multiple times on why I chose SQLite and not Turso. I've always responded people that I don't trust an open-source project once it's backed by a VC firm. I've moved away from Redis to Val-Key for same reason, and we have seen the Redis train-wreck in slow-mo. I hope at no point in future Turso ever ends up in that state, but chances are pretty high. At this point the "compatible with SQLite" has become a marketing term IMO, we all know how easy it is to break compatibility here or SQLite to break compatibility.

jQuery 4 6 months ago

jQuery is the last time I felt a library doing magic! Nothing has matched the feelings since then.

Ok it's a very long discussion but I will try to keep it brief here (more than happy to chat on Marmot Discord if you wanna go deeper). Honestly I've not done head to head comparison, but if you are asking for guestimated comparison:

- Marmot can give you better easy DDL and better replication guarantees.

- You can control the guarantees around transactions. So if you're doing a quorum based transaction, you are guaranteed that quorum has written those set of rows before returning success. This takes care of those conflicting ID based rows getting overwritten that people would usually ignore. And you should be able to do transactions with proper begin and commit statements.

- Disk write amplification is way lower than what you would see in CRDT. This should usually mean that on a commodity hardware you should see better write throughput. As I mentioned on my local benchmarks I'm getting close to 6K insert ops. This was with a cluster of three nodes. So you can effectively multiply it by three and that is like 18k operations per second. I did not set up a full cluster to actually benchmark these. That requires investing more money and time. And I would be honestly frugal over here since I am spending all my $$$ on my AI bill.

- Reads as you can see, you can read directly from the SQLite database. So you are only bottlenecked by your disk speed. There are no fancy mergers that happen on CRDT level in the middle. It's written once and you're ready to read.

- The hardest part in my opinion that I faced was the auto increment IDs. It is a sad reality but turns out 99% of small to mid-size companies, are using the auto increment for IDs. In all CRDTs, in case of conflict, the LWW (based on one ID or another) happens, and I can guarantee you at some point in time without coordination, if nodes are just emitting those regular incrementing IDs, THEY WILL OVERWRITE each other. That was the exact problem in the first version of Marmot.

- SQLite is single writer database. cr-sqlite writes these delta CRDT rows in a table as well, under high write load you are putting too much pressure on WAL, how do I know? I did this in Marmot v0.x and even v2 started with that and eventually I decided to write logs in a SQLite database as well. Turns out at a high throughput even writing or dumping those logs that change logs that I'm gonna discard away is a bad idea. I eventually move to PebbleDB, with mimalloc based unmanaged memory allocator for serialization/deserialization (yes even that caused slowdowns due to GC). It doesn't stop here each row in CRDT entry is for one every column of table (changed column) + it has index for faster lookup. So there that will bog it down further on many many rows. For context I have tested Marmot on gigs of data not megs.

I do have couple of ideas on how I can really exploit the CRDT stuff, but I don't think I need it right now. I think most of stuff can be taken care of if I can build and MVCC layer on top.

Yes explored that path too with CRDTs.

- DDL gets really tricky in these cases, that's why you see Corrosion has this weird file based system. - cr-sqlite ain't maintained anymore but I did some benchmarks and if I remember correctly it was as slow as 4x-8x depending upon type of your data & load. Storage bloats by 2x-3x, tombstones accumulate pretty fast as well.

I mean each mutation on every column looks something like:

table, pk, cid, val, col_version, db_version, site_id, cl, seq

Overall I dropped the idea after spending month or two on it.

You point out a question that I spent months thinking about. I personally love Postgres, heck I initially even had a version that will talk postgres wire but with SQLite only syntax. But then somebody pointed me out my WordPress demo, and it was obvious to me that I have to support MySQL protocol, it's just a protocol. Underlaying technology will stay independent from what I choose.

Here are some that I can think on top of my head:

- Marmot let's you choose consistency level (ONE/QUORUM/FULL) vs MySQL's serializable.

- MySQL requires careful setup of replication, conflict avoidance and monitoring. Fencing split brain and failover is manual in many cases. Marmot even right now is easier to spin up, plus it's leaderless. So you can actually just have your client talk to different nodes (maybe in round robin fashion) to do load distribution.

- Marmot's eventual consistency + anti-entropy will recover brain-splits with you requiring to do anything. MySQL active active requires manual ops.

- Marmot's designed for read-heavy on the edge scenarios. Once I've completed the read-only replica system you can literally bring up or down lambda nodes with Marmot running as sidecar. With replicas being able to select DBs they want (WIP) you should be able to bring up region/org/scenario specific servers with their light weight copies, and writes will be proxied to main server. Applications are virtually unlimited. Since you can directly read SQLite database, think many small vector databases distributed to edge, or regional configurations, or catalogs.

Right now I've started off with full replication of every database in cluster. On my roadmap I have:

- Ability to launch a replica on selected databases from main cluster.

- Ability for replica to only download and replicate changes of select databases (right now all or nothing).

- Ability for replica to proxy DML & DDL into write cluster transparently.

- Custom set of commands for replicas to download and attach/detach databases on the fly.

This will instantly solve 80% of the problems for most of consumption today. I will probably go after on demand page stream and other stuff once core features are done.

Not to mention this solves majority use-cases of lambdas. One can have a persistent main cluster, and then lambda's coming up or going down on demand transparently.

Author here! Every time I post my own stuff here it seems to sink, so hopefully this actually reaches some of you.

Marmot started as a sidecar project using triggers and polling to replicate changes over NATS. It worked, but I hit a wall pretty fast. Most people really want full ACID compliance and DDL replication across the cluster. I realized the only clean way to do that was to expose SQLite over a standard protocol.

While projects like rqlite use REST and others go the page-capture route, I decided to implement the MySQL protocol instead. It just makes the most sense for compatibility.

I’ve reached a point where it works with WordPress, which theoretically covers a huge chunk of the web. There are scripts in the repo to deploy a WP cluster running on top of Marmot. Any DB change replicates across the whole cluster, so you can finally scale WordPress out properly.

On the performance side, I’m seeing about 6K-7K inserts per second on my local machine with a 3-node quorum. It supports unix-sockets, and you can even have your processes read the SQLite DB file directly while routing writes through the MySQL interface. This gives you a lot of flexibility for read-heavy apps.

I know the "AI slop" label gets thrown around a lot lately, but I’ve been running this in production consistently. It’s taken a massive amount of manual hours to get the behavior exactly where it needs to be.

Lua 5.5 7 months ago

I feel like Lua is absolutely underrated. I just wish one of the mainstream browsers actually puts their foot down and starts supporting Lua as scripting language.

[dead] 7 months ago

Fake spam don't see WASM, group upvoting and HN not catching it.

LOL what are the odds, I posted in `Show HN` about Marmot today https://github.com/maxpert/marmot/releases/tag/v2.2.0 and in my head I was thinking exact same thing for supporting MySQL's JSON datatype. At some level I am starting to feel, I might as well be able to expose a full MongoDB compatible protocol that let's you talk to tables as collections, solving this problem once it for all!

But this technique I guess is very common now.

I am sorry I might be a little naive here. The hardest thing about RxJava or RxJS was actually understanding the reactor pattern and then the nuances of threading (in Java) and how it made simple linear looking code callback hell. Go from ground up was built on promise of having the simple no-callback hell code that will be easy to read on eyes. Why do we keep going back to these pattern that over long term have proven to be hard to debug, thus hard to maintain well. Go is not even good at syntactic sugar like couple of other languages that might make it easy, why are people so excited about this? Should the reactivity and yielding of a go routine be taken care of under the hood?

Edit: I've maintained a full codebase with R2DBC and I can assure you many developers came scratching their heads to me sometimes on tell me why are we doing this again when we can only have finite connections to DB and those connections can be 1-1 mapped to worker threads.

Microjs 2 years ago

OMG this is still alive! Brought a smile on my face :)