Request for implemetation
[email protected] Thu, 29 Sep 2005 16:53:29 +0200
| Newsgroups | gmane.comp.db.mckoi |
|---|---|
| Message-ID | <OF97CC363B.0A88141D-ONC125708B.0051B3F0-C125708B.0052595D@tadsrl.it> |
Dear McKoi developers,
My Name is Alex and I'm a Java developer from Italy.
I'm very enthusiast about this project and I've got to make a request for
implementation.
I found the liveCopyTo method really useful, but a backup copy of a plain
empty db
result in a @200Kb directory:
//------------------------------------
import java.io.*;
....
DBSystem session = ....
session.getDatabase().liveCopyTo(
new File("/home/databases/mckoi_backups/1/"));
//------------------------------------
I think there could be a new method as you can see here:
//------------------------------------
import java.io.*;
....
DBSystem session = ....
session.getDatabase().liveZipCopyTo(
new File("/home/databases/mckoi_backups/1.zip"));
//------------------------------------
The resulting, same backup, zip file will weight @30Kb.
A better solution could be the next:
//------------------------------------
import java.io.*;
....
DBSystem session = ....
session.getDatabase().liveZipCopyTo(
new FileOutpuStream("/home/databases/mckoi_backups/1.zip"));
//------------------------------------
or if needed, with the same method (usage in a servlet):
//------------------------------------
....
response.setContentType("application/zip");
session.getDatabase().liveZipCopyTo(response.getOutputStream());
//------------------------------------
Now you could be able to stream the backup over a single zip file or over
the net
through a Servlet response...
..and without having to backup, zip & send
(no disk space used, some java hosting don't permit to write).
These are only humble suggestions for a next version of McKoi Database.
If someone plan to adopt these changes or simply find this interesting,
please email me.
I'm planning to write a McKoi DB Management Front End based upon latest
Servlet & JSP implementation
(Tomcat as primary target).
Alex