Node server GUI interface

Well, we all know about headless servers. In fact, perhaps the vast majority of servers out there are headless.

As usual (it seems), my situation asked for something completely different. In principle, the proposed architecture looks something like this:

RTG SA

The application server (node.js) is located on a physical machine that is physically connected to two screens.

Between this machine and the network there are all kinds of ordinary network layers. Please keep in mind that one of the main reasons for this setting is physical portability: the customer receives the necessary equipment as a product. The server itself relies on CDN for static files, etc.

Each monitor / screen should show something else created by the same node server.

At the moment, this server is likely to work on Windows, but given the concept (which is my question), I can change the code to run on the target platform. Well, depending on my code, this can even be done automatically.

So my real question. node is quite flexible since it can be run on any - even custom-made software (C ++, Delphi, even GM). Just shell_exec('node server.js') and we are off.

But the screens themselves should be quite dynamic. Therefore, node must somehow affect both screens. A few options I'm considering:

  • An arbitrary application that creates two resizable, faceless windows with a built-in chrome browser to manage the node server in some way (how does node react with these browsers?)
  • A user application that, in accordance with the output of the node CLI, updates the user interface of two screens. Since I need something bright as a user interface, this application will be created in something like GameMaker or a similar engine.

PS: Just in case, you ask; The physical opposite of the network connection (for example, the web GUI) by design .

+4
source share
1 answer

I just hooked up the results / monitoring screens like regular HTML pages. In your Node application, create a second HTTP server (on a non-standard port, a public firewall) that serves the monitoring page.

Use socket.io to send real-time data to the monitoring page, which can make everything look beautiful. Run it in a fullscreen Chrome instance.

This approach completely frees you from any platform dependency and separates the monitoring application from the server application. This leaves you with the latitude to launch the monitoring application in a separate window, if necessary.

+6
source

Source: https://habr.com/ru/post/1436429/


All Articles