Demand
We want to provide a restful API for MongoDB, until now I have no spectrum of design for the RESTful API, just know what I need to meet Now
Support conditional query, using MongoDB command is Db.coll.find ({name: "SPE"}), special, require interface support name:/spe/This fuzzy query supports display fields support SortBy, skip, limit Support for INSERT, update via HTTP GET, put, post needs to be verified by the user of the operation plainly, it is to put mongodb some common operations with the RESTful API, so that a few operations via HTTP can be completed. As a mature kv database, MongoDB should have done this thing well, this is my initial idea. Indeed, MongoDB provides a simple HTTP interface, but this interface only supports query operations for security, and there are relatively few related documents, but it recommends a number of third-party libraries, and I've looked at these several libraries
third-party library code needs to be written in Java, so libraries in other languages are not considered, focusing on two library Restheart, spring data rest Restheart (JDK 1.8) Restheart is open source software, Its source code can be found under GitHub, because the project uses JDK1.6, so restheart I can not use, but I read its description, I think its API style is very pleasing, so I downloaded its code to try to learn from the code what API two experience
Spring Data Rest (JDK 1.6)