Hi! i just uploaded a very very early version of my rest api server on github
https://github.com/blestan/UltraMachinethe server is multithreaded and requests are handled in a pool of threads - half permanents half spwned on demand.
the server is indended to run behind a loadbalancing reverse proxy with ssl termination ( HA Proxy or Digital Ocean loadbalancers) thats why any ssl stuff is stripped!!!
this backend i focused on serving heavy load JSON for real world mobile apps with frontends build with ionic or react native.
the flow is the following when a request arrives the backend finds the application object that will handle it then the app returns a handler object for the path requested and the object handles the request ... then the thread goes to sleep over RTLEvent and does not consume any cpu
the idea is to use as many static memory as possible to avoid getmems/freemems and memory fragmentation. even the threads are not TThread class ... everywhere where possible pools of preallocated records are used. ofcourse my own json parser (fpc-xon) is heavely used
) .. i will add hashes to fpc-xon in several days for serving in memory json object db.. node replication is planed
any comments are welcome
and dont forget - this is not a production ready backend yet!!!
P.S: The name UltraMachine is a tribute to my favourite band Depeche Mode
))