NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Python Twisted Library

Has anyone attempted to use something like the Python Twisted library to develop a full web server for a Linux based RT system?  If so, I am curious to hear your experience with it.  I haven't been too thrilled with the implementation of web services in LabVIEW thus far and Twisted is now supported in Python 3.

0 Kudos
Message 1 of 6
(4,365 Views)

cirrusio wrote:

...

I haven't been too thrilled with the implementation of web services in LabVIEW thus far

...

Could you expand on this a bit? Any feedback folks can provide as to why they do or don't like a particular feature helps improve the offering.

However, to answer your question, it seems that the 2016 feeds include python twisted web packages, ready for installation and prodding. Check them out and let us know how they work out.

0 Kudos
Message 2 of 6
(4,093 Views)

When I get a chance, I will try out the package...

BradM wrote:

Could you expand on this a bit? Any feedback folks can provide as to why they do or don't like a particular feature helps improve the offering.

Already provided feedback a long time ago concerning the implementation but will repeat it here:

  • it is as if web services were never really well thought out for debugging on an RT environment.  When you run these guys in an interactive mode, the service "deploys", i.e. it throws up the front panel of every single service VI when you "start" the service. In the development phase, if you have a large service (lotsa VIs) this becomes burdensome to wade through all of these front panels.
  • A bigger gripe I have is the lack of compression support.  You are transmitting a string every time you respond to an http request so large packets consume a lot of bandwidth; not a problem on a gigabit router with one device but in bandwidth limited environments this becomes a major issue.  I spend a lot of time trying to figure out how to send only parts of streams so that we are not bombing networks with too much data.  If there was something such as gzip available, this would not be necessary.

cirrus

0 Kudos
Message 3 of 6
(4,093 Views)

I wsa unaware that you'd already given feedback as to the issues you've encountered with the VI web services, I just wanted to make sure it was captured.

0 Kudos
Message 4 of 6
(4,093 Views)

Usually I use tornado but I think I might have tried twisted once when I was playing with websockets. Usually all of the python packages I have used work right out of the box. Sometimes I run into some weird pip issues (usually a package I need to install like python-misc or I need to update my version of pip or something), but once I have pip up and running then it's smooth sailing.

Message 5 of 6
(4,093 Views)

Hi I am engineer from China. I saw you said in this question that you used the pip in linuxRT. How can you install the pip successfully in LinuxRT? when I try to install pip in LinuxRT it generate an error. I have installed python 2.7 and  3.3 successfully in my cRIO 9037.

I hope I can hear from you soon. Thanks.

0 Kudos
Message 6 of 6
(3,632 Views)