× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 9/19/18, 8:05 AM, Gerald Magnuson wrote:
I am trying to optimize this

I have a http api that I need to hit repetitively :

As it happens, I'm in the same boat.

I've got a suite of RESTful web services, running as part of a Tomcat webapp, on a Google Compute Debian instance (the same one I mentioned before) that I'm hitting tens of thousands of times, mostly with http_url_post_raw calls.

The /tmp/httpapi_debug.txt log file tells me that the HTTPS negotiations are happeing for every single web service call, and I suspect that this is a significant drag on throughput.

I've already had to use http_persist_open, http_persist_req, and http_persist_close, but *only* to handle a service that required a PUT request, and my calls looked like (proprietary information redacted, and blanks squeezed to fit):
C eval wwComm = http_persist_open(%TRIM(XYZSERVER) +
C '/rest/foo/update?id='
C + %TRIM(XRFRECID8))
C IF wwComm = *NULL
C'open failed' DSPLY
C ELSE
C eval rc=http_persist_req('PUT':
c wwComm : %TRIM(XYZSERVER) +
C '/rest/foo/update?id='
C + %TRIM(XRFRECID8)
c : 0 : *NULL : updrecp : 48 : 0 :
c %paddr('FILL_BUFFY') :
C HTTP_TIMEOUT: HTTP_USERAGENT :
C 'application/json')
c callp http_persist_close( wwComm )

As you can see, the URL I'm feeding the http_persist_open is very specific to the request that follows. If I'm to use a persistent connection AS a persistent connection, the URL establishing that connection would have to be somewhat more general.

Can that be done, and if so, how? Can somebody either point me to an example, or show me how I would modify the above code?

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.