HTMLRenderer on the Server

General APL language issues
Post Reply
paulmansour
Posts: 431
Joined: Fri Oct 03, 2008 4:14 pm

HTMLRenderer on the Server

Post by paulmansour »

Tools like Node https://nodejs.org/en/, and Deno https://deno.com/ and others allow running JavaScript on the server without a browser.

What would be the drawbacks, if any, of using the HTMLRenderer on the server to execute Javascript from APL?

The form/window of course would be irrelevant and could be hidden or ignored.
User avatar
Morten|Dyalog
Posts: 460
Joined: Tue Sep 09, 2008 3:52 pm

Re: HTMLRenderer on the Server

Post by Morten|Dyalog »

Hi Paul! I can't think of a reason why it would be a quote bad idea unquote to create an HTMLRenderer with ('Visible' 0) to run JavaScript. In fact, I have been experimenting with doing exactly this in our experimental "EWC" tool (http://github.com/dyalog/ewc), to have the ApexCharts library generate SVG graphics from APL without displaying them to the user.
User avatar
kai
Posts: 141
Joined: Thu Jun 18, 2009 5:10 pm
Location: Hillesheim / Germany

Re: HTMLRenderer on the Server

Post by kai »

What does that mean in terms of resources? In particular when a significant number of requests need to be handled in parallel.

(My guts are saying this can't be right)
User avatar
Morten|Dyalog
Posts: 460
Joined: Tue Sep 09, 2008 3:52 pm

Re: HTMLRenderer on the Server

Post by Morten|Dyalog »

Well, the answer to that is going to be "it depends" :).

Spinning up the HTMLRenderer probably costs about 10,000 times more than producing a chart in JavaScript, so I wouldn't spin a new one up each time, if performance was critical.
Post Reply