Re: [PHP] operational musings



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?
.



Relevant Pages

  • Re: [PHP] operational musings
    ... Your in-store system could act as a slave to for the central system databases and your in-store machine could be the master for the store_xyz database. ... And since this is a PHP list... ... In the POS if the network connectivity was lost the store could continue ...
    (php.general)
  • RE: [PHP] operational musings
    ... environment, with a Linux server in every store, talking to the POS ... those transactions to a central server (which isn't running Linux, PHP, ... I'm finding the PHP socket support to be unreliable, ...
    (php.general)
  • Re: [PHP] Out source files
    ... Technicaly speaking I would like to store my files (application ... large-size files) off to a different server, ... It's not a matter of performances but security. ... One common pattern in PHP is to not put the file in the web tree at ...
    (php.general)
  • Re: PHP Instalation problems. Browser doesnt know what to do
    ... This is loaded and run as a local server (for class ... PHP 5.2.0 from php-5.2.0-win32-installer.msi ... # configuration directives that give the server its instructions. ...
    (comp.lang.php)
  • Re: PHP Instalation problems. Browser doesnt know what to do
    ... This is loaded and run as a local server (for class ... PHP 5.2.0 from php-5.2.0-win32-installer.msi ... # configuration directives that give the server its instructions. ...
    (comp.lang.php)