SystemLink

cancel
Showing results for 
Search instead for 
Did you mean: 

Best practices for HTTP operations in SystemLink-hosted WebVIs?

Only a small subset of the SystemLink REST API is available via the NXG Web Module. For example, the File Service API has no GVIs implementation so we must manually perform low-level HTTP operations instead.

 

I'd like to clarify the "proper" ways for a WebVI to communicate with its SystemLink host via HTTP.

 

  1. What is the proper way to obtain a HTTP Client Handle to the server?

    So far, I've called Open Configuration (Auto) and unbundled it to retrieve the Session. This works:

    webvi-http.png

    However, this feels like a bit of a hack because The LabVIEW CG counterpart does not allow us to unbundle the Configuration object to retrieve the Session. Unbundling the Configuration also exposes the "Raw Session Queue" which doesn't look like something that's meant to be publicly accessible. Is there a "better" way to do this?

  2. If HTTP operations are infrequent, should I close and re-open the configuration each time I perform an operation?

  3. If I want to perform a burst of independent HTTP operations (such as GET-ting multiple resources), is it safe to perform them in parallel, or should I wait until the first operation finishes before starting the next?

  4. If parallel operations are safe, should I share the same handle between all parallel operations? Should I open a new handle for each parallel operation?


Thanks!

Certified LabVIEW Developer
0 Kudos
Message 1 of 3
(612 Views)

I'd suggest to close and reopen the configuration each time to save resources. It depends on the time delay between two occurrences. 

0 Kudos
Message 2 of 3
(471 Views)

Hi vardanium,

 

Thank you for answering question #2 from my post.

 

Do you have any insights into questions #1, #3, and #4?

Certified LabVIEW Developer
0 Kudos
Message 3 of 3
(467 Views)