Migrating from Python3 to Node-RED

I have a test system that is implemented largely in Python3 under Ubuntu Linux. It uses the Django web framework with Django data models for an MySQL database. I'm contemplating migrating this to Node-RED but have some questions about migrating and also executing bits of Python code during the various phases of the migration.

Does anyone have experience with this?

Yes, I have made that journey myself during a couple of years

I still have, maintain and use several of my older & newer Python scripts for special purposes & services and run them in various distributed computers in my network. Basically, I use MQTT to do full two-way communication with all of them. So my suggestion is; start very simple and create a python script with MQTT support included, learn how to start and run it from Node-RED using the exec node, try out how you can send/receive messages to/from it in Node-RED

Thanks for your reply. The test system already uses MQTT as its transport protocol along with JSON payloads for both commands and responses. I plan to keep the diagnostic sub-system running on the UUTs in Python and migrate just the test sequencer and data collection portions to Node-RED.

Right now, there is a test sequencer running as Linux process for each UUT and I need to decide if those should just be separate flows or if they should each be a separate NR instance. They run identical code and are passed configuration data from a Test Control Manager. This may be a use case for FlowFuse.

Both the test sequencers and test control manager access a MySQL database to pull configuration data and store and analyze test results.

I'm contemplating whether to start the migration with the test sequencer or the test control manager.

Hi,
Well I assume you then need to think what advantages it would be to migrate Python code to Javascript. If your modules are working and performing the expected way and delivering the results your need, I would really think twice; I personally use Node-RED only to manage my Python scripts, monitoring that they are working as expected, restarting them if that would be needed and capturing/collecting/using/presenting the results they are delivering

For sure it is likely possible you can migrate to a flow including some function nodes for the special needs but as I wrote, is it worth the effort? Myself I have some Python scripts doing object recognition using YOLO and that is not possible to do with the same performance in Javascript

Thank you again. That is exactly the kind of input I needed. I'm starting on a Pro/Con list to see if it is even worth it. My thoughts are to make it easier for a junior engineer to modify the testing process without having to dig too deep into the Python code. The "visual' flow of NR lends itself well to that goal. On the other hand, this also enables an uninformed person to modify the test process.

Time to do some thinking.

Just one more thing; if you have a lot of those distributed UUT's that needs regular updates/changes then it could be heavy if you do not have an "automatic" updating process for all the Python stuff. I assume, without having personal experience, that this is one of the strenghts of FlowFuse, to handle & manage many distributed end devices running Node-RED