|
|
||
Francois Orsini's BlogApril 2006 ArchivesEmbedding Apache Derby in Mozilla Firefox demo postedPosted by forsini on April 29, 2006 at 11:34 PM | Permalink | Comments (4)This demo showcases Java DB (based on Apache Derby) running embedded within a web browser. At the present time, this demo runs on Mozilla Firefox and Mozilla Navigator web browsers - The HTML and javascript would have to be modified in order to run on other web browsers such as Microsoft Internet Explorer. This Web application demonstrates how an embedded database can be used to persist data from a tax return being created either online or offline. The application can be deployed manually or automatically using Sun's Java Plug-in with installing the application as a Java Extension. Apache Derby will run embedded within the browser and act as a local storage and cache for this last one. You can now get all the information about the demo embedding JavaDB within a web browser, which was shown at ApacheCon 05'. Direct link to the demo information page can be found at http://developers.sun.com/prodtech/javadb/overview/product_tour/index.jsp. The minimal requirement for the demo is to install Sun's Java plug-in extension for the web browser. This demo does not run on Apple Mac OS X yet (work in progress). You can also read some additional information on a previous blog entry. Compressing Apache Derby w/ Pack200Posted by forsini on April 29, 2006 at 11:26 PM | Permalink | Comments (3)PACK200 (JSR-200) is a very interesting feature that is available as part of Java 5. In order to increase network server, availability and bandwidth , two new compression formats have been made available to Java deployment of applications and applets: gzip and Pack200. HTTP compression is implemented in Java Web Start and Java Plug-in in compliance with HTTP 1.1 RFC 2616. If a client does not support this type of compression then a web server will send a non-compressed JAR or a format that the client can process. More information about Pack200 at: I have compressed the Apache Derby engine JAR file (derby.jar) using pack200 and the resulting JAR went from 2,131,777 to 630,520 bytes (~2MB down to 600K for the database core engine!). Uncompression happens on the client side automatically once the pack200 compressed JAR has been fetched. To compress/pack the JAR archive: It then can be stored on a HTTP 1.1 compliant web server and if a web client support pack200-gzip encoding (specified as part of the HTTP request), then the server will send that compressed JAR down - otherwise the server will stream/send a format that the client can process (compressed {gzip} or not {.jar}). To unpack (manually): This is quite good when one needs to deploy Apache Derby over a network (i.e. Applet using Derby with the Java plug-in, etc) or as part of some installer who would want to pack JARs even more efficiently and then unpack them during install (unpack200{.exe} is a standalone executable that can be included as part of an installer) pack200 and unpack200 are pure executable(s) that do not require a JVM to be present or run at the time an archive is compressed or uncompressed (i.e. during installation) unpack200 (Unix) or unpack200.exe(Windows) included as part of the JRE as well (under bin) Pack200 also has a Java API (java.util.jar.Pack200): This does not reduce the runtime footprint of Apache Derby - it basically provides means to reduce the network footprint of JARs during download. Pack200 also supports the packing of *signed* JARs. | ||
|
|