On TechRepublic: Why Android beats iPhone
BNET Business Network:
BNET
TechRepublic
ZDNet

May 1st, 2006

JavaDB: An idea whose time has finally come?

Posted by David Berlind @ 12:25 pm

Categories: General, Hardware Infrastructure, IT Management, Mobile, Software Infrastructure, Web Technology

Tags:

Last year, at ApacheCon, according to Sun Chief Open Source Officer Simon Phipps, Sun senior staff engineer Francois Orsini apparently gave a demonstration of JavaDB — Sun’s version of Apache Derby.  Apache Derby is basically a full blown relational database management system (RDBMS) that’s based on pure Java.  In other words, all it needs to run is a Java Virtual Machine.  Derby became a part of the Apache Project when IBM open sourced it in 2004.  I can easily imagine JavaDB serving as a repository for office productivity documents. The technology was original called Cloudscape and originally came to IBM by way of its acquisition of RDBMS solution provider Informix which in turn had at one point acquired a company named Cloudscape (formed as a startup by some ex-Sybase people).  IBM continues to have a version of Derby under the Cloudscape brand name.  Meanwhile, Sun’s Tim Bray announced at ApacheCon that JavaDB (Sun’s version of Derby) will be included in Sun’s Solaris Enterprise System.

The news escaped my interest until just after a Sun roundtable that I attended concluded and Phipps, who originally blogged about JavaDB, asked me if I paid any attention to what he’d written. I had not. But, based on the look in is eyes, my spider senses told me that I probably should have.  It’s taken me a while to give JavaDB a look.  But, now that I have, I’m glad I did.  I’m not sure that Orsini’s aforelinked blog does JavaDB (and Derby) justice for what it is and what it’s capable of.  But if I didn’t know better, I’d say it could be a missing link if not the missing link in solving the number one objection to thin client computing: being able to  work offline. It could also address another problem for companies going down the handheld route; because it’s based purely on Java and because there’s a Java Runtime Environment for most handhelds (as well as notebooks and desktops), JavaDB offers an opportunity to standardize on one database technology across many devices (BlackBerries, Treos, Windows Mobile-based devices, etc.). 

Back to being able to work offline, for as  long as I can remember, every time I’ve written about the death of the fat client at the hands of the sheer elegance of thin client computing (where everything the apps, the storage, etc. is in the cloud), I’ve been hammered by the offline crowd.  "What happens when you’re not connected to net?" They ask.  "That’s why fat clients rule.  Always will."  Even my fellow ZDNet blogger George Ou refuses to throw me a bone — taking on the role as fat-client whip every time he encounters my thin client rhetoric. 

Having inched Web-based applications several notches closer to the sort of interactivity and richness that fat client software (the software that runs on top of operating systems like Windows, OS X, and Linux) is known for, AJAX style programming has probably done more to revive the idea of thin client computing than any other recent technology fad.  But, for Web-based applications, it still doesn’t solve the problem of what to do (beyond having a fat client at the ready) when there’s no connection.  Using blogging as the perfect broad-based example, a lot of bloggers update their Weblogs by using the browser-based Web forms that are associated with their blogging service. With no Web server to get its Web pages, forms, and instructions from, how is a disconnected thin client supposed to work?  Because of the way JavaDB basically persists in a browser’s cache without an online connection (the same way a Web page might be retrievable from browser’s cache even though there’s no connection), JavaDB solves a major league storage problem when it comes to working offline with structured data. 

Shortly after Orsini gave his demo, I tracked him down for some more details on the problems that JavaDB solves.  Orsini gave me the tops of the waves first; stuff that interests developers and admins like how JavaDB is SQL 92 and 2003 compliant and the database.  One of JavaDB’s key features according to Orsini, is its light footprint. Java isn’t exactly known for being a svelte consumer of system resources.  Throw a full-fledged database on top of that and you could see how enterprise developers might start to shy away.  But Orsini swears it’s lightweight and fast and apparently showed as much at ApacheCon when the demo he did in Firefox used a small plug-in that ran on top of the Java Virtual Machine plug-in for Firefox.  That along with the fact that the brute force of Moore’s Law is finally having a bit more of an impact on handhelds (with memory costs dropping and processors getting more powerful and less power consuming) could mean that JavaDB, a technology which is based on nearly 10 year old database technology, may have finally reached a tipping point. 

Of even more interest to those deploying mobile databases is how, like dyamically loaded Java apps themselves, JavaDB is easy to deploy over the air from a Web page.  There’s just one Java Archival Resource (JAR) file: the file that contains all the Java classes that are necessary to get JavaDB up and running.  In his demo at ApacheCon,  Orsini showed tax filing application.  He showed how an app would automatically download as part of an HTML application, how the egine will resides securely in the local cache, and then how it all works seemlessly offline. 

This doesn’t have to be about just rows and tuples of databases either (although many enterprise developers may want it for just that).  I can easily imagine JavaDB serving as a repository for office productivity documents (Microsoft Office, OpenOffice or any one of the new breed of AJAX driven offerings for which JavaDB could be perfect).  All that would be needed is some sort of software shim that makes the JavaDB look like a filesystem.  Never heard of database driven filesystems? Database technology is in fact what will run Microsoft’s future file systems.

Once I realized what JavaDB was capable of, my mind start to whir a bit on the possibilities.  For example, let’s say all PCs, public kiosks, and seat-back Internet terminals on the planes we fly include at bare minimum a browser, Java, support for Java Specification Request 80 (more on that in a second) and a USB port.  Now imagine that everything you normally keep on your PC (documents, contacts, etc.) is stored on a USB key that’s compliant with both JavaDB and JSR 80: the Java USB API that, according to official description, "allows Java applications to discover, read, write, and manage USB devices." 

Once the browser is started, by virtue of its Java JSR 80 support, it should be able to — within the context of the Java plug-in — see a list of HTML pages on the USB key.  Going back to the earlier example of blogging, one of those pages might be named "Create a New Blog."  By clicking on that, a Web page is launched that presents the blog authoring form and then, in true offline fashion,  when the SAVE button is pressed (after you’ve written something), it calls in the JavaDB plug-in, loads the database, stores the data (replicates it from the JavaDB in cache to the one on the USB key), and gives control back to the end user for some other task.  Or, provided the receiving end were set up for it, some AJAX code can check to see if the online repository for the same data is available and just send it there.  But, when it’s not,  the next time the Internet is available "to the USB key," the data in the JavaDB is replicated to the appropriate database in the cloud.  With the right scripts, JavaDB could easily multiplex to a variety of other non-native data stores (eg: TypePad for a blog, a SQL database for the enterprise, and your local contact manager).

Today, working offline is the major objection to working with AJAX-driven Web-based productivity apps.  Not so much so with real database apps because enterprise IT departments have learned to pick a strong mobile database offering like Sybase’s SQL Anywhere that’s preconfigured to synchronize with a mother database.  But virtually all of those offerings– be they from Sybase, Oracle, IBM, or Microsoft– require fairly thick and non-dynamic (in terms of the way code is loaded) clients.  Some offerings like those from Microsoft tie you to Microsoft’s operating systems and, as a result, they’ve had to force certain client technologies on their end users.  What if you’re on a platform from Palm or RIM or you’re running Linux on some desktops? 

Furthermore, software developers have no motivation to turn those database technologies into file systems for storing productivity documents since, because of their limitations, they’ll never be ubiquitously supported and the ROI of adding such a feature would be quite questionable. But, given it’s dynamic nature,  the ubiquity of browsers,  and it’s OS-agnosticism (by virtue of using a JVM), JavaDB could turn into that technology if only a few key developers prototyped the possibilities.

  • Talkback
  • Most Recent of 55 Talkback(s)
I guess what matters...
...is to start some initiative - HSQLDB or any other lightweight database system(s) out there have not tried this initiative (Local AJAX) - Was XMLHttpRequest being known/used a lot before AJAX got de... (Read the rest)
Posted by: forsini Posted on: 05/05/06 You are currently: a Guest | | Terms of Use
That link wasn't me saying it  georgeou | 05/01/06
If anything's fat, it's java  georgeou | 05/01/06
.NET just as fat.  tero_t_vaananen@... | 05/02/06
.Net at least is swift  Justin James | 05/02/06
You still have not addressed a single one of the real problems  Justin James | 05/01/06
OK, I'll respond now  dberlind | 05/01/06
 Justin James | 05/01/06
Proper link  Justin James | 05/01/06
I. Hate. Your. Comment. System. ACK ACK ACK  Justin James | 05/01/06
Well said, Justin!  PMDubuc | 05/02/06
Re:  forsini | 05/02/06
Of 640K, C vs. C++ and an invitation to Justin/Francois  dberlind | 05/02/06
Invitation accepted  Justin James | 05/02/06
Invitation accepted -- how about live, at JavaOne?  forsini | 05/04/06
Re: Re:  Justin James | 05/02/06
 forsini | 05/02/06
Wrong model for AJAX Dev  dkappe@... | 05/05/06
Well...  forsini | 05/05/06
File systems and databases are 2 different things...  forsini | 05/01/06
Thanks Francois  dberlind | 05/01/06
Thanks for the article David and np  forsini | 05/02/06
What you are talking about is actually a rich client application  P. Douglas | 05/01/06
Hmmm....1 part HotJava + 1 part JavaDB [eom]  dberlind | 05/01/06
Ain't nothing thin about it  georgeou | 05/02/06
Rip Van Winkle  xyz10_z | 05/03/06
The DBMS makes it simpler  jorwell | 05/03/06
The Web Browser is not meant to rnu all kinds of apps I agree  forsini | 05/01/06
Interesting, but ...  P. Douglas | 05/01/06
"Full blown" relational? Implausible, but welcome if true  jorwell | 05/02/06
Understanding distributed databases  jorwell | 05/02/06
The javascript conundrum  Roger Ramjet | 05/02/06
VBScript ..  mad-man | 05/02/06
Won't work  Roger Ramjet | 05/03/06
What about Morfik  MikeyTheK | 05/02/06
Too Slow !  jpr75_z | 05/02/06
I hate that app too!  Justin James | 05/02/06
Imagine it is one thing, experiencing it is another  forsini | 05/02/06
Java is the slowest thing out there, except for JavaScript  Justin James | 05/02/06
quick java  mad-man | 05/02/06
I guess I need to be more explicit again  forsini | 05/03/06
How did the Java VM get on the client machine?  mlevison | 05/02/06
The JVM is just a web browser plug-in  forsini | 05/04/06
Er, that would simply make it thick client.  zd@... | 05/02/06
Java can just be another plug-in for the browser  forsini | 05/04/06
Have you tried "Take it with you" Wiki?  dumky | 05/02/06
Why anothery RDBMS?  it@... | 05/02/06
I don't think so  jorwell | 05/03/06
Maybe I misunderstanding UML  it@... | 05/04/06
JavaDB codename  brad@... | 05/02/06
Why is this any better than HSQLDB?  molbioguy | 05/02/06
This is not the debate of the article but eh  forsini | 05/04/06
So JavaDB is a better fit than HSQLDB?  molbioguy | 05/04/06
I guess what matters...  forsini | 05/05/06
Thin clients  TonyMcS | 05/02/06
JavaDB: An idea whose time has finally come?  rsassen@... | 05/03/06

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement
Click Here

Recent Entries

advertisement
Click Here

Archives

Favorite Links

ZDNet Blogs

White Papers, Webcasts, and Downloads

Enterprise Applications

  • Check out some of the easiest and most powerful ways to boost productivity while saving money on your application infrastructure. See ZDNet's comprehensive Enterprise Application resource center, now!
  • New Online Dashboard
  • Read about top issues IT decision-makers face every day, plus get cost effective solutions to real life IT problems. Oracle Topline