Distributed Control & Automation Framework (DCAF)

cancel
Showing results for 
Search instead for 
Did you mean: 

JSON - RPC module

I noticed that someone - user bkindinger -  is working on a DCAF JSON-RPC module. I am doing the same thing. If you are reading this forum maybe we should compare notes ? 

0 Kudos
Message 1 of 6
(5,884 Views)

Cool.  It is still pretty early but it is functional and the client works as well.  If you want I can push the repo and you can check it out.  It does require https://github.com/NISystemsEngineering/JSON-Support-for-LabVIEW.

Brian K.
0 Kudos
Message 2 of 6
(5,857 Views)

Hi Brian yes I'd love to check it out!

0 Kudos
Message 3 of 6
(5,850 Views)

I just submitted it to the development branch.  There are two main project.  The first is the module dev which is JSON_RPC_Interface.lvproj and the one you probably want to test out first is the one in the testEngine folder called TestJSONEngine.lvproj

Brian K.
0 Kudos
Message 4 of 6
(5,843 Views)

Hi Brian, thank you. I took a look at it and am fairly impressed. I did something much lower level, communicating with raw TCP-IP and length prepended JSON strings, and much less OO. It also uses two different types of modules-- a sender and receiver class. I will probably refactor that so that it's just one class but I wanted to get something working first, especially while simultaneously learning how the configuration editor works and how to map tags from one module to another. 

 

The use of webservices to handle the network communications is interesting, I will have to take a look at that more deeply. I personally may stick to raw TCP IP since I want very tight control of timeouts, connect reconnect, link status, heartbeats and all that stuff. 

0 Kudos
Message 5 of 6
(5,804 Views)

Thanks a lot.  The OO portion I believe is just the JSON library.

 

I would highly recommend looking into webservices.  JSON RPC really fits in well into the http protocol since it is command response.  Plus it handles connection management, link status, timeout, etc. plus it gives you a lot more.  I like web services because or free you get multiconnection, security, and easy 3rd party integration.  On that last one I was able to talk over the Python Requests library with just 2 functions.  The only time I use TCP anymore (if I have a choice) is if performance is a requirement. 

Brian K.
0 Kudos
Message 6 of 6
(5,802 Views)