Author Topic: RESTful API Server  (Read 4092 times)


  • Sr. Member
  • ****
  • Posts: 461
RESTful API Server
« on: May 12, 2017, 12:08:41 am »
Hi! i just uploaded a very very early version of my rest api server on github

the 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 :)))
« Last Edit: May 12, 2017, 12:16:42 am by Blestan »
Speak postscript or die!
Translate to pdf and live!


  • Full Member
  • ***
  • Posts: 111
Re: RESTful API Server
« Reply #1 on: May 19, 2017, 07:24:53 pm »

perhaps missing the test.lpr file?



  • Sr. Member
  • ****
  • Posts: 461
Re: RESTful API Server
« Reply #2 on: May 20, 2017, 12:45:42 am »
the backend test project is named TestMachine.lpr
you need also to download the fpc-xon package from my github account because ultramachine is based on fpc-xon ...
you need a  program like postman or apc ( chrome app) to send queries to the api server

( please not that for the moment this is under heavy developpment and its not functional yet - i'm testing all the parts like threads sockets http parsing etc ..)
« Last Edit: May 20, 2017, 12:52:26 am by Blestan »
Speak postscript or die!
Translate to pdf and live!


  • Hero Member
  • *****
  • Posts: 2987
Re: RESTful API Server
« Reply #3 on: March 09, 2018, 12:31:31 am »
Hi, know it's an old thread, but what is the status now?

Last commit July 15 2017 (for your two projects).

And then seems that there are no more contributions to this..