While it's true there's some overhead starting the JVM, which will make it expensive for one off requests, it's not significant if you are making multiple requests from the same job. On our production machine it takes between 5 and 10 seconds for the first request to happen, after that, round trip request times are in the hundreds of milliseconds, almost all of which will likely be the network and transport cost. Even if Java did perform worse than native RPG (which might be open to debate, but is probably true) then the difference would be marginal when compared to the comms overhead. The missing error information is probably my biggest grievance with the SQL web functions, there was a request open to have this added I think but it's never been done to my knowledge (but I'm stuck on 7.1 for much of my production work so it might be there now).

For the manipulation of JSON objects in SQL Java is not used so there's no appreciable performance penalty, I see no reason not to use them even if you use another method of sending the request itself.

In any case, ordinary SOAP/JSON web service requests can easily be done in just few lines of code without any third party dependencies. It's also much faster to develop them IME because you can run the SQL statements directly in the UI and see the immediate results, without having to compile, run and debug an RPG program each time you make a change. Once working, the SQL code can simply be pasted, as is, into a program if required.

Tim.

________________________________
From: Cabero <cabero@xxxxxxxxxxxxx>
Sent: 23 January 2020 12:16
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Cc: Tim Fathers <X700-IX2J@xxxxxxxxxxx>
Subject: Re: [WEB400] RPG JSON YAJL

HTTPAPI / YAJL
•Easy to use•Full-featured, offers capabilities that none of the others do
•Performs very well
•Requires you to download/install 3rdparty software

Db2 SQL Functions in SYSTOOLS
•Easy to use
•Has most needed features; missing multipart; missing error details
•Performs slowly, uses a lot of resources (due to Java JVMs)
•Included with OS, nothing to install

AXIS C Transport API
•More difficult to use; pointer techniques; more code to do the same things
•Only does HTTP, none of the additional needed features
•Performs very well•Included with OS, nothing to install

On 2020-01-23 12:35 PM, Tim Fathers wrote:
Really? I kind of know what you mean but once you understand them
they're pretty easy and well typically documented (something IBM does
exceptionally well IMO) and it seems to me better to use what's
available natively on the platform. These days I use SQL for pretty
much everything so I'm just used to it, I can't remember the last time
I wrote a program that used native I/O instead of embedded SQL but it
was years ago.



________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxxxxxxxx>> on behalf of Justin
Taylor <JUSTIN@xxxxxxxxxxxxx<mailto:JUSTIN@xxxxxxxxxxxxx>>
Sent: 22 January 2020 19:15
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx<mailto:web400@xxxxxxxxxxxxxxxxxx>>
Subject: Re: [WEB400] RPG JSON YAJL

Personally, I tried out the SQL functions when they were first
released. I found them counterintuitive, as well as clunky and
difficult to use.



-----Original Message-----
From: Tim Fathers [mailto:X700-IX2J@xxxxxxxxxxx<mailto:X700-IX2J@xxxxxxxxxxx>]
Sent: Wednesday, January 22, 2020 11:24 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <WEB400@xxxxxxxxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxxxxxxxx>>
Subject: Re: [WEB400] RPG JSON YAJL

...I'm curious as to why you'd use YAJL instead of embedded SQL to
create/consume JSON in RPG, which seems to me to be a better option?

Tim.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C99bdfadc2dc4493102c608d79f671f46%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153137557742477&amp;sdata=6nZAeFjKb%2F3NDbVdQ2maDhpWkgACPWE8uUyZ1iwKB20%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C99bdfadc2dc4493102c608d79f671f46%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637153137557742477&amp;sdata=aOiBTAiJq7DnWt72QL2P448NkO6WV1Ix7%2BxcZ%2BAlL8M%3D&amp;reserved=0.

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.