TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A proof of concept MongoDB clone built on Postgres

142 pointsby pablobazabout 10 years ago

16 comments

begriffsabout 10 years ago
You can turn a Postgres db into an API with PostgREST, and it supports jsonb to retrieve json properties.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;begriffs&#x2F;postgrest" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;begriffs&#x2F;postgrest</a>
评论 #9409155 未加载
nlabout 10 years ago
How are JSON updates handled?<p>For those who aren&#x27;t aware, Postgres currently lacks support for doing updates to JSON fields via SQL[1]. For many this isn&#x27;t a problem, but I&#x27;d imagine that people expecting a MongoDB clone would need it.<p>[1] <i>But even though you can individually address the various fields within the JSON document, you can’t update a single field. Well, actually you can, but by extracting the entire JSON document out, appending the new values and writing it back, letting the JSON parser sort out the duplicates.</i> <a href="https:&#x2F;&#x2F;blog.compose.io&#x2F;is-postgresql-your-next-json-database&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.compose.io&#x2F;is-postgresql-your-next-json-databas...</a>
评论 #9408628 未加载
评论 #9407715 未加载
评论 #9408331 未加载
评论 #9408341 未加载
jasondcabout 10 years ago
DB2 also implements the MongoDB query language: <a href="http:&#x2F;&#x2F;www.ibm.com&#x2F;developerworks&#x2F;data&#x2F;library&#x2F;techarticle&#x2F;dm-1306nosqlforjson4&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.ibm.com&#x2F;developerworks&#x2F;data&#x2F;library&#x2F;techarticle&#x2F;d...</a><p>So does CouchDB: <a href="https:&#x2F;&#x2F;cloudant.com&#x2F;blog&#x2F;couchdb-and-mongodb-let-our-query-apis-combine&#x2F;#.VTT4YpTF-0o" rel="nofollow">https:&#x2F;&#x2F;cloudant.com&#x2F;blog&#x2F;couchdb-and-mongodb-let-our-query-...</a>
评论 #9408419 未加载
评论 #9408427 未加载
评论 #9408364 未加载
ahacheteabout 10 years ago
Álvaro here from ToroDB.<p>Check out ToroDB (github.com&#x2F;torodb&#x2F;torodb). It is a Mongo implementation based on PostgreSQL that transforms JSON documents into relational tables. This has many advantages like significant storage reduction, less I&#x2F;O required and it allows for updates (a concern raised on some comments below). Please check it out! :)
tincoabout 10 years ago
I was going to post that this would have been cool a year ago, but now that MongoDB has interchangeable backends there&#x27;s not much to gain from a high level project like this.<p>But then I saw that this project started two years ago, and the last commit was a year ago.
评论 #9408001 未加载
评论 #9407663 未加载
s_kilkabout 10 years ago
I&#x27;ve been working on something similar for the last while, but using jsonb and plpgsql instead of plv8.<p>So far, the basic crud stuff works and there&#x27;s a python driver with decent test coverage. Progress is slow, but it&#x27;s fun!<p><a href="http:&#x2F;&#x2F;bedquiltdb.github.io" rel="nofollow">http:&#x2F;&#x2F;bedquiltdb.github.io</a>
benlambtabout 10 years ago
Something else that provides a simple API for working with JSON in Postgres: <a href="https:&#x2F;&#x2F;github.com&#x2F;robconery&#x2F;massive-js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;robconery&#x2F;massive-js</a> (node.js)
评论 #9407795 未加载
bryanlarsenabout 10 years ago
At the bottom of the README it says &quot;Follow along at <a href="http:&#x2F;&#x2F;legitimatesounding.com&#x2F;blog&#x2F;&quot;" rel="nofollow">http:&#x2F;&#x2F;legitimatesounding.com&#x2F;blog&#x2F;&quot;</a>, which 404&#x27;s. I want to follow along! Please fix. Thanks.
评论 #9408194 未加载
ubergesundheitabout 10 years ago
Interesting experiment! How does it compare in performance, cpu and memory footprint?
lgasabout 10 years ago
There&#x27;s also Mongres which was inspired by this project.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;umitanuki&#x2F;mongres" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;umitanuki&#x2F;mongres</a>
nitramafveabout 10 years ago
I thought MongoDb:s main selling point was the simple scale-out model? At least that&#x27;s what stuck with me. I&#x27;m well aware about the non-robustness properties of Mongo, but to me it seems like calling this a clone without the scale-out capabilities would be missing the point.
评论 #9410214 未加载
luke-stanleyabout 10 years ago
Python has a nice non-SQL style interface to SQL engines too, called Dataset: <a href="http:&#x2F;&#x2F;dataset.readthedocs.org&#x2F;en&#x2F;latest&#x2F;" rel="nofollow">http:&#x2F;&#x2F;dataset.readthedocs.org&#x2F;en&#x2F;latest&#x2F;</a>
ciesabout 10 years ago
Benchmarks please! Response times, mem usage, disk usage.<p>Does it use HSTORE?<p>Nice project!
innguestabout 10 years ago
Makes sense they&#x27;re porting MongoDB to Postgres, given that:<p>&quot;As of version 9.4, PostgreSQL benchmarks faster than MongoDB for both inserting and querying JSON data.&quot; :P
lc1about 10 years ago
ELI5 does this essentially mean I can use the Mongo API to work with Postgres?
rbryan71about 10 years ago
Why?
评论 #9408182 未加载
评论 #9407568 未加载