|
I guess what I mean is if it is in a callback then the very next line ofcode gets executed instantly, so in that respect you would not notice it.
I guess what I mean is if it is in a callback then the very next line of
code gets executed instantly, so in that respect you would not notice it.
Sent from my iPad
On 13 Oct 2015, at 22:05, Aaron Bartell <aaronbartell@xxxxxxxxx> wrote:
thebut too minute to be noticed. If you put a trillion identical lines in
main code you might notice it, but not if you did the same in a callback.(callback
I don't believe this is correct, though I don't have any evidence (yet).
As I understand it it doesn't matter where the Javascript code is
or not) it instead matters when that Javascript is given its turn on thein
call stack. What DOES matter is when a callback, by way of a particular
APIs, makes use of C threading. It is then that Javascript (somehow)
relinquishes control to the C thread and is able to continue to the next
the callback queue while still holding onto the callback pointer the Cyet
thread will eventually call back to. This latter part is what I don't
have a firm grasp.https://www.quora.com/What-provides-the-event-loop-in-node-js-v8-or-libuv
What is the relationship between the event loop of V8 in browsers versuslibuv in node?
An answer:
kevin.turner@xxxxxxxxxxxxxxx>
I have not yet researched what/how the browser does its event loop. To
date it's "just worked", but obviously once we get to the server-side it
becomes much more important.
Aaron Bartell
litmis.com - Services for open source on IBM i
On Tue, Oct 13, 2015 at 3:50 PM, Kevin Turner <
wrote:app
I think it depends on whether or not that line of code is in the main
butcode or in a callback. If the former then I would say it is blocking -
maintoo minute to be noticed. If you put a trillion identical lines in the
rathercode 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
orthan dropping something on the "web api" stack.off
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
Imulti threaded. In literal context Node.js is strictly single threadedBUT
there can be additional threads in the same Node.js process if the
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...
thedo
believe everything in Javascript is blocking in nature. For example,
<below line of code blocks the Node.js thread until it is complete. Theand
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?
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.
sense. Immurphy@xxxxxxxxxxxxxxx> wrote:of
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
than dropping something on the "web api" stack. That makes more
web400@xxxxxxxxxxxx>easierlike the animations, and the little tool behind this video. Makes it
to 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)" <
currentlyloop. IFrom: 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
in nature, and that can happen simply by writing a bit of Javascript
incorrectly (assuming the intention was to NOT block). Note,
Inc. <the
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
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
web400@xxxxxxxxxxxxnode.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
in 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)" <
jobtime
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
it's re-initiated and I could see this being intensive if you had tocreate
a new session for each interaction.
You can start the IPC session with a unique name and use the same
the Iover and over if I want to maintain state and use the same job on
andwhich should improve performance I think.
Not sure how the node toolkit works, but this works good with .Net
----------------------------------------------------------------------should be similar depending on how the toolkit was implemented.
HelpSystems
Regards,
Richard Schoen | Director of Document Management Technologies,
T: + 1 952-486-6802
RJS Software Systems | A Division of HelpSystems
richard.schoen@xxxxxxxxxxxxxxx
www.rjssoftware.com
Visit me on: Twitter | LinkedIn
code
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
diedsecondsthat sits and waits of data on a keyed data queue. It waits for 5
thenthen loops round and checks some stuff (like an instruction to end)
waits again.
When I did the same in a node app using itoolkit, the LPAR simply
showingon its feet. It wasn't obvious why because the node app was not
toup
as using much CPU. However it certainly was the culprit - I changed
Thewait
for 60 seconds instead as it wasn't essential to loop every 5 secs.
wrote:problem went away.
On 10 Oct 2015, at 15:58, Nathan Andelin <nandelin@xxxxxxxxx>
entityintendedmailing
--
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
by CoralTree Systems Ltd for the use of the named individuals or
orto
which it is directed and may contain information that is privileged
bycopyingotherwise 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
--------------------------------------------------------------------------------telephone, so that the sender's address records can be corrected.
mailingmailing
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--
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)
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)
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)
tolist
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
copying orwhich 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
--------------------------------------------------------------------------------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.
list--
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.
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.