LabVIEW Web Development Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Web app on RT Linux

Highlighted

I have an experienced web developer that I want to use to write a web app on an sbRIO 9607. It will use javascript and communicate with my LabVIEW app over localhost (protocol not decided yet). I see from this post that the EmbedThis Appweb is the server used.

 

What are the gotcha's we should know about before developing this app? It is going to be an embedded display for the LabVIEW exe. I've used LV web services and front panels enough to know that I don't want to go down that path.

 

Where should the root directory of the web page be located so the NI web server will find it?

Do I need to enable the server in the project for it to be active?

 

Presently I'm using LV 2018, but will move to 2020 when SSL support is released.

 

Thanks,

Richard

0 Kudos
Message 1 of 3
(206 Views)
Highlighted

Hi Richard,

 

If you just want a web app to form a local display then I don't think you will see any major gotchas but I don't understand your architecture fully.

 

There are two sides to a web app, the server side and the client side. I've deployed a number of systems where LabVIEW web services form the server side and javascript single-page-apps on the client side and this has worked will. Embed this doesn't scale well to multiple users but if you are just looking for a display for the RIO it should work quite well. In this case the javascript client side code talks to LabVIEW through the LabVIEW web services.

 

For this, to work I just included the javascript output in the LabVIEW web services project and included it as static pages in the LabVIEW web service. The main gotcha that I never resolved was hosting it at the root on port 80 - this gets blocked by other NI services that couldn't be moved.

 

If you are looking to use localhost that suggests you are talking about having javascript running server side on the sbRIO. This would be very different. I think if this were the case you would be replacing the NI server all together - running node with express or a similar framework and it would run in parallel to LabVIEW. I've never tried this - if node is available for the architecture it should theoretically work. I would just be aware though that the performance of these cRIOs is obviously different to your typical web server hardware - so I would be a bit wary about this approach from a CPU loading perspective. For this reason I always take the approach of avoiding server-side processing.


FYI - I was looking through the LabVIEW 2020 help and it looks like in 2020 you have the option to use the NI Web Server (as opposed to the application server) - if so this is apache based I believe and may offer more options. Again I don't know if there might be limitations as you are on an ARM rather than x86 RIO.

 

Cheers,

James

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 2 of 3
(162 Views)
Highlighted

Thanks James. Yes, it will be client side javascript.

0 Kudos
Message 3 of 3
(71 Views)