We tried to make mORMot at the same time fast and safe, and able to
scale with the best possible performance on the hardware it runs on.
Multi-threading is the key to better usage of modern multi-core CPUs, and also
client responsiveness.
As a result, on the Server side, our framework was designed to be
thread-safe.
On typical production use, the mORMot HTTP server will run on its
own optimized thread pool, then call the TSQLRestServer.URI
method. This method is therefore expected to be thread-safe, e.g. from the
TSQLHttpServer. Request
method. Thanks to the RESTful approach of
our framework, this method is the only one which is expected to be thread-safe,
since it is the single entry point of the whole server. This KISS design ensure
better test coverage.
Let us see now how this works, and publish some benchmarks to test how
efficient it has been implemented.