|
but too minute to be noticed. If you put a trillion identical lines in themain code you might notice it, but not if you did the same in a callback.
What is the relationship between the event loop of V8 in browsers versuslibuv in node?
I think it depends on whether or not that line of code is in the main app
code or in a callback. If the former then I would say it is blocking - but
too minute to be noticed. If you put a trillion identical lines in the main
code you might notice it, but not if you did the same in a callback.
Sent from my iPad
On 13 Oct 2015, at 21:12, Aaron Bartell <aaronbartell@xxxxxxxxx> wrote:
ofSo what you are saying is that the call to read the data queue is part
the DB2 adapter, and stays in the program stack until it completes ratheroff
than dropping something on the "web api" stack.
Correct, and the way Node.js gets around that is through handing stuff
to C as a separate thread in the same process (aka IBM i job). This iswhy
you'll see debates on the web about whether Node.js is single threaded orBUT
multi threaded. In literal context Node.js is strictly single threaded
there can be additional threads in the same Node.js process if thedo
particular Node.js API (i.e. fs.readFile) implements C code under the
covers that creates a new/separate thread.
At least that's my understanding of it.
One thing I've been pondering but am not sure what audience to ask... I
believe everything in Javascript is blocking in nature. For example, theand
below line of code blocks the Node.js thread until it is complete. The
thing is it completes really fast, so it doesn't often get put into the
category of "code that blocks". Instead only file system, networking,
database IO gets put into the "code that blocks" category because itblocks
for long(er). Anybody know if that is a correct train of thought?of
var x = 123;
Aaron Bartell
litmis.com - Services for open source on IBM i
On Tue, Oct 13, 2015 at 3:01 PM, Mark Murphy/STAR BASE Consulting Inc. <
mmurphy@xxxxxxxxxxxxxxx> wrote:
So what you are saying is that the call to read the data queue is part
ratherthe DB2 adapter, and stays in the program stack until it completes
easierthan dropping something on the "web api" stack. That makes more sense. I
like the animations, and the little tool behind this video. Makes it
loop. Ito understand what is going on.
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----Aaron Bartell <aaronbartell@xxxxxxxxx> wrote: -----
To: "Web Enabling the IBM i (AS/400 and iSeries)" <web400@xxxxxxxxxxxx>
From: Aaron Bartell <aaronbartell@xxxxxxxxx>
Date: 10/13/2015 03:28PM
Subject: Re: [WEB400] Why does node's Toolkit for i, use a database
connection to execute CL commands?
Awhile back I dug deep to learn about the Node.js/Javascript event
blockingfound the following and I'd highly recommend watching it.
http://latentflip.com/loupe
The kicker that breaks a single Node process is when something is
thein nature, and that can happen simply by writing a bit of Javascript
incorrectly (assuming the intention was to NOT block). Note, currently
webDB2 adapter for Node.js is blocking. This more or less necessitates
multiple Node.js processes so you don't end up with a waiting line of
node.requests.
​
Aaron Bartell
litmis.com - Services for open source on IBM i
On Tue, Oct 13, 2015 at 2:06 PM, Mark Murphy/STAR BASE Consulting Inc. <
mmurphy@xxxxxxxxxxxxxxx> wrote:
I recognize this technique, but, due to my knowledge of node beinglimited
at best, I have to wonder if this is an appropriate technique using
andThat is, since Node is event driven, should there be a need to wait,
whenthen loop around and check conditions again. RPG is not event driven,hence
the need for such a loop. But I was under the impression that Nodealready
incorporates this event loop and will call the appropriate function
eventthe event occurs. I would expect to have to register to receive the
timein some way, but not to have to code the event loop.
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----Kevin Turner <kevin.turner@xxxxxxxxxxxxxxx> wrote: -----
To: "Web Enabling the IBM i (AS/400 and iSeries)" <web400@xxxxxxxxxxxx
From: Kevin Turner <kevin.turner@xxxxxxxxxxxxxxx>deeper
Date: 10/11/2015 04:44PM
Subject: Re: [WEB400] Why does node's Toolkit for i, use a database
connection to execute CL commands?
That's interesting stuff - thanks. I'm not entirely sure how to dig
but I will try :)Richard.Schoen@xxxxxxxxxxxxxxx>
On 11 Oct 2015, at 17:47, Richard Schoen <
wrote:
I wonder if the loop is forcing a new job start each time on the i.
With XMLCGI, there is an IPC service that takes a few seconds each
secondsit's re-initiated and I could see this being intensive if you had tocreate
a new session for each interaction.
over and over if I want to maintain state and use the same job on the I
You can start the IPC session with a unique name and use the same job
which should improve performance I think.
should be similar depending on how the toolkit was implemented.
Not sure how the node toolkit works, but this works good with .Net and
HelpSystems
Regards,
Richard Schoen | Director of Document Management Technologies,
T: + 1 952-486-6802that sits and waits of data on a keyed data queue. It waits for 5
RJS Software Systems | A Division of HelpSystems
richard.schoen@xxxxxxxxxxxxxxx
www.rjssoftware.com
Visit me on: Twitter | LinkedIn
----------------------------------------------------------------------
message: 1
date: Sat, 10 Oct 2015 22:32:23 +0000
from: Kevin Turner <kevin.turner@xxxxxxxxxxxxxxx>
subject: Re: [WEB400] Why does node's Toolkit for i, use a database
connection to execute CL commands?
It may or may not be of interest or relevant, but we have lots of code
thenthen loops round and checks some stuff (like an instruction to end)
intendedwaits again.up
on its feet. It wasn't obvious why because the node app was not showing
When I did the same in a node app using itoolkit, the LPAR simply died
as using much CPU. However it certainly was the culprit - I changed towait
for 60 seconds instead as it wasn't essential to loop every 5 secs. Themailing
problem went away.
On 10 Oct 2015, at 15:58, Nathan Andelin <nandelin@xxxxxxxxx> wrote:
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is
copyingby CoralTree Systems Ltd for the use of the named individuals or entityto
which it is directed and may contain information that is privileged or
otherwise confidential. If you have received this electronic mail
transmission in error, please delete it from your system without
--------------------------------------------------------------------------------or
forwarding it, and notify the sender of the error by reply email or by
telephone, so that the sender's address records can be corrected.
mailing
CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailinglist
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
list--list--
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is intended
by CoralTree Systems Ltd for the use of the named individuals or entity to
which it is directed and may contain information that is privileged or
otherwise confidential. If you have received this electronic mail
transmission in error, please delete it from your system without copying or
forwarding it, and notify the sender of the error by reply email or by
telephone, so that the sender's address records can be corrected.
--------------------------------------------------------------------------------
CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
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.