12-01-2020 10:57 AM
Are there any best practices for handling upgrading packages on clients via Systemlink, when the executable in the package is actively running?
From our discussions with NI so far, it seems the best option is to create a "pre-uninstall" action for each package that runs some sort of script or executable that can communicate with the running process to request it to shut down prior to deploying the updated version. That is obviously unwieldy for several reasons:
Has anyone come up with a good solution for this, or are there planned updates on the horizon that might improve shutdowns/upgrades via Systemlink web ui?
12-01-2020 11:08 AM
SystemLink doesn't provide anything out of the box for shutting down processes on Windows for several of the reasons that you mentioned. I'm not aware of any standard methods for doing it on Windows.
Now, Linux RT is a different story since all RT startup applications have the same name and there is a single service that manages them. We stop the running LVRT exe anytime we deploy an updated RT application and then start it back up after the install is finished. This is done with some pre-uninstall and post-install custom scripts that are automatically added when you build an RT package that includes a startup application.
If anyone knows of a standard way of doing this on Windows for any application we could consider doing something similar, but I haven't found anything that works universally.
12-01-2020 02:25 PM
In my mind, I would envision something like this as a generalizable approach:
I would think such an API wouldn't be too terribly hard to put together. It would probably need to be OO-based, so it could be extended to cover more complicated use cases. But I think it would be pretty doable, and by using something simple and low-level like TCP, it should be OS-agnostic. And by leveraging the existing SystemlinkClient as an intermediate router, it would avoid complications like port conflicts when multiple processes are deployed to a given host.