views:

302

answers:

2

OS : Linux.

Im trying to find possible ways to design web interface for my embedded system. Currently there is a shell(text based) and a small set of commands are implemented to query the device.

Im new to web development, my questions are :

  1. What web server must i use ? ( i got apache up on my development setup and tried using cgi to fetch some pages, but seems like this not the right choice for embedded systems)

  2. Assuming i using CGI, what strategy can be used for passing data between CGI and the Main App. I intended to create a thread in the MainApp to handle the query from CGI script. This thread would call interfaces in the MainApp, retrive the data and pass it to CGI.

Thanks

+3  A: 

We use Lighttpd on our embedded systems, it's small and very easy to integrate. There are also specialized webservers with features especially geared to embedding, like AppWeb, which in my opinion is also a very nice product.

For the communication between the main application and the CGI's you can use sockets, or System V message queues if those are available on your embbedded platform. The advantage of SYSV message queues is that they're very easy to use and manage, and messages in the queues survive restarts of the applications, but they also have some quirks (like you can't select() on them).

fvu
Thanks :) I will try sockets
Sandeep Prabhu
+3  A: 

As web server another choice is thttpd. I use it successfully in an industrial product.

For the communication between CGI and main application sockets is the right choice.

Thanks for the answer. But i already got lighttpd working and using sockets.
Sandeep Prabhu