by Cory Rauch 2006-10-07 Category: Web-Database
About a year ago now, I wrote about a simple Javascript Database implementation using freely available open source Javascript libraries. I wanted to follow this up with why a Javascript based database is needed. In this article I'm going to cover some general usage scenarios and benefits that a Javascript-based database can bring to the table.
About a year ago now, I wrote about a simple Javascript Database implementation using freely available open source Javascript libraries. I wanted to follow this up with why a Javascript based database is needed. In this article I'm going to cover some general usage scenarios and benefits that a Javascript-based database can bring to the table.
As software developers continue to move applications to the web, they are making them increasingly more desktop like. This includes even at the programming level, where applications are constructed using advance Javascript frameworks complete with rich widgets, I/O and network api, and even large storage api. Some companies have even introduced very rich IDEs developed totally in Javascript. So we can definitely see a pattern of desktop like technologies implemented in the constraints of the web browser and Javascript, and in turn the web application becoming more usable like a desktop application. Now think of all the applications installed on your computer or network that have some sort of embedded database in them. These could include:
- photo library software
- music library software
- RSS feed reader software
- email client software
- business applications
- and many others I'm sure I missed.
These types of applications that have an embedded databases could be ported to the web with a Javascript database and benefit due to the fact that they can operate much like they do as desktop application. They would use local database calls and the performance would be desktop-like, with latency not an issue, and lower bandwidth requirements for the provider of the application. Plus its the best of both worlds, you get the ease of not having to install software, manage patches and upgrades, and being able access from anywhere with the performance of a desktop application.
The layout of these applications would be much the same as there desktop equivalent, and the programmer would be mostly writing the core of the application logic in Javascript. The Javascript database could load data from the server or save it locally using one of the storage api's available today. If local storage is used, the user could even have the option of automatically backing up the local data to the providers storage, and this being seamlessly restored if the local stored version is no longer available. These types of webs application in theory could even continue to work even if the Internet connection did not. Maybe most importantly though I think a Javascript Database will open opportunity of new breeds of web applications we do not have or dare to try today.
Benefits Some of the benefits of using Javascript database are very apparent, obviously reducing the web service calls to the Internet is going to have an impact on the performance user perceive. Latency issues will also be reduced since there is zero latency locally, and the latency would only be an issue when the application is going out to Internet for any reason. There also would be the benefits of privacy where users know there data is being stored locally rather then elsewhere. For the provider a Javascript Database would lower bandwidth requirements and storage requirements since less of both is needed.
Other ImprovedSource Articles:
How to speed up the rendering of your website
PHP v5.2 vs PHP v5.1
Ubuntu Apache Performance Tip