Except that with node and Express we are NOT using CGI.
Yes, the Express framework is not necessary. But, if we do decide to start using node for web apps and not just web services, then we would want to use a framework like Express or Hapi. So why not learn to use it now?
Express really isn't that hard to use. And our goal isn't to have the smallest possible footprint. We have no problem using modules that make sense for us. Others, of course, are free to pursue their own paths. I'm not suggesting the way we do things is the way everyone should do things.
Thanks,
Kelly Cookson
IT Project Leader
Dot Foods, Inc.
217-773-4486 ext. 12676
www.dotfoods.com<
http://www.dotfoods.com>
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Bradley Stone
Sent: Tuesday, April 10, 2018 8:17 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] [EXTERNAL] Re: ibm_db node module and IBM Data Server Driver
On Tue, Apr 10, 2018 at 8:06 AM, Kelly Cookson <KCookson@xxxxxxxxxxxx<mailto:KCookson@xxxxxxxxxxxx>>
wrote:
My understanding is that you can use Node.JS through CGI, but that is not
required. If we use node and Express to set up a node web server, then use
the Node Toolkit for i, I think it's using stored procedures under the
covers for performance reasons. We would not be using the Apache web server
and CGI.
Express is just a way to serve content just like Apache and CGI. You could
also use the built in http module in node instead of express.
In fact, I did a node project and started with express. Because it was
just a data server/webhook app, I decided to remove express. The app when
from 32 meg to under 1 meg in size because of all the dependencies.
I wouldn't use Express for simple data serving. Maybe for web sites, but
not web services. Did they remove david hasslehoff picture dependency from
express yet? lol.. there was some funny stuff in there for sure.
CGI is a perfectly fine technology. It can satisfy needs in many cases.
I'm not saying everyone should avoid CGI.
Would you care to explain what is the difference between CGI and
Node/Express? Maybe we're looking at this differently, when they're really
not.
We want to plan for fast performance under very high volumes of concurrent
requests. We feel node would offer better performance than CGI under those
conditions. (If this isn't the case, then IBM is doing node wrong on the
IBM i.)
I would put money on CGI over Node, especially for high volumes.
Not to mention, you probably have most of the business logic already in
your COBOL programs. Service the data up as JSON would be simple compared
to starting to put all those node dependencies out there.
Not saying node is bad... but you're view of what CGI is, what will be
faster is being muddle with what is "hip" I think. :)
It's not about IBM doing node wrong, it's just hard to compete with the
more native interface when it comes to speed. IBM is simply offering
different avenues of getting from point A to point B.. which is good. But
that doesn't mean it's faster.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/web400<
https://lists.midrange.com/mailman/listinfo/web400>
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/web400<
https://archive.midrange.com/web400>.
As an Amazon Associate we earn from qualifying purchases.