Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

Advice on writing Daemon in PHP/CI or ?

$
0
0
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

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>