Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

javascript / node.js on NETMF


Best Answer David Karlas, 09 January 2014 - 06:11 PM

rht while looking around forums I ran into this post:

http://forums.netdui...nd-sample-apps/

If you download MonoNetduinoBootloader_NetduinoPlus.zip and open Program.cs you can see a way to load DLL at runtime and run it. In that sample its loaded from SD card but it should not be a problem for you to download from website via Socket...

Since .Net Microframework is basiclly interpreter for IL code(which is compiled from C#). IMO performance should be same as C# compiled source code deployed via VisualStudio...

 

You should be able to create very nice and robust Bootloader in C# deployed via VisualStudio only fist time. And this Bootloader would at boot check for update on website at boot and load from website plus you could cache DLLs on SD card(lower boot time, lower network usage , backup in case of no internet connection...)

 

I think this is very nice solution for your problem... ;)

Go to the full post


  • Please log in to reply
10 replies to this topic

#1 rht

rht

    Member

  • Members
  • PipPip
  • 15 posts

Posted 23 November 2012 - 03:32 PM

Does anybody know if it is possible to run javascript VM and/or node.js on NETMF? I am not talking about javascript on some client, I really mean on the netduino board. If so, any pointers or tips appreciated. Thanks! R

#2 Geancarlo2

Geancarlo2

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts

Posted 23 November 2012 - 04:11 PM

really...........why such atrocity?

#3 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 23 November 2012 - 06:52 PM

I haven't seen such a thing beeing done before...
  • rht likes this
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#4 rht

rht

    Member

  • Members
  • PipPip
  • 15 posts

Posted 23 November 2012 - 08:13 PM

Don't get me wrong, I am not trying to subvert NETMF. In fact, the opposite is the case: I'd like to get the Microsoft Reactive Extensions (Rx, https://rx.codeplex.com/ http://msdn.microsof...s/data/gg577609) client-side running on my netduino-plus. Since NETMF does not have the generic types and the implicit CLR-extensibility required by the Rx (open) source, I have to work out an alternative. The idea is to run a Javascript machine and use Rx.JS out-of-the-box. .NET c# has many small Javascript VMs available, but I an not sure if any of them will run on NETMF. I thought someone may have looked at embedding node.js or a simple javascript vm -- cooexistent with NETMF. That is the only real way to elegantly deal with any conceptual competition (and religious wars -- e.g. the first reply to my post) arising through node.js anyway: show that it NETMF can just run it, as a slave :-) Thanks for a good product! Rich

#5 ONE75

ONE75

    New Member

  • Members
  • Pip
  • 3 posts

Posted 09 December 2013 - 09:35 AM

Hi,

 

Did you find a solution? I'm looking to run NodeJS on my netduino too.

 

Thanks

 

Stijn



#6 rht

rht

    Member

  • Members
  • PipPip
  • 15 posts

Posted 31 December 2013 - 10:55 AM

Permit me to rephrase the question: I'm looking for any way to dynamically update particular parts of my logic on the netduino. Perhaps I should be looking at netmf assemblies for this (pointers welcome) but the preferred path would be interpreted code such as javascript or python. The interpreter would "only" need to call out to netmf functions and netmf call the intepreter with a loadable script (name)...

 

The reasoning behind all this is that my devices will be deployed in places that I can never again physically access. The network will be the only way to update the logic. 

 

Any tips appreaciated!

 



#7 Andre Trollip

Andre Trollip

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationGauteng, South Africa

Posted 05 January 2014 - 03:41 PM

Hi rht,

 

I am currently researching the possibility of porting an existing Javascript engine to NETMF (as that is more or less what I do for a living). I will let you know what I find out there if I don't do it myself.



#8 Andre Trollip

Andre Trollip

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationGauteng, South Africa

Posted 05 January 2014 - 03:42 PM

DUPLICATE POST - SORRY



#9 David Karlas

David Karlas

    New Member

  • Members
  • Pip
  • 9 posts

Posted 09 January 2014 - 06:11 PM   Best Answer

rht while looking around forums I ran into this post:

http://forums.netdui...nd-sample-apps/

If you download MonoNetduinoBootloader_NetduinoPlus.zip and open Program.cs you can see a way to load DLL at runtime and run it. In that sample its loaded from SD card but it should not be a problem for you to download from website via Socket...

Since .Net Microframework is basiclly interpreter for IL code(which is compiled from C#). IMO performance should be same as C# compiled source code deployed via VisualStudio...

 

You should be able to create very nice and robust Bootloader in C# deployed via VisualStudio only fist time. And this Bootloader would at boot check for update on website at boot and load from website plus you could cache DLLs on SD card(lower boot time, lower network usage , backup in case of no internet connection...)

 

I think this is very nice solution for your problem... ;)


  • rht likes this

#10 rht

rht

    Member

  • Members
  • PipPip
  • 15 posts

Posted 31 January 2014 - 10:02 PM

Thanks! Indeed, this does the trick. Not quite as flexible as loading python or js, but it works and is strong typed which does have its advantages :-)

 

R



#11 zwiglm

zwiglm

    New Member

  • Members
  • Pip
  • 1 posts

Posted 01 October 2014 - 09:44 PM

Thanks! Indeed, this does the trick. Not quite as flexible as loading python or js, but it works and is strong typed which does have its advantages :-)

 

R

Hi.

 

I am very interested in that progress. Have you ever managed to run node.js on the netduino and then have a node.js application run?

And if, would you be willing to share your findings?

 

Martin






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.