Page 1 of 1

PHP based POS

Posted: Thu Oct 31, 2002 2:02 pm
by sinewave
Has anyone ever considered building a PHP base Point of Sale program?

I've been thinking about this alot lately, and there are some strong advantages.

- No need for microsoft and their licensing. Win2000 server plus 5 CALs can add up to mega bucks.

- No complicated unix networking needed (it's already done for us)

-Apache + php + mysql is about a 1/2 hour set up. and about a 1 minute set up to add additional terminals.

-Terminals can be a decent computer with any OS and a decent web browser and you're set. Some places i do work for have Win/Unix AND Mac.

- You can make .htaccess ONLY allow from 192.168.1.* or something if you have an internet connection to worry about.

- Simplicity!

Anyone know any big downsides? What can't be done with PHP? :)

Posted: Thu Oct 31, 2002 2:04 pm
by seg
That is an awesome idea, with MySql the database and query possibilities are endless. Plus corporate could get easy-to-read web-based reports. Do it man! And make a million!

Posted: Thu Oct 31, 2002 2:05 pm
by sinewave
I'm more interested in SAVING a million :)

Posted: Thu Oct 31, 2002 2:17 pm
by seg
sinewave wrote:I'm more interested in SAVING a million :)
Well of course it would save money, but if you made it and sold it to a company, they would save, but you would still make money. :)

Re: PHP based POS

Posted: Thu Oct 31, 2002 3:55 pm
by BDKR
sinewave wrote:Has anyone ever considered building a PHP base Point of Sale program?

I've been thinking about this alot lately, and there are some strong advantages.

- No need for microsoft and their licensing. Win2000 server plus 5 CALs can add up to mega bucks.

- No complicated unix networking needed (it's already done for us)

-Apache + php + mysql is about a 1/2 hour set up. and about a 1 minute set up to add additional terminals.

-Terminals can be a decent computer with any OS and a decent web browser and you're set. Some places i do work for have Win/Unix AND Mac.

- You can make .htaccess ONLY allow from 192.168.1.* or something if you have an internet connection to worry about.

- Simplicity!

Anyone know any big downsides? What can't be done with PHP? :)
Yeah, I've thought about it myself, but decided that it wouldn't scale as far as a complied language. PHP is eash to develop in and is pretty fast as far as scripting languages go, but not as fast as C for example.

But that argument aside, I still think it's a wonderful idea. If you're willing to throw more servers at it in a load balanced fashion, go for it. I wouldn't use Apache though. PHP has a built in set of socket functions so create your own server. If you don't want to do that there are are couple of servers out there that can be used as a foundation for your POS. Daniel Lorch's PHP Serv and another one called Nano Server (or something like that).
I used PHP Serv as a foundation for a load balancer for a cluster of read only databases. It's a good piece of work that take the Apache route of forking a child process for each new connection. I'm probably going to get away from that approach though so I can drop the overhead of using shared memory.

Another thing to consider is just how many connections to the db you are willing to deal with. If you have a server that it allways running, it alone has a connection to the db. That is a plus in that you only incur the overhead of connection at server start. Additionally, the server and the database both only have to carry the resource overhead of that one connection.

As for the .htaccess stuff, that's if you're looking at everything as a web server. In this case, I would say you're best to stick your POS server somewhere behind a dedicated firewall. Let 'em tear up the firewall trying to get in. Not your server. From the firewall, you can port forward back to whatever port your server is listening on.

But for the most part, this can be done with PHP rather easily. I say go for it. You will learn a lot. When I foolishly started off into that load balancer with glee in my heart, I had to learn the sockets and shared memory stuff. There was very little (and still is very little) in the PHP community to help. It may be the case for you while creating your POS.

On the other hand, this isn't a new way of programming at all. Just new to PHP. That said, there is a lot out there concerning these topics. Just spoken of using differing languages.

But go for it. Seriously! It would be good for the community as a whole.

Cheers,
BDKR