I am no expert on the architecture, but it is my understanding (perhaps wrong) that the V8 engine is simply a JavaScript engine, and as such is something that node runs in, and it uses an event loop library that is separate and distinct from V8 called libuv, which is a multi platform abstraction of libev (making node executable on non-UNIX platforms). Of course, there must be something else about v8 that node needs, otherwise it could also run (slowly) in Rhino.

I doubt that V8 itself has any reliance on libuv. It is just an JavaScript execution engine, and so would not have a need for an event looping facility when executing JavaScript within a browser. If it did, then it would not have worked very well on Windows before libuv was created.

But of course that could all be deluded nonsense - it is just my high level interpretation of the stuff I have read on the topic.

Sent from my iPad

On 13 Oct 2015, at 22:46, Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote:

Kevin,

V8 is a dependency of node, but V8 is not part of the architecture of node (per se). Node has a library called libuv that I understood to be the home of the event loop for node.

Does V8 use libuv when it runs in the browser, and node is not installed?

Thanks,

Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin Turner
Sent: Tuesday, October 13, 2015 4:09 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] Why does node's Toolkit for i, use a database connection to execute CL commands?

V8 is the engine that runs JavaScript on the browser (chrome) or the server. As far as I know node.js always runs in the v8 engine on the server. Wasn't the delay in getting it on the IBMi simply down to the fact that the V8 engine couldn't (until recently) run on that platform? The event loop is a function of node, not the v8 engine.

Sent from my iPad

On 13 Oct 2015, at 21:52, Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote:

Aaron,

Just curious... the presentation looked like it was for the V8 event loop when V8 is used in browsers.

I've read the node has its own event loop (libuv). This puts the event loop in the architecture of node, which is distinct from the architecture of the V8 engine.

What is the relationship between the event loop of V8 in browsers versus libuv in node?

Thanks,

Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Aaron
Bartell
Sent: Tuesday, October 13, 2015 2:28 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
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 loop. I found 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
blocking in nature, and that can happen simply by writing a bit of
Javascript incorrectly (assuming the intention was to NOT block).
Note, currently the
DB2 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 web 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 being
limited at best, I have to wonder if this is an appropriate technique using node.
That is, since Node is event driven, should there be a need to wait,
and then 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 Node already incorporates this event loop and will
call the appropriate function when the event occurs. I would expect
to have to register to receive the event 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)"
<web400@xxxxxxxxxxxx>
From: Kevin Turner <kevin.turner@xxxxxxxxxxxxxxx>
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
deeper but I will try :)

On 11 Oct 2015, at 17:47, Richard Schoen
<Richard.Schoen@xxxxxxxxxxxxxxx>
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
time
it's re-initiated and I could see this being intensive if you had to
create a new session for each interaction.

You can start the IPC session with a unique name and use the same
job
over and over if I want to maintain state and use the same job on the
I which should improve performance I think.

Not sure how the node toolkit works, but this works good with .Net
and
should be similar depending on how the toolkit was implemented.

Regards,

Richard Schoen | Director of Document Management Technologies,
HelpSystems
T: + 1 952-486-6802
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
that sits and waits of data on a keyed data queue. It waits for 5
seconds then loops round and checks some stuff (like an instruction
to
end) then waits again.

When I did the same in a node app using itoolkit, the LPAR simply
died
on its feet. It wasn't obvious why because the node app was not
showing up as using much CPU. However it certainly was the culprit -
I changed to wait for 60 seconds instead as it wasn't essential to
loop every 5 secs. The 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)
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 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.
--
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 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 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.

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

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.