Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Question] Develop a Node.js based Module for N2520
#1
Hi All,
Hopefully I did not post this in a wrong place. (Otherwise I don't know which forum is the right place to discuss the the module development.)
I am a owner of N2520 and thinking about development some lightweight Node.js based web apps on it. For example

  1. A simple web app to control and/or monitor the running modules. I want this because there is no way to stop/restart/start a module directly from the ThecusOS 6 coming with my N2520.
  2. A web-based file manager to replace the original WebDisk Module. The official WebDisk really sucks!!!!!
  3. A very simple web app to control my Pioneer A/V Receivers

Not sure if all of them are feasible. The documents regarding the SDK are extreme limited. So here is my questions.

  1. I found node.js 0.8 is already available on my machine and actually some of the Thecus' software seems based on node.js. Does anyone have any experience for developing node.js app (Node.js + express) on Thecus NAS? Any tips or clues? Or it is not recommended or even impossible?
  2. There is a ModuleLogin tag in install.rdf (Module_Developer_Guide_2011-05-18a.pdf , and Yes, this is a 2011 document). How do I utilize this feature in my node app.

Any suggestions/comments are welcome.

Thanks.
ycchang
Reply
#2
Hi All,
Hopefully I did not post this in a wrong place. (Otherwise I don't know which forum is the right place to discuss the the module development.)
I am a owner of N2520 and thinking about development some lightweight Node.js based web apps on it. For example

  1. A simple web app to control and/or monitor the running modules. I want this because there is no way to stop/restart/start a module directly from the ThecusOS 6 coming with my N2520.
  2. A web-based file manager to replace the original WebDisk Module. The official WebDisk really sucks!!!!!
  3. A very simple web app to control my Pioneer A/V Receivers

Not sure if all of them are feasible. The documents regarding the SDK are extreme limited. So here is my questions.

  1. I found node.js 0.8 is already available on my machine and actually some of the Thecus' software seems based on node.js. Does anyone have any experience for developing node.js app (Node.js + express) on Thecus NAS? Any tips or clues? Or it is not recommended or even impossible?
  2. There is a ModuleLogin tag in install.rdf (Module_Developer_Guide_2011-05-18a.pdf , and Yes, this is a 2011 document). How do I utilize this feature in my node app.

Any suggestions/comments are welcome.

Thanks.
ycchang
Reply
#3
Hi ycchang,

just trying to provide some hints ...

ycchang Wrote:[*]A simple web app to control and/or monitor the running modules. I want this because there is no way to stop/restart/start a module directly from the ThecusOS 6 coming with my N2520.

This is possible from the WebUI ... module management changes with the next update, expected to be released within the next couple of days.

ycchang Wrote:[*]I found node.js 0.8 is already available on my machine and actually some of the Thecus' software seems based on node.js. Does anyone have any experience for developing node.js app (Node.js + express) on Thecus NAS? Any tips or clues? Or it is not recommended or even impossible?

Always bundle your own copy of node.js . Thecus will change any part of the firmware without notification. This makes it hard to rely on parts of the firmware.

ycchang Wrote:[*]There is a ModuleLogin tag in install.rdf (Module_Developer_Guide_2011-05-18a.pdf , and Yes, this is a 2011 document). How do I utilize this feature in my node app.

Short answer, ... you can't, at least not directly. This flag just indicates, if the modules web page uses the Thecus FW admin login system. This can only be used if you web application uses the Thecus integrated web server.

Cheers,
Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#4
Hi ycchang,

just trying to provide some hints ...

ycchang Wrote:[*]A simple web app to control and/or monitor the running modules. I want this because there is no way to stop/restart/start a module directly from the ThecusOS 6 coming with my N2520.

This is possible from the WebUI ... module management changes with the next update, expected to be released within the next couple of days.

ycchang Wrote:[*]I found node.js 0.8 is already available on my machine and actually some of the Thecus' software seems based on node.js. Does anyone have any experience for developing node.js app (Node.js + express) on Thecus NAS? Any tips or clues? Or it is not recommended or even impossible?

Always bundle your own copy of node.js . Thecus will change any part of the firmware without notification. This makes it hard to rely on parts of the firmware.

ycchang Wrote:[*]There is a ModuleLogin tag in install.rdf (Module_Developer_Guide_2011-05-18a.pdf , and Yes, this is a 2011 document). How do I utilize this feature in my node app.

Short answer, ... you can't, at least not directly. This flag just indicates, if the modules web page uses the Thecus FW admin login system. This can only be used if you web application uses the Thecus integrated web server.

Cheers,
Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#5
Hi Falk,

Thanks for the quick reply. Hopefully the next released firmware will fixed more bugs including the NTFS issue.
Here are some additional thoughts and questions.
If I want to distribute my own node.js along with my module, what dev. environment is required to build the binary files?
The OS6 Development Guide said
Quote:The changes needed from current OS5.0 64bit module to OS6. It can be developed on standard FC16 32bit environment.
So the complied ginaries built on any standard FC16 32bit env. are run-able on my n2520, right?
BTW, actually, I am a Ubuntu fan Smile

fajo Wrote:.............
Short answer, ... you can't, at least not directly. This flag just indicates, if the modules web page uses the Thecus FW admin login system. This can only be used if you web application uses the Thecus integrated web server.
................

How do I use the Thecus integrated web server? Or this is not allowed?
The admin system and the Thecus official modules seems to use PHP + python. So I guess if I implement my own module with PHP + python, then I probably can integrate mine with the Thecus system. To implement a full function file manager ( to replace the WebDisk), I would have to access ACL. (I will assume the one implemented on N2520 is POSIX ACL). Not sure if this is feasible on Node.js or not. Need to check. But I will be happy to see if Thecus have some related APIs/services.

Thanks.
YCC.
Reply
#6
Hi Falk,

Thanks for the quick reply. Hopefully the next released firmware will fixed more bugs including the NTFS issue.
Here are some additional thoughts and questions.
If I want to distribute my own node.js along with my module, what dev. environment is required to build the binary files?
The OS6 Development Guide said
Quote:The changes needed from current OS5.0 64bit module to OS6. It can be developed on standard FC16 32bit environment.
So the complied ginaries built on any standard FC16 32bit env. are run-able on my n2520, right?
BTW, actually, I am a Ubuntu fan Smile

fajo Wrote:.............
Short answer, ... you can't, at least not directly. This flag just indicates, if the modules web page uses the Thecus FW admin login system. This can only be used if you web application uses the Thecus integrated web server.
................

How do I use the Thecus integrated web server? Or this is not allowed?
The admin system and the Thecus official modules seems to use PHP + python. So I guess if I implement my own module with PHP + python, then I probably can integrate mine with the Thecus system. To implement a full function file manager ( to replace the WebDisk), I would have to access ACL. (I will assume the one implemented on N2520 is POSIX ACL). Not sure if this is feasible on Node.js or not. Need to check. But I will be happy to see if Thecus have some related APIs/services.

Thanks.
YCC.
Reply
#7
Hi YCC,

for OS6 any FC16 setup (32bit) should be fine. There should not be any glibc incompatibilities as Fedora will upgrade glibc and such only between major releases. Even FC16 binaries should work in most cases (not any).

You can of course use the integrated web server, as long as it includes everything you need. PHP for example lacks some important extensions. Stephane and me use my PHP53 or PHP54 modules that for where needed. Since OS6 Python (stripped down) is available too. If I remember right WebDisk uses Python (what version ever, i guess some 2.6).

Thecus/Fedora uses POSIX ACLs, yes. As far as I know, node.js does not support ACL at all (at least not from core, there may be extensions that do).

Cheers,
Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#8
Hi YCC,

for OS6 any FC16 setup (32bit) should be fine. There should not be any glibc incompatibilities as Fedora will upgrade glibc and such only between major releases. Even FC16 binaries should work in most cases (not any).

You can of course use the integrated web server, as long as it includes everything you need. PHP for example lacks some important extensions. Stephane and me use my PHP53 or PHP54 modules that for where needed. Since OS6 Python (stripped down) is available too. If I remember right WebDisk uses Python (what version ever, i guess some 2.6).

Thecus/Fedora uses POSIX ACLs, yes. As far as I know, node.js does not support ACL at all (at least not from core, there may be extensions that do).

Cheers,
Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Question] Develop a Node.js based Module for N2520 0 2,531 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)