
Marko Myllymäki (CGI) asked a question.
We are currently using REST transport for our application's REST API. However, many people recommend using WEB transport instead. WEB transport has many advantages over REST transport but I have not seen a performance comparison between the two transports.
I did a small test on my Windows laptop and it seems the WEB transport adds some overhead to the API requests. Calling a simple ping service finished in about 40-50 ms when using REST transport and around 140 ms when using WEB transport. I was using -q in startup parameters. If I removed -q, it had only a minor effect on REST transport but WEB transport times were then typically over 300 ms.
AFAIK, REST handlers are typically (always?) singleton which explains the "immunity" to -q parameter. Is there a way to make a web handler class a singleton as well? Do you have any other tips I could try to make WEB transport faster? What about linux, have you noticed similar performance difference there (I have not tried)?
I am using OE 12.8.
@Marko Myllymäki (CGI)
What it comes down to is that the REST transport is Java based and the Web transport is ABL based.
See also following article: https://community.progress.com/s/article/REST-vs-WEB-transport-for-Data-Object-Services-Which-to-choose
The REST transport may be a bit faster, bit the WEB transport allows for more scalability.
There are a couple of pieces of overhead that can be mitigated in the WEB transport.
Firstly, the REST transport always run the ABL codeas a singleton - ie loads it once per ABL session. PASOE will do this only if the webapp.ablapp.srvrDebug property is set to 0 . The impact of this will depend on what the webhandlers do on startup.
Secondly, the ABL logging adds measurable lag. You can prevent logging from happening before the web handler runs by adding a logging configuration like the below to your logging.config file (see https://docs.progress.com/bundle/openedge-abl-troubleshoot-applications-128/page/ABL-Application-Logging.html for more). This will defer to loading of the logger to the point at which application code uses a more specific OpenEdge logger. If you are using your own logger then you would not see that hit.