Hello!
This may be a silly question, but I’m curious about the visualisation nodes that are part of the JavaScript in Views.
Are these visualisation nodes developed in JavaScript and use Java resources when running on the server?
Thanks.
Hello!
This may be a silly question, but I’m curious about the visualisation nodes that are part of the JavaScript in Views.
Are these visualisation nodes developed in JavaScript and use Java resources when running on the server?
Thanks.
Hi,
The JavaScript nodes are a mix of Java and JavaScript. Java is used like in any other node to prepare the data and bring it into the right format. Then that data is serialized as JSON and added to the JavaScript code. In the browser and the views in the KNIME Analytics Platform the JavaScript is then executed (in the browser in a separate iframe element), reads the JSON, and uses it to generate the output by modifying the HTML content.
Kind regards,
Alexander
Thanks for the answer, @AlexanderFillbrunn
In the end, can I understand that the visualisation nodes (Bar Chart, Box plot, etc.) are composed of a mix of Java and JavaScript, and the data to be used in the visualisation is loaded based on Java?
If so, when I run those nodes on the server, do they use Java resources?
Best regards
JaeHwanChoi
Hi @JaeHwanChoi,
Yes, they do use Java resources, but very little. There is generally not much heavy computation going on in those nodes.
Kind regards,
Alexander
Thank you. @AlexanderFillbrunn
I currently use 6 visualisation nodes in one Workflow and then bring up an interactive view.
When I repeat this process in a schedule for about 7 days, the Java resources on the server are constantly stacking up and allocating more than 8 cores.
However, as you said, Java builds up very little, so should I look for the source of Java’s resource leakage on other nodes besides the visualisation nodes?
Best regards
JaeHwanChoi
Hi @JaeHwanChoi,
I do not think it is the visualization nodes’ fault. You are saying that it allocates cores. Do you mean your core tokens are all used up and the executor does not take on any jobs? This should only only happen if more that 16 nodes are running at a time (8 core tokens = 16 threads). You can check which threads are currently working and on what node by taking a jstack snapshot of your executor. jstack is a tool to print all currently active threads in a Java application. If you find your executor’s process ID, you can run jstack <pid>
to see the threads. Write that to a file and see how many KNIME-worker threads there are and what they are doing (there should be a node name next to the thread name). If you want I can also have a look. Let me know if you’d want that and I send you my email address in a private message.
Kind regards,
Alexander
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.