Middleware enables consumers to hook into the ShareDB server pipeline. Objects can be asynchronously manipulated as they flow through ShareDB.
This can be particularly useful for authentication, or adding metadata.