July 7th, 2024

Mongo but on Postgres and with strong consistency benefits

The Pongo project on GitHub offers a tool for utilizing MongoDB-like syntax on Postgres with strong consistency benefits. It supports data operations in Postgres and provides a MongoDB-compatible shim. Visit the GitHub repository for details.

Read original articleLink Icon
Mongo but on Postgres and with strong consistency benefits

The GitHub URL provided contains information about the Pongo project, which is described as a tool that enables using MongoDB-like syntax on Postgres with strong consistency advantages. Pongo supports features like data insertion, updating, deletion, and retrieval within a Postgres database using its syntax. Additionally, it includes a MongoDB compliant shim for compatibility purposes. For more in-depth information or to explore the project further, you can visit the Pongo GitHub repository at the specified link.

Related

Rust FSM-based Resumable Postgres tasks

Rust FSM-based Resumable Postgres tasks

The "pg_task" project on GitHub manages FSM-based Resumable Postgres tasks. It features granular state machines, error handling, single-table task scheduling, task definition, execution, stopping, and updating guidelines. Licensed under MIT.

Psycopg 3.2 released – PostgreSQL driver for Python

Psycopg 3.2 released – PostgreSQL driver for Python

Psycopg 3.2 release brings Numpy scalar and PostgreSQL parameter format support, async enhancements, and PgBouncer interaction. It emphasizes maintaining crucial Python-PostgreSQL communication, aiding businesses and infrastructures with reliable interaction.

Show HN: WhoDB – Streamlined, Lightweight Database Management with a Sleek UI/UX

Show HN: WhoDB – Streamlined, Lightweight Database Management with a Sleek UI/UX

WhoDB is a database management tool on GitHub, developed in GoLang for speed. It includes interactive graphs for database schema visualization. Find more details on the WhoDB GitHub Repository.

WhoDB: Lightweight next-gen database explorer

WhoDB: Lightweight next-gen database explorer

WhoDB is a database management tool by Clidey, written in GoLang. It features interactive graphs for database schema visualization, supporting PostgreSQL, MySQL, SQLite3, MongoDB, and Redis. It aims for Adminer's simplicity with improved user experience and performance. Access the WhoDB GitHub Repository for details.

Just Use Postgres for Everything

Just Use Postgres for Everything

The article promotes using Postgres extensively in tech stacks to simplify development, improve scalability, and reduce operational complexity. By replacing various technologies with Postgres, developers can enhance productivity, focus on customer value, and potentially cut costs.

Link Icon 30 comments
By @cpursley - 3 months
Thanks, just added Pongo to the NoSQL section of my "Postgres Is Enough" gist:

https://gist.github.com/cpursley/c8fb81fe8a7e5df038158bdfe0f...

By @marcus_holmes - 3 months
I tried a similar approach in a previous startup - treat data as documents and store in a JSONB field.

Postgres was awesome and handled this brilliantly, but the lack of schema and typing killed it. We just ended up fighting data quality the whole time. We couldn't assume that any document had all the required fields, or that they were in a format that made sense e.g. the Price column sometimes had currency symbols, and sometimes commas-and-periods in UK/US format and sometimes in Euro format - sorting by Price involved some complicated parsing of all the records first.

We moved back to relational tables.

I won't say I'd never do this again, but I would definitely not just throw JSON documents to a database and expect good things to happen.

By @zulban - 3 months
Neat. When I migrated a project from mongo to postgres I took a similar approach, except I only implemented the mongo feel I needed within my own project instead of building a proper library as done here. I was surprised how much performance improved despite using a hacky wrapper.

https://blog.stuartspence.ca/2023-05-goodbye-mongo.html

Personally tho, I plan to just drop all similarity to mongo in future projects.

By @harel - 3 months
I regularly find the hybrid model is a sweet spot. I keep core fields as regular columns and dynamic data structures as JSONB. It brings the best of both worlds together.
By @willsmith72 - 3 months
It's technologically cool, but I would love a "why" section in the README. Is the idea you're a mongo Dev/love the mongo api and want to use it rather than switch to pg apis? Or want to copy some code over from an old project?

I'm sure there are use cases, I'm just struggling to grasp them. Especially if it's about reusing queries from other projects, AI is pretty good at that

By @ilius2 - 3 months
If I were to start a new project, I would directly use postgres, and possibly add a JSONB column ONLY FOR OPTIONAL fields that you don't query frequently. Throwing everything in a document is just fermenting chaos and pain. That being said, I do love the syntax and structure of Mongo pipelines over SQL.
By @Squarex - 3 months
How does it compare with FerretDB[0]?

[0] https://www.ferretdb.com/

By @hdhshdhshdjd - 3 months
I use JSONB columns a lot, it has its place. It can fit certain applications, but it does introduce a lot of extra query complexity and you lose out on some ways to speed up query performance that you could get from a relational approach.

Which is to say JSONB is useful, but I wouldn’t throw the relational baby out with the bath water.

By @frithsun - 3 months
Programmers would be better served by learning nothing except SQL instead of their current strategy of trying to learn everything except SQL.
By @navbryce - 3 months
I made a joke tweet about this in Nov 2023 (even called it "Pongo"). This is definitely a just a funny coincidence, but I'm going to pretend like I can see into the future: https://x.com/navbryce/status/1720580136737894661
By @karmakaze - 3 months
What makes mongo mongo is its distibruted nature, without it you could just store json(b) in an RDBMS.
By @mvsdiego - 3 months
Nice.

Oracle has a similar library based documents/collections API named SODA, been around for years:

https://docs.oracle.com/en/database/oracle/simple-oracle-doc...

There are separate drivers for Java, node.js, python, REST, etc.

In addition to that, it has Mongo API, which is fully Mongo compatible - you can use standard Mongo tools/drivers against it, without having to change Mongo application code.

Both are for Oracle Database only, and both are free.

By @salomonk_mur - 3 months
What would be the advantage of using this instead of simple jsonb columns?
By @aussieguy1234 - 3 months
I'd like to know why AWS went with Aurora DB for their DocumentDB backend. Did the Mongo license change trigger a rush to build something Mongo compatible, but not quite MongoDB?
By @sberder - 3 months
This looks great, I'll definitely give it a try. As many mentioned already, having classic columns and a JSON(B) column seems to be a common solution. How do you handle data validation for the JSON documents? My current project uses Django for metadata. I've been thinking about creating a layer similar to model fields in Django. You would declare a JSON "model" through those fields and assign it to the actual model JSON field.
By @314156 - 3 months
https://docs.oracle.com/en/database/oracle/mongodb-api/mgapi...

Oracle database has had a MongoDB compatible API for a few years now.

By @vmfunction - 3 months
Hmmm how does this compare to https://www.ferretdb.com ?

How does this handle large files? Is it enough to replace GridFS? One of main attraction for MongoDb is it's handling of large files.

By @pipe_connector - 3 months
MongoDB has supported the equivalent of Postgres' serializable isolation for many years now. I'm not sure what "with strong consistency benefits" means.
By @DonnyV - 3 months
Would love a C# version of this. I usually use Mongodb for all of our projects. But we need to use Postgres for a project. This would come in very handy.
By @deanCommie - 3 months
By @tracker1 - 3 months
Has this been tested with CockroachDB or any other databases that use a mostly compatible PostgreSQL wire protocol and query language?
By @Tao3300 - 3 months
Ditch the dalmatian before Disney rips your face off.
By @a13n - 3 months
Does Pongo work with mongoose? I would guess most mongo users are using mongoose and supporting that library would drive more adoption.
By @rework - 3 months
Looks sort of like MartenDB but trying to minic mongo api, unsure why anyone would want to do that... mongo api is horrible...
By @ramchip - 3 months
Have you tried it with CockroachDB?
By @joeyagreco - 3 months
Good work! I would like to see a section on the README outlining the benefits of Pongo
By @posix_monad - 3 months
Does MongoDB have serious market share compared to DynamoDB (and similar clones from Azure, GCP) at this point?
By @revskill - 3 months
Genius.