Thursday, December 15th, 2005

Local Storage via Derby

Category: Editorial

Francois Orsini gave a demonstration at ApacheCon that showed off local storage via the Derby DB.

We keep getting more and more options for storage.

What I demo’ed at Apache during Tim Bray’s keynotes was one particular use case of embedded Apache Derby (100% pure Java RDBMS) running within a web browser such as Mozilla Firefox…This allowed me to persist data automatically as HTML FORM fields got changed (at the field level or not) – It autosaved data entries locally without being paranoid about loosing my data in case of a browser crash or bad manipulation (fat fingers anyone?)…

Various database systems excel at different types of needs…My intent here was to use Apache Derby as the repository for an application managing some user’s personal data (i.e. personal/private taxes info). This is very different that managing browser’s data/metadata (i.e. bookmarks, history, cache, etc) at the low-level and where indeed I would need a closer integration of the RDBMS with the browser engine…The demo here highlighted how a web application could be enhanced (fast, ,embedded and secure SQL storage), not how it could enhance a web browser (i.e. Firefox).

As this particular demo manages personal and financial data, it is very likely that a production application would want to encrypt the data stored on the client storage – This is a possible and very likely an application requirement for this type of webapps. Derby supports strong encryption at the database level as well as strong authentication at the Derby engine or/and database level. Hence, I can have my local derby database(s) be secure, portable and platform independent without having to worry if I loose my usb drive or stick and my DB is on it…Derby also has some ACL-light support for embedded type of apps but Ansi SQL Grant & Revoke is being implemented as we speak – this is independent of the OS FS file permission scheme and is portable across OS’s.

For the java engine I used Sun’s JRE (browser Java plugin) which is a one-click install and is portable across and widely known web browsers.

My (own) requirements for this Webapp demo were:

A fast, embeddable, secure (authentication/authorization/encryption) and portable local client storage engine

  • Portable across most widely known web browsers (at least 2 of them)
  • Support for scripting standard asynchronous requests (Ajax mode) to the embedded client data store
  • Various deployment options for the web application and database engine
  • Support for direct access via a client scripting engine (non-Ajax mode, ala LiveConnect)

The deployment options for the ClientStorage engine and service would be:

  • JNLP
  • Direct HTTP download and archival of JARs,
  • Direct copy of files,
  • Firefox extension (w/ a dependance on the J2SE runtime environment Firefox plugin)
  • Web shipping of already pre-populated databases, then made available locally to the web browser.

Posted by Dion Almaer at 12:20 am
2 Comments

+++--
3.3 rating from 6 votes

2 Comments »

Comments feed

If you are looking for client side local storage, you’d better see what Morfik.com has to offer!

It’s a WebOS :)

Comment by stoicho — December 15, 2005

http://www.AjaxProjects.com is a new directory…

Here you are…

This site will help you to find all the resource to learn and know all about Ajax technology, by providing you with the latest Ajax projects, latest Ajax tutorial, Ajax articles, Ajax Forum and Ajax news.

Comment by Hazem Torab — December 21, 2005

Leave a comment

You must be logged in to post a comment.