HTML5 is cool, right? Websocket is cool? Linux is super cool? What about combining all of them together then? Yes, this is a personal "toy" project for fun by myself trying to combine these super cool and fun stuff together!
I design this project as a B/S one which even involves inter-process communication (GTK part). The intension here is actually to play around HTML5, Websockets, Linux processes (e.g., IPC). The inital skeleton version contains these components:
- A light-weighted server (libwebsockets) running in the backgrould waiting for the commands from HTML5
- HTML5 page as the UI and JavaScript sends commands (open file, save file) to the service
- Another process which interacts with the user (GTK select file), reading/writing data from/into local file
HTML5, Websockets, Linux Sockets, IPC, GTK, JavaScript, C/C++
- go to the /src folder and run make
- run the lws-server
- open the index.html test page and click open file button
- edit the content in the txtarea of the webpage and clisk save file button to save file
some of the screenshots are:
The front end web page looks like the following
After you open the testcase1.txt file, the content of that file will be loaded into the textarea as follow
Some future work in my mind:
- Add threads into the backend
- remove the sockets, try other IPC (pipes, shared memeory, .etc)
- refactoring the ugly and hard coded parts of the code

