Hello , first of all I need to make clear that although I understand , and have done projects modifying code that is already there (and created my own minions) , in the core of C and C++ I wouldn't consider to know those a bit, I have just a glimpse of what those languages are capable of. Let's suppose that you have a program that runs endless (almost) in C++ (lets call it A) and it can take take something for input and throw out a result. Differentiating input / outputs could be done through a port of this and I guess that would be a better way because input would come only from inside the server (from program B). Then you have one second program that is run through CGI it would take the server data from an HttpRequest would pass it to A , take the response from A and serve it to the caller.
I am in the process of thinking to trying to archive such an architecture. I know the relationship C and C++ has with every major web company and any (in my knowledge , I know for Java and PHP) OOP like language. But what I am asking is quite different, it is an another architecture. Should I give it a try it , or there are some other things that I am missing?