Home » Community » Newbie corner » Network remote control
Network remote control [message #46544] |
Sun, 22 May 2016 10:26  |
Infausto
Messages: 28 Registered: June 2008
|
Promising Member |
|
|
I want to know what is the best approach to remotely control an app using network.
My first idea was use Skylark to serve a webpage that sends command back to the server, and reacts accordly. But it seems quite hard to mix a GUI app with Skylark. There is no documentation nor example for that.
Mi second idea was to use some kind of RPC, but that seems to overbloated to do something that simple.
I review ZMQ but has no event mechanism... Using polling in 2016? Very crusty, i think.
Any other ideas?
Thanks in advance.
|
|
|
Re: Network remote control [message #46546 is a reply to message #46544] |
Sun, 22 May 2016 13:27   |
|
Hi Infausto
Using Skylark and GUI together seems to become an FAQ I already tried to figure out an answer a while back, when someone else asked, see this thread from 2012. Some hints might be also in this one from 2013.
Aside from the skylark solution, there is many other more or less hacky ways to remotly control an application. You could for example use simple http server (e.g. nginx) to upload files with instructions to machine where the application runs. The application would then just monitor the location for new files and interpret the commands (using e.g. inotify, if you want to avoid polling). This would be quite a lot of a hack, but really easy to do.
Or, less hackish one: you can simply create a thread listening on specific port and pass the commands to gui thread using callbacks.
Best regards,
Honza
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 09:37:16 CEST 2025
Total time taken to generate the page: 0.04058 seconds
|