Link to home
Start Free TrialLog in
Avatar of Herci
Herci

asked on

How to keep running a Web application when offline

Dear Experts,
I am building an online booking system and would like to know what is the best way to tackle this problem. The booking application is always going be accessed by the ticket office staff and not the end users. The internet connection at the ticket office can drop intermittently for few minutes. I don't want the booking system to be unavailable during this period. I want to make sure the web application is able to run offline more for a short period without affecting the on going transaction or the bookings. Application will be using a Mysql Database.
Can someone please enlighten me on what's the best way to do this or guide me on the right direction?
Thanks.
Avatar of ded_ch
ded_ch
Flag of United States of America image

PHP is a server based scripting language. This means, code is always run on the server side. So no offline support exists for PHP.
You would need a client based scripting language, such as activeX or Java
Avatar of Dave Baldwin
Or put the application on a server in the ticket office that gets updates from the online system.  I think that's what I would do.
To add to what ded_ch correctly pointed out, most client-side scripting languages will expect and require timely communication with the server.  The server is where the MySQL database will reside.  So the only possible solution is to fix the internet connection, perhaps by getting a redundant data pipe of some sort.
ASKER CERTIFIED SOLUTION
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
greetings   Herci, , You leave too much information Unknown, to give a specific answer, It seems that you would not need a internet "Server" to do this, ,  if all of your " ticket office staff" were in the same location, if they are in the same location, then you do not need an "Internet Server" but a local server, as several comments here have already told you about.

If your " ticket office staff" are NOT all in the same location, then you need an Internet connection "Server" , , and you can NOT have a PHP site that has the "Offline" mode, as several comments here have told you.
You will need to change your HOST for your internet "Server" from the unreliable one you use now, , to one that is near 99.9 % always online, with is Most of the Hosts (even the cheep ones).
Avatar of Herci
Herci

ASKER

Thanks for all the suggestions.
Slick - The ticket office staff could be in different rooms in the same location or could be in different geographic locations.

elvin - Main booking will be done via the online system. I thought about the same idea you've suggested but I wasn't sure whats the best way to do it. What I am not sure about is, if there are 5 booking machines in the booking office, I need to make one of them a local server. When the internet goes down I will be able to use the local server to take booking and not the other 4 machines? If the staff want to keep using all the machines for taking bookings, then do I need to make each machine a local server? Also are there any security implication of having a local server/DB?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Herci

ASKER

Elvin- There are going to be about 6 desktop PCs and several tablets in the booking office. All these machines will be used for taking bookings. There will also be an online site for the home users to make bookings. All these bookings will go into a central database.
I think as you've suggested, having a local server would be a good idea. We can then allow the PCs and tablets to take the bookings via the local site. We can then have a cron job to push the local bookings up to the central server. We can also have a cron job to download the ticket availability information from the central DB to the local DBs. This way the central database and the local databases will have an up to date ticket availability information. Of course, if the internet is down, then the cron jobs won't work. But as soon as the internet is back on, it should update the records. At the moment I am assuming the internet won't be down for over 48 hours in a single stretch.
What do you think? Does it sound like a good structure?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Herci

ASKER

Thanks everyone.