So, it's not for this one, but I know already how it will be done in the future!
First, using named_pipes, then, I'll go for sockets.
And each application will always have 2 parts:
The WEB interface itself (mainly a lot of CGIs and some logic to precess them and make calls in a intermediate API for the inside application code, running ALL time (not like with CGIs that only run for a short period of time, to produce the HTML they must generate) and, thus, able to retain state much more easily than with CGIs.
Oh boy! Just have realized this and how easily it can be implemented (compared with the way I'm doing right now) just make me fly high!
Well, back to the hard work!