#1 2019-05-20 06:21:23

berocoder
Member
From: Nedervetil, Finland
Registered: 2017-01-13
Posts: 19

Rest demo for server ?

I am a developer of a team that already use mormot framework for networking.
We have a webserver built in Delphi Berlin that use LKJSON code to serve REST calls from clients.
But that code is old, slow and leak memory. So we want to try mormot instead.
We already use ORM with Bold for Delphi and want to keep that.

I only want to use REST in mormot but not sure where to start.
I think a simple demo of a restserver would be best.

/Roland

Offline

#2 2019-05-20 08:10:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Rest demo for server ?

The samples are in https://github.com/synopse/mORMot/tree/ … e3/Samples

See samples 13, 14, 16, 20 and 28 for instance.

Consider using interface-based services which create the client code for you, and is easier to maintain.
If you want to have full compatibility to an existing REST interface, perhaps a method-based service may be needed, since it allows any kind of input/output, but needs some more coding.
In both cases, performance should be very good. We serve TB of data on Windows and Linux servers with no leak, on some production projects.

Also read the corresponding part of the doc at http://synopse.info/files/html/Synopse% … 01.18.html

Offline

Board footer

Powered by FluxBB