I have finished my setup program which uses CI and Grocery_Crud to populate some tables. I am also 90% done with my Chrome Extension. I need to write a daemon that will run on the server and has two functions 1) receive a json buffer from the extension via ajax, look up a key value with some small SQL query and return a buffer of data and sedn it back to the extension 2) receive a json buffer and append it to a table. This is pretty much the heart of the system, so i do need to handle these requests and responses fairly quickly.
I know how to do this in C in a single process; I'd spawn the process and wait (ie blocking) on a buffer. But I get the feeling that PHP on Apache runs differently. What is the best architecture for such a thing? Is there any code I can use as an example? If not can someone point to a document that discusses how to handle a daemon in this environment? Or should I be writing it in C? By definition this daemon has no UI.
thx in advance
I know how to do this in C in a single process; I'd spawn the process and wait (ie blocking) on a buffer. But I get the feeling that PHP on Apache runs differently. What is the best architecture for such a thing? Is there any code I can use as an example? If not can someone point to a document that discusses how to handle a daemon in this environment? Or should I be writing it in C? By definition this daemon has no UI.
thx in advance