I have a Java Web application backed by a database. Both are hosted in Amazon EC2. If the Internet is down, I need to allow internal users to be able to continue to work and somehow update the hosted service when the Internet is available again. Is this possible? How would I design such a solution.

  • 4
    A java web application runs within an application server. If this server is not running, the apps within it are not running. Is there a particular problem you are having and trying to solve that might be a more productive question? – user40980 Mar 15 '13 at 17:46
  • yes, i need my application to be able to connect to a database even if the internet is down, say, a black out occured. i want to build my application as web-based and am looking for a solution. for my database, i was going to put the database in Amazon EC2. if the internet is down, i wouldnt be able to access Amazon EC2 right?.. – bobby Mar 15 '13 at 17:56
  • No, if the internet is unreachable, you won't be able to talk to Amazon. Out of curiosity, where is your application server? If the internet is down, how are customers supposed to talk to it? – Clockwork-Muse Mar 15 '13 at 18:02
  • 1
    I edited your question to include some of the clarifications in the comments. Does this pretty much summarize what you need? – Michael Brown Mar 15 '13 at 18:25
  • 1
    What is the ROI on this feature. How often is the internet down at your place of work? If this is a legitimate concern, standing up a server and moving this thing in house is going to be a lot cheaper than any sort of data synchronization you could possibly do – Bill Leeper Mar 15 '13 at 20:18

When dealing with a web application there are two components of primary interest - the server and the network.

A java web application runs in an application server (this is an application such as jBoss, Weblogic, or self contained jetty) on a server itself (linux, windows, etc...).

If the application server is not running, the applications within it are not running and you will not be able to connect to them. This is true no matter if the applications within them are providing web services or more traditional web pages.

If the server itself is down, the applications running on the server (the application server, database and the like) are not running.

If the network between you and the server is down then, well, the network is down and you cannot connect to the applications (no matter if they are running or not).

The standard approach to dealing with the server is down is redundancy - putting the application on multiple servers so that if one fails to connect it will attempt to connect to another one. This does not guarantee that it will always work (a network outage in a wide enough area or a cascading problem in cloud computing can take multiple systems off line).

The specifics of how much and what redundancy are necessary depends on a given application's requirements. Some people need 99.999% uptime, some just need 99% uptime (and wait for the network or the system to correct itself rather than investing in additional redundancy).

Remember that when planning for redundancy it is likely necessary that multiple components will need to be redundant. If one has multiple redundant web applications all using the same database, and the database goes down you still have a single point of failure with the database.

Ok, so lets say the network has gone down after you have loaded the page. You are now offline.

Html 5 provides the possibility for having some amount of local processing. Note that this means that you can only work with the code and data that you have on the machine. If the business logic for the application is hosted on the cloud it would mean that when the cloud is unavailable, that portion of logic is unavailable.

Some resources for html 5 offline applications:

A google search for "html5 offline web apps" (and related queries) will provide more resources.

  • Thanks for the links MichaelT, this is what i was looking for to get me started in the right direction. :) – bobby Mar 15 '13 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.