Thursday May 03, 2007

Enabling Offline Web Applications with Java DB

As David Van Couvering pointed out in his blog, I will be co-presenting with Kevin Henrikson from Zimbra at CommunityOne and JavaOne 2007 next week. Kevin will especially highlight how they have implemented offline support in their current Zimbra Desktop offering.

We will discuss how today's and tomorrow's Rich Internet Applications (RIA's) can be enabled to run offline and allow the users to keep using the same application, while not being connected to the net.

You can get a sneak peak of what we will talking about based on David Berlind's recent article on the subject of enabling offline Rich Internet Applications using some local storage such as Java DB / Apache Derby and some Local Ajax (LAJAX) or Asynchronous JavaScript technic based on LiveConnect.

Tuesday Dec 05, 2006

JavaPolis 2006 (J-8) and Java DB presentations

I will be in Antwerp (Belgium) next week to attend JavaPolis 2006 and give 2 presentations of Java DB (based on Apache Derby) as well as some Lab:

- Java DB Overview

- Java DB Performance

- Hands-on Java DB Lab

If you want to discuss anything related to Java DB / Apache Derby, please feel free to contact me over there - I will be at the Sun Java DB booth as well when not attending or giving a session.

See you in JavaPolis.

Wednesday Dec 14, 2005

ApacheCon demo - Web Browser Client Offline Storage with Java DB / Apache Derby

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?)...The store service can be called at anytime really from your client script...

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/financial taxes info). This is very different than 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 highlighted how a web application could be enhanced (fast, embedded and secure local SQL storage) across web browsers, not just how it could enhance a particular 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.

The demo I shown is one particular browser database integration scheme/topology - I did not have to \*natively\* integrate with the browser engine at all for this application. It was all driven from the application scripting logic interacting directly with a ClientStoreService object - This last one is implemented in Java and acts as a controller to the local client storage (Derby). It is seen as an object from Javascript (LiveConnect technology) which allows me to access some client storage service to issue queries and get data returned in XML, parse/process it with the native scripting engine XML Dom parser. The ClientStore Service can process requests asynchronously or not - I have another implementation where I added some HTTP request handling capability to Derby but this is NOT part of Apache Derby (yet) - this allows me to send a (Local) AJAX request (LAJAX) to Derby directly and get data returned as XML. The scripting engine does NOT have to be Javascript for the (L)AJAX mode...

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.

Requirements for this Webapp demo were:
- A fast, embeddable, portable and secure (authentication/authorization/encryption) 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:
- Direct HTTP download and archival of JARs,
- Direct copy of files,
- Firefox extension (w/ a dependence on the J2SE runtime environment Firefox plugin)
- Web shipping of already pre-populated databases, then made available locally to the web browser.

You can read all the details about this demo and get the source code at:

Thanks for reading...





« April 2014