Go-RED Development

1,928 views
Skip to first unread message

sudhakar bhooramoorthy

unread,
Sep 26, 2015, 9:03:36 PM9/26/15
to Node-RED
Planning to port Node-RED to Go lang, thought of checking with experts, is it worth porting/pursuing for following reasons;

1. Go lang is much better platform/language with rich set of features compared to Node.js (so more future possibilities)
2. JS code is visible to end users of the system, no protection of code if it has to be deployed in production environment
3. One more advantage, requires no additonal package/installation with one single exe go-RED engine can run entire go-RED platform, currently (java->node.js->Node-RED to be installed to get the environment)
4. Security aspects

Phase 1 development:
Port Node-engine to Go lang;
Based on JSON file generated from Node-Red run the Go-NodeEngine
Use Node-RED frontend for flow generation (JSON file)

Phase 2 Development:
Try to reuse reusable components from Node-RED for frontend and develop Webbased application in Golang;

(Need expert comments what code can be reused from Node-RED frontend)

Phase 3 Development
Whenever node-RED node is provided equivalent go-RED ported if required;

Need expert thought/advise on this;

Thanks,
B. Sudhakar

Dave C-J

unread,
Sep 27, 2015, 3:40:59 AM9/27/15
to node...@googlegroups.com

2, node.js is used in production by lots of companies, eg Walmart, eBay, Paypal, etc. See https://strongloop.com/strongblog/why-do-companies-choose-node-performance-scalability-and-productivity/
3, you still need to deploy the go runtime. This is the same as deploying the node.js runtime. There is no Java involved. Go installs as a single large (approx 75MB) chunk. Node.js deploys as 7MB core then additional npm packages

Good luck

Nicholas O'Leary

unread,
Sep 27, 2015, 4:11:54 AM9/27/15
to Node-RED Mailing LIst
Hi,

personally, I don't think its worth it, but you are of course free to try.

I do disagree with a number of your reasons.

1. 'much better platform' is very subjective. Both have strengths and weaknesses. Both have very rich ecosystems of 3rd party module development. I wouldn't say one has a richer set of features over the other.

2. We're an open-source project and as Dave has pointed out, node.js is very widely used in production.

3. I do agree that go has the benefit of being able to compile to a standalone binary. (Dave - the 75Mb is the dev libraries. You don't need those to run a standalone go app - you didn't install those to get the cf command line for example). But I don't know why you mention Java - that has nothing to do with any of this. I have seen (although can't find this morning) some work being done to compile a node.js app into a standalone exe. It will be interesting to see if that ever comes to fruition. I would consider porting our node-red-admin command-line tool to Go for exactly these reasons.

4. Sorry, without more context what you mean by 'security issues' I can't comment. 


As for the practicalities of porting the runtime, I don't know is whether Go can dynamically link modules in at runtime, or whether everything have to be built in at compile time. A core concept of node-red is dynamically loading nodes at runtime. If you have to recompile the app just to add a node, then you lose any benefit of Go as a user has to install the complete Go dev environment to update their system.


Nick


--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave C-J

unread,
Sep 27, 2015, 4:35:23 AM9/27/15
to node...@googlegroups.com

Nicholas O'Leary

unread,
Sep 27, 2015, 4:37:34 AM9/27/15
to node...@googlegroups.com

I thought I had seen something more recent than that, but that just goes to show the idea has been around for a long time.

N


--

Dave C-J

unread,
Sep 27, 2015, 5:15:24 AM9/27/15
to node...@googlegroups.com
and don't forget the good work by Matt Brailsford - https://github.com/mattbrailsford/NodeREDWebkit
(which is of course the whole Node-RED editor - not just a runtime). 

Julian Knight

unread,
Sep 27, 2015, 11:04:48 AM9/27/15
to Node-RED
Dave, you beat me to it, I was going to mention webkit.

I can see why some people/orgs are jumping onto go but to me it looks like the benefits only really kick in for big, high-scale application. The benefit of sticking with JS for me personally is one less language to have to deal with. I'm not a professional, full-time developer. Coding is done either for fun or to help manage business information. Web interfaces are ideal for simple (and not so simple) user interfaces to data and JS is integral to that requirement, the ability to code JS at the back end remains Node's primary attraction to me.

I certainly wish this attempt well but I'm more than happy to stick with Node.

sudhakar bhooramoorthy

unread,
Sep 27, 2015, 11:14:36 PM9/27/15
to Node-RED
Thanks all for your valuable information;  I will check on the WebTookKit;

I am evaluating a customer project where 50 Power line Real Time Units (RTU) to be integrated over Modbus TCP and data to be exposed over OPC;  Workflow will not under go not much of major changes;  Each unit have to address around 50 tags approximately so there will be 50 TCP connections and 50 tags of data to be read in regular interval from each unit so total around (2500 tags per few seconds) and to be exposed as OPC Server;  In fact, customer will not realize there is a such tool exist for him to monitor the load or modify it;  It will be running in background quietly; Need to know the performance impact of loading so many nodes and collecting the data in the background...any benchmark available to check on this???

Moreover, these environments are isolated from public networks so installations can not pull from GIT repositories to be managed independently;

I need to carefully choose the environment, I dont have prior experience in using this tool on production environment, hence I need to take your valuable inputs into considerations before proceeding with the solution;  I really liked the way it is all organized and its simplicity in using them;  However, I am little bit concern only on the exposing entire logic to customer end and opening up business competition;

BTW, any license cost or service cost involved for such customer production installations - kindly let me know or free to use it;

I am also evaluating NoFlo support for Goflow???  But I really like Node-RED because of its simplicity in customization;

Let me also know any comparison done between NoFlo Vs NODE-RED; pros and cons of both the system;

Once again thank you very much for the great work and also great response with open mind providing guidance to people like us and encouraging to use the product;  Personally I don't have any particular  liking for the language or tool, as long as it does the job neat and provides customer solution without any trouble, as these integrations are meant to run 24X7 365 days, so dont want to get any mid night calls for support...

Thanks and regards,
B. Sudhakar

Julian Knight

unread,
Sep 28, 2015, 1:43:29 AM9/28/15
to Node-RED
I don't know that there is enough information there to guess at performance. 50 TCP connections shouldn't tax any hardware I wouldn't think though if the monitoring is critical you would want to think about possible failure of the monitoring machine and allow for resilience. OPC is Windows yes? Generally Linux/UNIX is used for this kind of thing as it is more reliable and carries fewer OS overheads. Library support on Windows for things like node.js is also not quite as good though I don't think that will impact you here and NR works fine.

Can;t really say much about NoFlo, I tried to have a go with it but I couldn't get it to work properly. Focus now seems to be on their cloud offering anyway which isn't relevant to you.

You might also want to consider a hybrid approach where you create a node.js listener, something that is ideally suited to node.js (or golang I guess) which you can then run as a cluster of services for resilience & performance. Then use NR to put together higher-order processing where the additional overheads are not so critical. MQTT is also commonly used to standardise IoT communications so perhaps you could create an OPC to MQTT bridge? That approach would also have the advantage that you wouldn't need to mess with rewriting NR in golang which seems like a really large overhead for your project to say nothing of the cost of ongoing maintenance of your fork.

tweakmy

unread,
Jun 22, 2016, 1:34:45 AM6/22/16
to Node-RED
Is there a github respo, slack channel to start. If not, I would like to start a github repo or join your repo.

Do you guys want to join effort? We can have online meetup to discuss/debate.
Reply all
Reply to author
Forward
0 new messages