Welcome Guest, Not a member yet? Register   Sign In
Advice on writing Daemon in PHP/CI or ?
#1

(This post was last modified: 03-05-2018, 05:21 AM by richb201.)

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
proof that an old dog can learn new tricks
Reply


Messages In This Thread
Advice on writing Daemon in PHP/CI or ? - by richb201 - 03-05-2018, 05:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB