views:

57

answers:

2

I intend to create a web based application server.

The server is implemented in C and I wish to create a web based interface instead of a specific client application.

Could anyone please suggest what approach/technology I can use to implement ?

Thank you.

-Mac

A: 

So what interface does this "server" of yours currently expose, and how far can you change that if necessary? For example, if the interface is or includes some form of inter-process communication, you may want to proxy from HTTP to this with a separate process (some general purpose higher-level language such as Perl, Python or Ruby should ease that); if you can embed one of these interpreters (or some alternative ones such as LUA or Tcl) that would work, too; if your server exposes a C-callable interface (and lives in a DLL or a static library) you could use SWIG to wrap it for the purpose of interfacing higher level languages; and so on, and so forth.

The one general suggestion would be to use a higher-level language as a buffer between the C code in your existing server and the HTTP interface you want to offer -- it WILL make things much easier than trying to have C carry all the weight, in the long run.

Alex Martelli
Thanks Alex.The server runs as a process that implements all the application logic. The existing client would create a tcp connection to the server and then the request-response takes place. Now, I want to remove this client and instead use a web based interface for the request-response flow. I am more than willing to change the existing interprocess communication code between client-server,(i.e.TCP Sockets) . On an alternate approach, I could have server code replaced by say PHP scripts and do the necessary processing to respond to the client request. But I cant change that.
Mac13
A: 

If the existing application has an API across TCP then it sounds like it should be easy to add a fastCGI interface along side of this. Then write a web based front end using basic html, css with ajax calls to the fastCGI based App.

Howard May