frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

QueryLeaf: SQL for Mongo

https://github.com/beekeeper-studio/queryleaf
23•tilt•1y ago

Comments

ttfkam•1y ago
Would much rather have "Mongo" for SQL like this:

https://github.com/microsoft/documentdb

I am skeptical that SQL with Mongo backing it would be at all performant except in the most trivial cases. On the flip side, Postgres's jsonb indexing makes the inverse very doable.

Zambyte•1y ago
https://www.ferretdb.com/
VWWHFSfQ•1y ago
We're seeing a convergence of document DBs adding relational features, and relational DBs adding document features. At this point I find the best of both worlds to simply be PG with JSONB.

    create table document (
      id uuid primary key default gen_random_uuid(),
      doc jsonb
    );

This alone will give you a huge number of the features that Mongo provides, but also the full power of Postgres for everything else.
victor106•1y ago
this makes so much sense.

I also wonder if there are some specific capabilities of MongoDB that this pattern does not support?

etse•1y ago
Maybe not capabilities, but I'm wondering if Postgres has gotten any easier to scale horizontally. The administrative overhead of scaling and maintenance with MongoDB seemed lower to Postgres to me.

Would love to hear from others with more Postgres than I.

ttfkam•1y ago
Excluding conversations about MongoDB compatibility, PG16 added bidirectional replication for multiple writers and there are Postgres-compatible options out there for a distributed database including Citus, EDB Postgres Distributed, Yugabyte, CockroachDB, Aurora Limitless, etc.

The choices require some nuance to figure out a best fit, but then again so does any MongoDB installation (despite the marketing hype to the contrary as there are no free lunches).

You might be surprised how far most folks can typically scale with just read replica(s) on a reasonably sized writer. Add in bidirectional replication for multiple writers, and you can go even further. Beyond that, even vanilla Postgres can do it, but you'll need to do some combinations of partitioning and foreign tables.

zareith•1y ago
Curious if there is something similar that works with sqlite.
maxbond•1y ago
As of 3.38 (or 3.45 if you meant a binary JSON structure specifically) https://sqlite.org/json1.html
zareith•1y ago
We can use json type, but the dx around directly using that is not comparable to mongodb. Which is why I was looking for a similar abstraction.
aleksi•1y ago
There is FerretDB v1, which provides MongoDB protocol for SQLite. See https://github.com/FerretDB/FerretDB/tree/main-v1
zareith•1y ago
They seemed to have moved away from that.

From https://docs.ferretdb.io/migration/migrating-from-v1

> Unlike v1.x that provides options for PostgreSQL and SQLite as backend, FerretDB v2.x requires a PostgreSQL with DocumentDB extension as the backend

aleksi•1y ago
FerretDB v2 is built on top of this extension. See https://github.com/FerretDB/FerretDB
gavinray•1y ago
It's somewhat of a secret, but AWS's JDBC driver for DocumentDB supports Mongo as well

Let's you interact with Mongo as if it were a regular SQL JDBC database

https://github.com/aws/amazon-documentdb-jdbc-driver

bdcravens•1y ago
That driver is read-only
gitroom•1y ago
Honestly, putting Mongo and SQL together always confuses me a bit. I'm way more comfy with Postgres and jsonb. Anyone else feel like scaling Postgres is still kinda a pain?
sparky_•1y ago
I can appreciate the technical aspect of a translation layer, but I struggle to understand the use case for a tool like this. If your data is inherently relational, then you should be using a relational store anyway. And if it isn't, trying to hammer it on-demand into something that looks relational is going to eat you with performance implications. Unless I'm missing something.

Escape IntelliJ: Scala and Kotlin LSPs on Emacs Eglot

https://jointhefreeworld.org/blog/articles/emacs/emacs-eglot-scala-kotlin/index.html
57•jjba23•1d ago•13 comments

Terence Tao's ChatGPT conversation about the Jacobian Conjecture counterexample

https://chatgpt.com/share/6a5fdc7a-d6f8-83e8-bbea-8deb42cfed56
871•gmays•16h ago•507 comments

Cruller: Bun's Zig Runtime, Continued on Zig 0.16

https://ziggit.dev/t/cruller-buns-zig-runtime-continued-on-zig-0-16/16734
48•Erenay09•3h ago•18 comments

git's –end-of-options Flag

https://nesbitt.io/2026/07/21/end-of-options.html
142•Erenay09•1d ago•71 comments

Quality non-fiction books are the antithesis of AI slop

https://resobscura.substack.com/p/quality-non-fiction-books-are-the
361•benbreen•19h ago•118 comments

ANSI escape injection in MCP servers: Hidden from humans, visible to AI

https://brightsec.com/research/detecting-ansi-escape-sequence-injection-in-mcp-servers-with-dast/
13•xgpyc2qp•2d ago•4 comments

GigaToken: ~1000x faster Language model tokenization

https://github.com/marcelroed/gigatoken/
503•syrusakbary•16h ago•102 comments

Show HN: Bento - An entire PowerPoint in one HTML file (edit+view+data+collab)

https://bento.page/slides/
834•starfallg•18h ago•186 comments

Everyone should know SIMD

https://mitchellh.com/writing/everyone-should-know-simd
424•WadeGrimridge•15h ago•154 comments

Amiga 1000: Ten years ahead of its time

https://dfarq.homeip.net/amiga-1000-ten-years-ahead-of-its-time/
75•giuliomagnifico•4h ago•47 comments

Are AI labs pelicanmaxxing?

https://dylancastillo.co/posts/pelicanmaxxing.html
530•dcastm•16h ago•206 comments

So Reddit has decided that plain HTML is unsafe

https://www.cole-k.com/2026/07/21/reddit/
461•montroser•21h ago•463 comments

Making ASCII Art in Vim

https://alexyang.dev/vim-ascii-art/
63•evakhoury•2d ago•6 comments

Show HN: Cactus Hybrid: We taught Gemma 4 to know when it's wrong

https://github.com/cactus-compute/cactus-hybrid
133•HenryNdubuaku•15h ago•24 comments

Making

https://beej.us/blog/data/ai-making/
358•erikschoster•18h ago•141 comments

Medici family mystery may be solved after more than 400 years

https://www.cnn.com/2026/07/15/science/medici-family-mystery-dna-malaria
122•effects•11h ago•32 comments

The startup's Postgres survival guide

https://hatchet.run/blog/postgres-survival-guide
409•abelanger•21h ago•191 comments

Why malloc always does more than I asked for?

https://ssenthilnathan3.github.io/blog/malloc/
34•nathaah3•2d ago•24 comments

John C. Dvorak has died

https://twitter.com/na_announce/status/2079952538040672302
748•coleca•14h ago•245 comments

Protecting our FLOSS commons from LLMs

https://blog.codeberg.org/protecting-our-floss-commons-from-llms.html
49•acmnrs•8h ago•6 comments

Malleable Computing, Emacs, and You

http://yummymelon.com/devnull/malleable-computing-emacs-and-you.html
110•kickingvegas•12h ago•30 comments

Fairphone 6 wide camera experimental Linux support

https://nondescriptpointer.com/articles/fairphone-6-wide-camera-linux/
121•helonaut•13h ago•32 comments

Businesses with ugly AI menu redesigns

https://blog.fiddery.com/businesses-with-ugly-ai-menu-redesigns/
291•speckx•20h ago•194 comments

ascdraw: Editor for ASCII/UTF-8 diagrams (in 144FPS)

https://github.com/exlee/ascdraw
44•xlii•2d ago•5 comments

Nobody knows what a used GPU cluster is worth

https://ciphertalk.substack.com/p/nobody-knows-what-a-used-gpu-cluster
232•rbanffy•1w ago•209 comments

Computing Camera Rays

https://momentsingraphics.de/CameraRays.html
4•ibobev•1w ago•0 comments

Restructuring GitHub's bug bounty program

https://github.blog/security/next-chapter-restructuring-githubs-bug-bounty-program/
45•soheilpro•7h ago•18 comments

Back to Kagi

https://blog.melashri.net/micro/back-to-kagi/
268•speckx•20h ago•199 comments

All 253 Patterns from Christopher Alexander's a Pattern Language Summarized

https://claytondorge.com/patterns-list
73•toomuchtodo•11h ago•13 comments

Ghost Cut – Or why Cut and Paste is broken everywhere

https://ishmael.textualize.io/blog/ghost-cut/
167•willm•18h ago•111 comments