Friday, December 22nd, 2006

Embedding a database in IE

Category: Articles

<>p>Francois Orsini showed us his proof of concept for Embedding Derby in Mozilla Firefox.

David Van Couvering has updated the community with the news that Giorgio Arata has got this working in IE land by using Sarissa the pre-Ajax Ajax library.

Is anyone trying to do anything with this method?

Posted by Dion Almaer at 12:34 pm
8 Comments

+++--
3.1 rating from 32 votes

8 Comments »

Comments feed TrackBack URI

The Mozilla/Derby link is from 2005. SQLite is going to be the official database embedded into Mozilla.

Comment by Embed — December 22, 2006

I don’t see how this is useful technology. The only reason I can think of to keep data on the client is if it is needed by the UI in some way, maybe for a comet-type message queue or something. But this doesn’t particularly excite me.

Comment by Jason Kolb — December 22, 2006

I see a lot of applications:
1. Clients can run in disconnected mode
2. Full blown apps with no internet dependencies (except occasional updates) can be created within the browser
3. Reduce load time for ajax heavy pages (store the scripts in database and load dynamically with occasional refresh for updates).
As ajax heavy applications become the norm, from a performance perspective, we are going to reach the limits of DOM size. It may be a good idea to near store certain dom section in the database and swap them with others when needed.

Comment by sartre — December 22, 2006

Re: sartre

Just to heat up the discussion a little bit ;-)

1) It seems that is already possible without using databases
2) Why would this be necessary? Do we not have an OS that is delivering us a framework to build regular applications instead?
3) You have a point. I don’t know what the performance benefits would be over traditional caching, but I’m not sure they’ll be that much better.

In my opinion something like an embedded database will only add to the immense variety in browser functionality. Imagine going through the hell of developing an application built on several completely different data storage methods… (and what if your user doesn’t have the embedded db functionality at all?)

Comment by Maurits Dekkers — December 22, 2006

Maybe Mozilla will use sqlite to store cookies, and finally support httpOnly. One can always hope!

Comment by Steven Roussey — December 22, 2006

Re: Embed

1) SQLite within Firefox has a lot of restrictions today – Can you save application data locally via a simple Javascript call? No. Not saying it won’t happen but today you can’t. 2) SQLite/Firefox is well, Mozilla Firefox only, you can’t really discount IE, can you? I don’t think so.

Re: Jason Kolb

Sarte’s comments described it all – Being able to empower today’s and tomorrow’s Rich Internet Applications with offline capability is not fiction, but a reality which can be damn useful and convenient when one does not have internet connectivity – This happens all the time and for a lot of users – we’re are not living in an always connected world; even in places where internet access should be a given.

Re: Stephen

This does not serve the same purposes as WhatWG – Here we’re talking about enabling web developers to access a local client store via a scripting interface (i.e. Javascript) to store application data and in a simple manner (no extra syntax) as they’re used to. Installing a Java Plug-in Web ClientStore service extension that works across browsers and that is accessible via Javascript is a few clicks aways (basically)…

Re: Maurits

1) Maybe, but it depends on the application (RIA) requirements (i.e. what needs to be stored or searched, etc)

2) Portability and enabling RIA to run offline

3) If the browser does not have it, well it’s a few clicks away or the user does not get the application to be able to run offline…

It is not just about being able to run internet applications offline – there can also be a need to store user sensitive data on the client side (due to privacy issues) – just another use case…besides caching, offline mode, etc…

Zimbra has enabled their web application to run offline using such technic:
http://www.zimbra.com/blog/archives/2006/11/taking_zimbra_offline.html
http://www.annezelenka.com/2006/11/zimbra-introduces-offline-version

Comment by Francois Orsini — December 26, 2006

Maurits Dekkers,
1. Web clients may be able to run in disconnected mode in a very limited sense. Think about a webmail client. How about being able to finish all your emails on the train/plane in a disconnected mode and they get sent as soon as you are back online. This is just one real world use case. Another example: edit your google spreadsheets off line and synch them with the server when back online.
2. Yes the OS is very good for this kind of stuff, but how about being able to write an ajax enabled app in the browser which runs on all platforms, does not need per client installation for updates. True write once run anywhere…
3. I think once rich client apps move beyond the “toy” stage, a local database will be indispensible. Lets take a spread sheet application. Lets say you want to have 10,000 rows of data. Now any sensible app will bring back the first couple of hundred rows and fetch the remaining from the server as the user scrolls down. But what if I scroll down to row#5000 and then go back to top. Currently you have 2 options, 1.remove whatever is not in your viewpane and then go back to the server to fetch it, when it comes back into view (I think Yahoo mail beta version uses this technique).
or..keep increasing you DOM size, until everything slows down to a crawl.
A local database gives you a 3rd very good option:
Show the first 200 rows, bring the remaining asynchronously. now display whatever you need by swapping from the local database rather than making a network hop every time a user scrolls. If you compare the performance for retrieving 200 rows of data from a database v/s remote network I think it would be several orders of magnitude.
regards

Comment by Sartre — December 26, 2006

Also, most current and specific client-side browser storage solutions have a name-value pair scheme which is alright for some applications but very limited by nature…If you need to store more than just a name-value pair and run some query, than having a transaction storage such as a database service (portable across mostly known browsers) is great – The browser client-store service w/ Java DB demo is portable across browsers and yet is easy to interface from a scripting interface such as Javascript – Do all internet applications need it? nope, but if you want to empower some rich internet application to run offline, then it’s like (auto) installing an extra plug-in or module to enable you to run offline – It is a choice left to the end-user and it is easy enough to get it installed…

Comment by Francois Orsini — December 26, 2006

Leave a comment

You must be logged in to post a comment.