On Tue, February 27, 2007 6:59 pm, Jay Blanchard wrote: > I had an interesting thought after watching a demo of a POS system and > wondered if the same type of methodology could be applied in a PHP > application. I haven't thought this all the way through, but a > fully-hatched idea like this could signal a major change in > applications > designed with PHP. > > In the POS if the network connectivity was lost the store could > continue > to operate, once the network connectivity was restored the data from > each store would sync back up and data would be sent to the central > server, yadda, yadda, yadda. Of course this is in a client/server > application with an executable residing on each workstation. > > So, if you wanted to do this with PHP you would likely have to have a > local web /database server (each store), establish a socket (primary > and > store servers?) to watch for an outage/restore and then write the code > to support the sync up. Can it be done with PHP? It would definitely > be > worth the trouble given the frequency that connections to stores get > lost. Sure you could do that! You could set up mini MySQL servers on the local client, or you could just use a text file, or perhaps SQLLite. You could even simplify things quite a bit by having the main application ALWAYS just write to the local storage. A cron job or second thread/task/process would be run to always be pushing the stored data up to the server. And then some kind of heartbeat to make it go "beep" when it's off-line for more than X seconds. This would be more resilient to temporary outages, and get the tricky sync stuff, as well as the network connection testing, out of the main application. I'm betting somebody has already done this kind of thing with PHP, actually. Sorry. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php