RESTHeart

RESTHeart is a Java open source Web API server for MongoDB database that exposes a REST API with CRUD operations.
RESTHeart is dual licensed under the AGPL and a business friendly commercial license. Starting from release 4.0, commercial editions were rebranded as RESTHeart Platform while the simple name RESTHeart keeps referring to the open source edition.
RESTHeart Platform editions offer additional features such as support Amazon Web Service DocumentDB and Azure Cosmos DB, Multi-documented transactions, Change streams and enhanced Security features.
Motivations and architecture.
RESTHeart connects to MongoDB and exposes a simple REST API to read and write data via plain HTTP requests leveraging MongoDB's document-oriented nature and creating an automatic mapping between data and HTTP resources.
It implements the HATEOAS (Hypermedia as the Engine of Application State) model of interaction where the state of an application is driven by HTTP verbs like GET, POST, PUT, PATCH, DELETE, etc.
RESTHeart naturally fits an architecture where there is the need to invoke document-oriented data services on top of MongoDB via HTTP, but programmers don't want to waste time by building repetitive CRUD logic by hand."Imagine the following scenario: you want to develop a Web application on top of a data model, following simple CRUD operations. Data can be modeled as a hierarchy of documents, and MongoDB is a perfect fit for the job, or you already have some data in a MongoDB instance and you want to quickly build a user interface for it."RESTHeart allows to deploy and run specialized, independent micro-services and it's already available via Docker containers.
Technical implementation.
RESTHeart it's fully implemented in Java and embeds Undertow, the non-blocking HTTP server which is one of the core components of the Wildfly Application Server."Undertow is a flexible performant web server written in java, providing both blocking and non-blocking API’s based on NIO." "Undertow has a composition based architecture that allows you to build a web server by combining small single purpose handlers. The gives you the flexibility to choose between a full Java EE servlet 3.1 container, or a low level non-blocking handler, to anything in between." "Undertow is designed to be fully embeddable, with easy to use fluent builder APIs. Undertow’s lifecycle is completely controlled by the embedding application." "Undertow is sponsored by JBoss and is the default web server in the Wildfly Application Server."The multi-threaded process connects to a MongoDB server and exposes its data as operations, via a RESTful interface over the HTTP protocol, so that data clients can interact with the DataBase Management System without the need of a low level database driver.
MongoDB resources such as databases, collections, documents are automatically represented with the Json variant of the Hypertext Application Language.
RESTHeart inherits the same Undertow's pipeline architecture, where specialized handlers are chained together to serve the requests. In order to provide additional logic, custom plugins can be added.
RESTHeart also supports MongoDB's GridFS and allows for storing and retrieving large binary files via HTTP.
Sitting in between the client and the database, RESTHeart also provides "gateway" services, such as Authentication and Authorization, data Transformation and Validation.
Starting from version 4.0, RESTHeart is split in two modules clued together in a micro-service architecture in order to minimize code complexit: restheart-core that handles the REST API and restheart-security that is responsible of enforcing the security policy acting as a reverse proxy for restheart-core.