简体   繁体   中英

Mongodb Emulator to simulate real nosql transactions

I'm trying to develop and application a "database builder" or a designer that will enable the users to experiment on using mongodb as well as produce them json databases.

Question is:

  1. I wanted to do this because of I am afraid that the users of the application will have actual interaction on the database and let them do what they want, am I right on this one, is providing the user real mongodb interaction will have security risk?

  2. Are there javascript libraries to do what I wanted?

is providing the user real mongodb interaction will have security risk?

Providing direct interaction without security measures to any part of your app, whether it be a page or the database is a security risk. You will want an abstraction layer ontop which will sanitise the queries inputted into the database.

Are there javascript libraries to do what I wanted?

Not that I know of.

I think the safer way to do this will be to create a server side code (PHP, Java or whatever) that handles your Client (browser/javascript) requests and then connects to the database and do what your application serves, instead of connecting your javascript libraries to the database, I will recommend this with any database, not only mongo.

Also this will help you to build an interface that could easy be ported to other JSON based databases.

If you are good at javascript I would recommend nodejs at the server side, that way you will have your language in both sides, and it'll be easier to catch asynchronous calls, etc.

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM