MongoDB as database. Also, there will be probably mobile aps for iPhone and
Android, possible REST API and more. We need to write middle layer over raw
database ("model" in desing pattern MVC or MVP) with as much shared
functionality as possible. What is smart way to write middle layer in such
a scenario ?
Options we are considering:
1) Write middle layer as PHP library. Plus: super easy connection to PHP
frontend, but not so great for other use-cases (mobile aps, REST
API...). Also not so great for security and isolation.
2) Write middle layer as server-side executed code<http://www.mongodb.org/display/DOCS/Server-side+Code+Execution#> on
MongoDB server. But they are too many limits limits (db.eval() write lock,
one shard only) as well as it seems it not recommended usage of this
MongoDB functionality. I was looking for MongoDB extensions which would
extend server-side code execution capabilities, but found none.
3) Write middle layer as independent web service, for example in PHP,
python or Node.js. Main problem which I see - MongoDB communicate in BSON.
Many middle layer functions would do simple MondoDB query. Than they would
have to re-encode result in some other serialization standard (since BSON
is MongoDB specific) and then send results to client - which seems to me
like big waste.
Unless we find better solution, we will probably go for variant 1), but any
advice would be really appreciated.
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb