× 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.



Jim,

I think all you need to do is open the connection to just the server the
server...

wwComm = http_persist_open(%TRIM(XYZSERVER));

rc=http_persist_req('PUT': wwComm : %TRIM(XYZSERVER) +
'/rest/foo/update?id='
+ %TRIM(XRFRECID8)
: 0 : *NULL : updrecp : 48 : 0 :
%paddr('FILL_BUFFY') :
HTTP_TIMEOUT: HTTP_USERAGENT :
'application/json');

Charles


On Thu, Oct 4, 2018 at 11:40 AM James H. H. Lampert <
jamesl@xxxxxxxxxxxxxxxxx> wrote:

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
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.