Roadmap

RESTHeart 4.0

Expected release date: May 24, 2019

Security

RESTHeart 4.0 delegates security to uIAM and does not embed security functions anymore.

uIAM is a spin-off project from RESTHeart. It is a Identity and Access Manager that includes and extends the security features embedded in RESTHeart 3.x.

uIAM only focus on security while RESTHeart 4.0 just provides a Web API for MongoDB in the spirit of having software bricks each of whom does just one thing and does it well.

uIAM follows the same dual licensing scheme of RESTHeart.

Development status

  • done in branch next
  • security features removed
  • all original RH security test works with uIAM in front of RH4

TODOs

  • add documentation about running RH with uIAM

Representation format

We received many feedbacks asking for a simpler representation format and we have worked on it for mrest.io, the cloud RESTHeart service (currenlty in beta).

You can try the new format creating a free account at mrest.io.

Starting with RESTHeart 4.0 a new simpler representation format is available. The 3.x representation formats (plain json and HAL) will be still be available.

The new format, called STANDARD, is as follows:

# list of dbs -> GET /

[
    "db_1", 
    "db_2", 
    ...,
    "db_n"
]

# list of collections of a db -> GET /db

[ 
    "collection_1", 
    "collection_2", 
    ...,
    "collection_n" 
]

# metadata of a collection  -> GET /db/_meta

{
    "args": [...]
    "checkers": [...],
    "transformers": [...],
    "streams": [...]
}

# documents of a collection -> GET /db/coll
[ 
    { <doc_1> },
    { <doc_2> },
    ...,
    { <doc_n> }
]

# a document -> GET /db/coll/docid

{ 
    "prop_1": value,
    "prop_2": value,
    ...,
    "prop_n": value,
}

Development status

TODOs

  • updated documentation about the new STANDARD representation format

Changes Streams with Websocket

RESTHeart Pro 4.0 fully supports change streams introduced by MongoDB 3.6 for replica sets.

note: this feature is only available with RESTHeart Pro.

A new resource is available, called stream. A stream can be created specifying a collection metadata that defines an aggregation and a URI in a similar way than an aggregation resource is currently defined.

The stream URI endpoint will open a Websocket for the client to be notified of updates on the aggregation result.

Development status

  • done in branch next

TODOs

  • add documentation about change streams.
  • write documentation about streams
  • add stream to use hooks

Sessions

RESTHeart 4.0 fully supports sessions introduced by MongoDB 3.6.

Development status

  • done in branch next

TODOs

  • add documentation about change streams.

Transactions

RESTHeart Pro 4.0 fully supports multi document transactions introduced by MongoDB 4.0 for replica sets.

note: this feature is only available with RESTHeart Pro.

Following the REST paradigm, the approach to support transactions is modeling them as first class resources.

The client can start a transaction:

#start a session
POST /_sessions
Location: /_sessions/53874250-874f-4f48-84e2-145428e9af7b

#start a tx in the session
POST /53874250-874f-4f48-84e2-145428e9af7b/_txns

HTTP/1.1 200 OK

Once a transaction has been created, requests can be executed under tis scope:

#create a document in the tx scope
POST /db/coll?sid=53874250-874f-4f48-84e2-145428e9af7b&txn=1 {"a": 1}

HTTP/1.1 201 Created

The transaction can be committed or rolled back:

#commit txn 1 od session 53874250-874f-4f48-84e2-145428e9af7b
PATCH /_sessions/53874250-874f-4f48-84e2-145428e9af7b/_txns/1

HTTP/1.1 204 No Content
#roll back txn 1 of session 53874250-874f-4f48-84e2-145428e9af7b
DELETE /_sessions/53874250-874f-4f48-84e2-145428e9af7b/_txns/1

HTTP/1.1 204 No Content

Development status

  • Work in progress in branch next

Plugin API changes

The java API for plugins (Transformers, Hooks, Checkers and Initializers) will undergo a refactoring aimed at simplify and cleaning the API with limited impacts on existing implementations.

Development status

  • not yet started