stripe-archive / mosql

MongoDB → PostgreSQL streaming replication
MIT License
1.62k stars 224 forks source link

Would this not be better done as a FDW? #35

Closed ollym closed 11 years ago

ollym commented 11 years ago

I haven't delved too deep into the code, but I was wondering why you couldn't accomplish the same thing by writing a foreign data wrapper for MongoDB?

See: http://wiki.postgresql.org/wiki/Foreign_data_wrappers

nelhage commented 11 years ago

The folks at Citus Data have actually already written that FDW, which I experiment with before writing MoSQL: https://github.com/citusdata/mongo_fdw

MoSQL has several advantages, including:

ollym commented 11 years ago

Would it not be better to improve the FDW driver? Since Postgres 9.3 you can now send updates via the FDW as-well. I wouldn't know about the efficiency of JOINs etc. but it looks like this is postgres' way forward

nelhage commented 11 years ago

If you want to improve the FDW and find that works better for your application, great! We've found that MoSQL works great for our use case, and believe that the model has several fundamental advantages, including performance of queries and aggregates, isolation from production, and the ability to write code in something other than C.