One Hundred Hellos - Blog

Flickr API Java - flickrj - 23 January 2006

Emulate API (REST)
cd /home/daniel/downloads/flickr/flickrapi-1.0a9-src/api/examples
Backup has Broken Directory Names
time java -classpath .:../build/flickrapi-1.0a9.jar flickrj.samples.Backup c5f36426bd41cf771cf5fcf11f467c73 48704656@N00 de2e684eeb503608 coco


./flickrapi-1.0a9/Flickeroo.java
./flickrapi-1.0a9-src/api/src/flickrj/samples/Backup.java
./flickrapi-1.0a9-src/api/examples
Emulate API (REST)
cd /home/daniel/downloads/flickr/flickrapi-1.0a9-src/api/examples
Backup has Broken Directory Names
time java -classpath .:../build/flickrapi-1.0a9.jar flickrj.samples.Backup c5f36426bd41cf771cf5fcf11f467c73 48704656@N00 de2e684eeb503608 coco


./flickrapi-1.0a9/Flickeroo.java
./flickrapi-1.0a9-src/api/src/flickrj/samples/Backup.java
./flickrapi-1.0a9-src/api/examples

Java IO Flash Speed - 30 November 2005

IO Speed comparison from java:
Buffered IOStream - 1k writes.
!Saturate file-system cache!
write/read 10 Mb (10 *2^20 bytes)
to file on HD
to file on Flash memory
{Slow, Fast} x {USB1.1 USB 2.0}
java : jit, no-jit

on boole:
/ - md1- raid0
write file of length 100MB at rate 98.911964MB/s (1.012s)
write file of length 1000MB at rate 49.205334MB/s (20.393s)
/archive - md2- raid1
write file of length 100MB at rate 94.33963MB/s (1.062s)
write file of length 1000MB at rate 34.31591MB/s (31.023s)

Boole: Unix cp - Read + Write
time cp coco /archive/coco - 54.452s
time cp coco caca 43.439s
time cp /archive/coco /archive/caca 53.663s
time cp /archive/coco coco 57.503s


on euler:
write file of length 1000MB at rate 53.20847MB/s (19.225s)
write file of length 100MB at rate 123.91574MB/s (0.809s)

on vik:
write file of length 1000MB at rate 26.901968MB/s (37.172s)
write file of length 100MB at rate 28.8267MB/s (3.469s)
write file of length 100MB at rate 12.260912MB/s (8.156s)
IO Speed comparison from java:
Buffered IOStream - 1k writes.
!Saturate file-system cache!
write/read 10 Mb (10 *2^20 bytes)
to file on HD
to file on Flash memory
{Slow, Fast} x {USB1.1 USB 2.0}
java : jit, no-jit

on boole:
/ - md1- raid0
write file of length 100MB at rate 98.911964MB/s (1.012s)
write file of length 1000MB at rate 49.205334MB/s (20.393s)
/archive - md2- raid1
write file of length 100MB at rate 94.33963MB/s (1.062s)
write file of length 1000MB at rate 34.31591MB/s (31.023s)

Boole: Unix cp - Read + Write
time cp coco /archive/coco - 54.452s
time cp coco caca 43.439s
time cp /archive/coco /archive/caca 53.663s
time cp /archive/coco coco 57.503s


on euler:
write file of length 1000MB at rate 53.20847MB/s (19.225s)
write file of length 100MB at rate 123.91574MB/s (0.809s)

on vik:
write file of length 1000MB at rate 26.901968MB/s (37.172s)
write file of length 100MB at rate 28.8267MB/s (3.469s)
write file of length 100MB at rate 12.260912MB/s (8.156s)

Derby Speed - 30 November 2005

As an extension to the flash memory speed tests,

tried inserting records into derby:
CREATE TABLE number (oid INT, PRIMARY KEY(oid));
INSERT INTO number(oid) values(?);

oid=1...n
database size :
1kRecs : 760kB
10kRecs : 2.4MB
100kRecs : 9.4MB
1000kRecs: 57.6MB

create database and table takes about 2 seconds.
important when number of records is small
commit size is main factor.

Without Table creation With Table Creation
N Recs Rate Time Rate Time
-Commit size 1
1kRecs 351.61743Recs/s (2.845s) 195.73302Recs/s (5.109s)
10kRecs 661.682Recs/s (15.113s) 573.4274Recs/s (17.439s)
-Commit size 10
10kRecs 1623.1132Recs/s (6.161s) 1094.9304Recs/s (9.133s)
100kRecs 3172.3877Recs/s (31.522s) 2956.743Recs/s (33.821s)
-Commit size 100
1kRecs 542.8882Recs/s (1.842s) 243.13155Recs/s (4.113s)
10kRecs 2001.2007Recs/s (4.997s) 1376.652Recs/s (7.264s)
100kRecs 4766.6714Recs/s (20.979s) 4247.7275Recs/s (23.542s)
-Commit size 1000
1kRecs 368.86758Recs/s (2.711s) 149.23146Recs/s (6.701s)
10kRecs 2046.2451Recs/s (4.887s) 1395.0892Recs/s (7.168s)
100kRecs 5414.4785Recs/s (18.469s) 4817.42Recs/s (20.758s)
1000kRecs 6039.4863Recs/s (165.577s) 5950.5747Recs/s (168.051s)
-Commit size 2000
1000kRecs 5626.5757Recs/s (177.728s) 5549.482Recs/s (180.197s)
As an extension to the flash memory speed tests,

tried inserting records into derby:
CREATE TABLE number (oid INT, PRIMARY KEY(oid));
INSERT INTO number(oid) values(?);

oid=1...n
database size :
1kRecs : 760kB
10kRecs : 2.4MB
100kRecs : 9.4MB
1000kRecs: 57.6MB

create database and table takes about 2 seconds.
important when number of records is small
commit size is main factor.

Without Table creation With Table Creation
N Recs Rate Time Rate Time
-Commit size 1
1kRecs 351.61743Recs/s (2.845s) 195.73302Recs/s (5.109s)
10kRecs 661.682Recs/s (15.113s) 573.4274Recs/s (17.439s)
-Commit size 10
10kRecs 1623.1132Recs/s (6.161s) 1094.9304Recs/s (9.133s)
100kRecs 3172.3877Recs/s (31.522s) 2956.743Recs/s (33.821s)
-Commit size 100
1kRecs 542.8882Recs/s (1.842s) 243.13155Recs/s (4.113s)
10kRecs 2001.2007Recs/s (4.997s) 1376.652Recs/s (7.264s)
100kRecs 4766.6714Recs/s (20.979s) 4247.7275Recs/s (23.542s)
-Commit size 1000
1kRecs 368.86758Recs/s (2.711s) 149.23146Recs/s (6.701s)
10kRecs 2046.2451Recs/s (4.887s) 1395.0892Recs/s (7.168s)
100kRecs 5414.4785Recs/s (18.469s) 4817.42Recs/s (20.758s)
1000kRecs 6039.4863Recs/s (165.577s) 5950.5747Recs/s (168.051s)
-Commit size 2000
1000kRecs 5626.5757Recs/s (177.728s) 5549.482Recs/s (180.197s)

BFM Screenplay - 18 November 2005

Music - Philip Glass Einstein on the beach
Fade -
Can you see it.
Moiré ->
Etymology ->
[ Textile Texture Architecture Structure Rythm ]
Zoom out - Rendered Moiré
Observe Moiré (flat because close, translucid)
Loose outer Dome ( C,S radius -> ∞; D ->0) (Loose outer, instead of inner to preserve rotation)
Discreet blend from F=45(30),..,3(6), and back to 24. (to see structure)
Bring back outer dome from infinity D->1.015, C,S in 0.0001 ->0.01 -> Opaque

- Study Feature Matrix [blend]

Fade to black
Can you build it.
Richard Buckminster "Bucky" Fuller
(July 12, 1895 – July 1, 1983)

Fade to credits - Abel, Boole, Carnot, Dirac, Euler, Feynman, Goedel,...
Thanks to POV-Ray, Dome, Linux, Imagemagick,...
Music - Philip Glass Einstein on the beach
Fade -
Can you see it.
Moiré -> Etymology ->
[ Textile Texture Architecture Structure Rythm ]
Zoom out - Rendered Moiré
Observe Moiré (flat because close, translucid)
Loose outer Dome ( C,S radius -> ∞; D ->0) (Loose outer, instead of inner to preserve rotation)
Discreet blend from F=45(30),..,3(6), and back to 24. (to see structure)
Bring back outer dome from infinity D->1.015, C,S in 0.0001 ->0.01 -> Opaque

- Study Feature Matrix [blend]

Fade to black
Can you build it.
Richard Buckminster "Bucky" Fuller
(July 12, 1895 – July 1, 1983)

Fade to credits - Abel, Boole, Carnot, Dirac, Euler, Feynman, Goedel,...
Thanks to POV-Ray, Dome, Linux, Imagemagick,...

Moire 3D - Dome - POV Ray - 14 November 2005

Using Dome to generate Geodesic domes for POV-Ray





./dome_4_80/dome -f15 -sb dome15.pov
mv dome.inc dome15.inc
dome15.inc:#declare DomePoints15=
dome15.inc:#declare DomeEdges15=


./dome_4_80/dome -f18 -sb dome18.pov
mv dome.inc dome18.inc
dome18.inc:#declare DomePoints18=
dome18.inc:#declare DomeEdges18=

combine dome15.pov and dome18.pov
into dome-both.pov (add missing semi-colons)
#include"dome15.inc"
#include"dome18.inc"
...
#declare Dome15=
union{
object {DomeEdges15 no_shadow texture{EdgeTexture}}
object {DomePoints15 no_shadow texture{PointTexture}}
}

#declare Dome18=
union{
object {DomeEdges18 no_shadow texture{EdgeTexture}}
object {DomePoints18 no_shadow texture{PointTexture18}}
}

object{Dome15 rotate <22,> scale <1.1,1.1,1.1> }
object{Dome18 rotate <0,> }

72 degrees should do it for bucky balls

Animation options

Kn.n = set frame clock to n.n
KFIn = set initial frame number to n
KFFn = set final frame number to n
KIn.n = set initial clock value to n.n
KFn.n = set final clock value to n.n
SFn|0.n = start subset at frame n | start at n percent in sequence
EFn|0.n = end subset at frame n | end at n percent in sequence
KC = calculate clock value for cyclic animation

./povray-3.6/povray +Lpovray-3.6/include/ +Idome-both.pov +Odome-both.png +FN +W400 +H300 +V -D +X +KFI0 +KFF72 +KI0.0 +KF72.0 +KC


-------------------
Moire Version

cat dome15.inc| sed -e "s/0.015}$/0.025}/g" | sed -e "s/0.01 }$/0.02 }/g" > moire15.inc
cat dome18.inc| sed -e "s/0.015}$/0.025}/g" | sed -e "s/0.01 }$/0.02 }/g" > moire18.inc
./povray-3.6/povray +Lpovray-3.6/include/ +Imoire.pov +Omoire.png +FN +W800 +H600 +V +D +X
display moire.png


again with 30-36
./dome_4_80/dome -f30 -sb caca.pov
./dome_4_80/dome -f36 -sb caca.pov

./povray-3.6/povray +Lpovray-3.6/include/ +Idome3036.pov +Odome3036f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF72 +KI0.0 +KF72.0 +KC

again with 24-27
./dome_4_80/dome -f24 -sb caca.pov
./dome_4_80/dome -f27 -sb caca.pov

./povray-3.6/povray +Lpovray-3.6/include/ +Idome2427.pov +Odome2427f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF72 +KI0.0 +KF72.0 +KC

and 24-30
./povray-3.6/povray +Lpovray-3.6/include/ +Idome2430.pov +Odome2430f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF144 +KI0.0 +KF72.0 +KC

and 27-36
./povray-3.6/povray +Lpovray-3.6/include/ +Idome2736.pov +Odome2736f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF144 +KI0.0 +KF72.0 +KC
Using Dome to generate Geodesic domes for POV-Ray





./dome_4_80/dome -f15 -sb dome15.pov
mv dome.inc dome15.inc
dome15.inc:#declare DomePoints15=
dome15.inc:#declare DomeEdges15=


./dome_4_80/dome -f18 -sb dome18.pov
mv dome.inc dome18.inc
dome18.inc:#declare DomePoints18=
dome18.inc:#declare DomeEdges18=

combine dome15.pov and dome18.pov
into dome-both.pov (add missing semi-colons)
#include"dome15.inc"
#include"dome18.inc"
...
#declare Dome15=
union{
object {DomeEdges15 no_shadow texture{EdgeTexture}}
object {DomePoints15 no_shadow texture{PointTexture}}
}

#declare Dome18=
union{
object {DomeEdges18 no_shadow texture{EdgeTexture}}
object {DomePoints18 no_shadow texture{PointTexture18}}
}

object{Dome15 rotate <22,> scale <1.1,1.1,1.1> }
object{Dome18 rotate <0,> }

72 degrees should do it for bucky balls

Animation options

Kn.n = set frame clock to n.n
KFIn = set initial frame number to n
KFFn = set final frame number to n
KIn.n = set initial clock value to n.n
KFn.n = set final clock value to n.n
SFn|0.n = start subset at frame n | start at n percent in sequence
EFn|0.n = end subset at frame n | end at n percent in sequence
KC = calculate clock value for cyclic animation

./povray-3.6/povray +Lpovray-3.6/include/ +Idome-both.pov +Odome-both.png +FN +W400 +H300 +V -D +X +KFI0 +KFF72 +KI0.0 +KF72.0 +KC


-------------------
Moire Version

cat dome15.inc| sed -e "s/0.015}$/0.025}/g" | sed -e "s/0.01 }$/0.02 }/g" > moire15.inc
cat dome18.inc| sed -e "s/0.015}$/0.025}/g" | sed -e "s/0.01 }$/0.02 }/g" > moire18.inc
./povray-3.6/povray +Lpovray-3.6/include/ +Imoire.pov +Omoire.png +FN +W800 +H600 +V +D +X
display moire.png


again with 30-36
./dome_4_80/dome -f30 -sb caca.pov
./dome_4_80/dome -f36 -sb caca.pov

./povray-3.6/povray +Lpovray-3.6/include/ +Idome3036.pov +Odome3036f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF72 +KI0.0 +KF72.0 +KC

again with 24-27
./dome_4_80/dome -f24 -sb caca.pov
./dome_4_80/dome -f27 -sb caca.pov

./povray-3.6/povray +Lpovray-3.6/include/ +Idome2427.pov +Odome2427f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF72 +KI0.0 +KF72.0 +KC

and 24-30
./povray-3.6/povray +Lpovray-3.6/include/ +Idome2430.pov +Odome2430f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF144 +KI0.0 +KF72.0 +KC

and 27-36
./povray-3.6/povray +Lpovray-3.6/include/ +Idome2736.pov +Odome2736f.png +FN +W400 +H300 +V +D +X +KFI1 +KFF144 +KI0.0 +KF72.0 +KC

JFreeChart and JNLP and WebApp - 14 November 2005

Example of JfreeChart and WebStart (JNLP) integration.
See also Extension I.
JFreeChart Extension II

For Webapp use:
Cewolf
Example of JfreeChart and WebStart (JNLP) integration.
See also Extension I.
JFreeChart Extension II

For Webapp use:
Cewolf

Fusing Galo - 12 November 2005

To move progressively to appfuse structure:
+ create simple DAO for one entity by hand
- move to generated hbm files (xdoclet integration)
- move to autowired factories with spring

-create client/server source trees
-implment simple web service

-JNLP delivery for client
-client side Thread Worker
To move progressively to appfuse structure:
+ create simple DAO for one entity by hand
- move to generated hbm files (xdoclet integration)
- move to autowired factories with spring

-create client/server source trees
-implment simple web service

-JNLP delivery for client
-client side Thread Worker

Hsql in Hibernate - 11 November 2005

For a in-process database to be persisted, must call
checkpoint, or shutdown [compact]

hibernate.connection.url jdbc:hsqldb:file:test

To acces Hsql database:
java hsqldb.jar --rcfile sqltool.rc test
----- sqltool.rc ----
# A personal Filebased Database
urlid test
url jdbc:hsqldb:file:test
username sa
password
--------------------
For a in-process database to be persisted, must call
checkpoint, or shutdown [compact]

hibernate.connection.url jdbc:hsqldb:file:test

To acces Hsql database:
java hsqldb.jar --rcfile sqltool.rc test
----- sqltool.rc ----
# A personal Filebased Database
urlid test
url jdbc:hsqldb:file:test
username sa
password
--------------------

Galo : HIbernate,JNLP,AXIS - 11 November 2005

-Move Media info to POJO.
-Persist POJO in local Datasource (Hibernate of JDBC DAO)
and integrate build (new lib/common/client)
-Thread for GaloClient
-First JNLP based on Progress2
-Expose Webservice with Axis
-Catchup un unit tests
-Move Media info to POJO.
-Persist POJO in local Datasource (Hibernate of JDBC DAO)
and integrate build (new lib/common/client)
-Thread for GaloClient
-First JNLP based on Progress2
-Expose Webservice with Axis
-Catchup un unit tests

Filesystem Walker - 07 November 2005

Traverse Directory tree advising IFileHandler
of each Directory and File that is reached:
org.galo.filesystem:

public interface IFileHandler {
public void handle(File f);
}
public class BaseWalker {
public BaseWalker(IFileHandler directoryHandler,
IFileHandler fileHandler) ;
}

There are static shortcuts:

int DirectoryWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);
int FileWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);
Traverse Directory tree advising IFileHandler
of each Directory and File that is reached:
org.galo.filesystem:

public interface IFileHandler {
public void handle(File f);
}
public class BaseWalker {
public BaseWalker(IFileHandler directoryHandler,
IFileHandler fileHandler) ;
}

There are static shortcuts:

int DirectoryWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);
int FileWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);