How can I program a web-based GUI in node.js and make continuous calls to a c program? -


I think the title is very self explanatory. Actually, I have a program that uses a ton of data structures to do a lot of work. The program should be in C, and there is no GUI in it, but I want to make one because why not.

The program and the node web server (if it was running one) will be both on the same, local machine, by default they will be shared simultaneously by me and so my question is, what This node Trying to develop a GUI in a language such as JS, and calls the program continuously? How efficient or disabled would it be? What are the drawbacks?

Like I said, I have to program in C. This homework is for work, but I really do not want to try any UI program in C. Any other methods would be fine too i have python and node. I can write in JS and my OOP in CO + is very good to create some 2D programs in Direct 2D. Edit 2: The program (whether it will be a program or GUI) will eventually use the database in some way, then it can go into any possible answer logic, if that means anything. Edit 3: What do I need in answer: Yes / No, it is possible, which language to use and why, and hopefully the Library for some work

Inefficiency: Looking at the "standard" machine (we say that an i5-337U @ 1.7 GHz, 6 GB DDR3 RAM), contact with GUI (which is clickable, and input C program Will be sent as an argument, which will then calculate on the input, all of which are simple maths and more than 10 simple (add, multi, dvd, all end lieutenant; 4 digit number) each input For calculation) should be completed, as the calculation is completed and the result of the calculation of the Gua Update, within one or two.

Based on my previous experiences, I will try to do something like this:

Foreground

A Build Frontend sends a message, that is, a message on a resipulator server. It can be with jQuery or angles or you are comfortable with the framework.

Server Side

Create a node server running the same machine as your C program. The node manages web requests very well, and select the structure like Expression, Restiefe, Koja or others to deal with your HTTP.

C Program

Then, in any way, talk to your program. You have not mentioned anything in your post, but TCP is a general library that you can find for your C project and you can use it. Alternatively, you can start your C program through the node and talk it through stdin! Look around for stack overflow for suggestions on how to do this, but it can be easier than TCP.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -