6.10 and NCHAN


Recommended Posts

Hi @bonienl

 

As per your post on memory leak thread:

 

Starting with Unraid version 6.10 the traditional polling mechanism is replaced by a websocket event driven model using Nchan.

 

Will there be a guide for the new process so devs can make changes to their plugins where they have dashboard pages?

Link to comment

The ability to use Nchan anywhere (including the dashboard) has existed since 6.7.  It's only the OS dashboard that is now completely moving away from using polling.

 

To maintain backwards compatibility down to 6.7, you have to use the "legacy" method like FCP does (fixproblems.page lines 179-199, 265  helpers.php lines 448-461, scan.php line 188)

 

Main difference between how 6.9 handles it vs previous versions is that you can simply write an appropriate file and get rid of the curl commands and 6.10 simplifies it even more (and probably also has the ability to automatically stop the background process if nothing is listening anymore - which doesn't matter for FCP or diagnostics on 6.9+) (which is why the dashboard didn't originally use it since there was no real way to stop the process running in the background if nothing was listening)

 

I'm sure bonienl will pipe in though at some point...

 

 

  • Thanks 1
Link to comment

The use of Nchan is indeed already included since several Unraid versions ago and was limited to the status updates in the footer and the CPU load on the dashboard.

 

Unraid 6.10 introduces a new functionality to start and stop Nchan publishers (background processes) on demand. As soon as the GUI requires it a publisher is started and can optionally keep running or be stopped when the GUI does not require it anymore.

 

Nchan is beneficial when continuous updates are required on a GUI page. This happens on the Dashboard page and the Main page, which now use Nchan subscribers to listen to a publisher and update accordingly.

 

A guide will be made available for devs, which explains how to make use of this new functionality in 6.10, but keep in mind any backward compatibility requirements when a plugin is installed on an "older" version of Unraid (this is up to the plugin developer).

 

 

  • Thanks 1
Link to comment
  • 9 months later...
Just now, Squid said:

I use Chrome and have zero issues.

Likewise for me with Chrome; no Nchan errors or slowness in the GUI.  On Firefox I have lots of Nchan errors and slowness in loading the Main tab and opening a terminal session from the GUI.  For now, I am using Chrome for the unRAID GUI.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.