I am working on a mobile app (Android and iOS) to take delivery orders for a restaurant. The app allows the user to pick stuff from the menu, and when he is done I need to send his order to the program that I’ll have running on the desktop computer of the restaurant.
My first and only idea so far is:
- Have an HTML page on my server that the desktop program of the restaurant can check every second for new orders.
- Have the app send an HTTP POST message to a PHP script I’ll have running on my server with the order. The PHP script upon receiving the message will display the order on HTML page for ten minutes or so.
- During that time the desktop program will notice the new order and display it to the restaurant employee.
The usage of a server in the middle is because the restaurant has two branchs, in different cities, so with the server both restaurants can check the same HTML page and only pick orders on their own city.
Is my solution viable or should I try something else?
Thanks in advance.
My suggestion would be to have a web server handling all of the orders. So you would have your mobile device which would take the order and then post it to the database of the server. This would require having some web interface that includes a database.
Then I would write a separate desktop client to poll the server for new data changes. When a change is found, then it will download that new entry and display it to the employee.
So it would look like: