Is it possible to use my flow as a backend for a phone app?

So im working on an OEE/MES program and have made some significant advancements, even have a user interface now that allows users to edit running configs and see their changes made to specific information nodes in live time without the user ever seeing a flow.

What im wondering now is if im able to use my flow as a phone app? Could i get it to the point someone could download it from the app store and utilize my flow? Maybe if the ipaddress was opened to public and could send and receive data?

Its just a concept. Not fully trying to do it. But was just thinking if i could.

If your flow presented a HTTP(s) endpoint and was visible over the WAN/Internet, then yes, an APP can easily be written to "use" (call) your flow via the endpoint. This is essentially using your (single) flow as a backend for a frontend (in this case, a phone app is the frontend)

But actually downloading and running your flow locally in an app on a phone is not so easy. You would need to somehow embed NodeJS and the runtime portion of Node-RED, then find a way to pull and launch the Node-RED runtime with this downloaded flow.

the first option sounds like what im picturing. I'm not to savvy in app design, would start researching it. but just to make sure though, if my flow utilizes Dashboard ui, would the phone app just connect to the ui url and be able to use that for its display?

with the first option i see issue with user overload utilizing one flow, and opening node red instance for each connection would be hard to automize. so that would lead to the second being a more stable method to run the flow on every instance. i know there is methods to embed nodejs, but the runtime of Node-red that is loaded with the proper flow and downloaded palettes, i definitely see more of a work around although difficult.

Sure, it is just a web page - your "App" can display a web page - many apps are just web pages!

BUT - dashboard doesnt really have any concept of multi user access (search the forum, covered many times)

In this instance, using UIBuilder would make much more sense)

You might be surprised just how many "users" an endpoint created in node-red can handle. At the end of the day, a HTTP endpoint is the "thing" behind most websites on the internet. And many of these are written in nodejs - so just because this endpoint is running in node-red doesnt suddenly make it "less node / less capable" - it is all down to what you do between receiving the request and outputting the response is what matters (and of course the hardware, load balancing, horizontal scaling etc) - but that is exactly the same considerations you would make for a regular (non Node-RED) endpoint serving users with data.

that is a good point! I might try it out. right now my flow can run a factory of 15 simultaneous connection running calculations and giving information. thanks for the information, I have some research to do, now i know where to start!

1 Like

There are more possibilities. You could use Node-RED as an API server, keeping the UI locally. That local UI could be an offline capable web app or could be generated using something like MIT App Inventor (a scratch style programming environment).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.