The blog posts go into more details: http://legitimatesounding.com/blog/building_a_mongodb_clone_... and http://legitimatesounding.com/blog/building_a_mongodb_clone_...
Which leads to a question for the OP: does this work with mongoose.js?
in the end, i just wrote my own database system, with a query language that could act as an intermediary from multiple sources (SQL, mongo, etc).
but, this stuff is mostly just for fun, my day job keeps me plenty busy.
http://www.postgresql.org/docs/devel/static/logicaldecoding.... for the (somewhat low level) description of the feature. You'd have to write an output plugin that formats the output as json, but that should be pretty easy.
Disclaimer: I'm the author of the feature ;)
What happened to separating the data access layer from the business logic layer? Oh yeah, "good architectural practices are so JEE ..." /s