gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-developers] Java/Windows GUI


From: Jan Marco Alkema
Subject: [GNUnet-developers] Java/Windows GUI
Date: Wed, 6 Nov 2002 10:33:17 -0800

Hello Christa,

I am more a general programmer. I know a little bit of everything (HTS
informatica + Technische Bedrijfskunde Univeristeit Twente ("Business
administration")).

My first goal was to test gnunet for downloading big files. I have two
different links to Internet. I downloaded big files from mine ADSL server to
mine cable modem test server.

The last test took 50 hours. I seems pretty stable --)

I see in  http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/grub/client/src/
"Ported the files to Visual C++ 6.0". Hopefully we can use some knowlegdge
of grub (see http://www.grub.org/ for the details) . We share files and grub
shares URL's. I see “every day” mails about windows problems of the port of
grub. In mine option they are starting with the port to Windows and faced
and solved the problems (for use).

Example "ported" code:

#ifdef GRUB_UNIX
p_crawler_error = pthread_create(&crawler_pid, &crawler_attr,
startCoordinator, (void *)ceo);
#else
p_crawler_error = CreateThread(NULL,0,(unsigned long (__stdcall *)(void
*))startCoordinator,(void *)ceo,0,&crawler_pid);
#endif

May be a good suggestion to make the gnunet core code Windows compatible.
Iceman uses in foonrip the _WIN32 directive. For example:

#if defined(_WIN32)
#include <windows.h>
#else
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#endif

Mine next goals are:

1) Porting Cdfoon Java GUI to gnunet;

2) Porting Megafoon Windows API and Megafoon Windows installer to gnunet;

3) (Automatically) Software distribution;

4) Install the banking perl routines of Peter Kaas.

Ad 1)  The cdfoon (Dutch telephone book on Cd) has a Java GUI. Bastiaan told
me one's that the design was generic. See http://cdfoon.cryptoforge.net/ for
his site. You could rewrite it easy to another application. The Java GUI
uses JNI to call the routines in the DLL. In the DLL you find the unzipping
and selection of the requested records. To throw the Windows DLL's out of
the Java code is simple, only I am not very experienced with Java till now.
Iceman has mailed me a patch. Bastiaan gives on his site a program to do the
work (http://cdfoon.cryptoforge.net/cdph0n-run-0.1.tar.gz). I must invest
some time to install all the needed programs to do the job. Bastiaan uses a
program called ant (http://jakarta.apache.org/ant). For example: "I got
configuration errors when I tried to install it". Initial you get a GUI
which has all normal features only there are no data linked to the GUI (all
the search windows works properly, mouse invents, about screen, etc).

I will first try to implement gnunet-stat to the cdfoon Java GUI.
Gnunet-stats is only an example to test what problems I get and get some
experience with Java and gnunet. Think direction: Separate the source code
which is needed to communicate to the gnunet port 2087. Translate it to
Java. In mine option the Java client (GUI) should only exist out of java
code. Don't use DLL's. You get a GUI version which will run on different
platforms (Unix, Linux, Windows, etc.). You connect to a gnunet server. I
see a gnunet server as a black box were you can put in and retrieve files
from besides questioning what the status (byte in/out, number of indexed
files, version of the gnunet server, etc. ) of the black box is.

I’ am thinking of to use 2 ports. The gnunet port 2087 for the real time
statistics of gnunet and the "MySQL port" for the long time statistics. In a
screen in the cdfoon gui (based on port 2087) I can see the real time
statistics and in another screen I can see the long time statistics based on
MYSQL port (a query to the MySQL database). I will run under cron a program
to fill the gnunet statistics every 5 minutes in MySQL  I think there is a
good reason to use two ways ("ports") to retrieve data (instant==real time
value and stored= "real time" values stored in database).

Ad 2) Richard made a Windows (API) ripper of cdfoon. It is called megafoon.
See for the details http://members.lycos.nl/megafoon/foon/. Source code =
http://members.lycos.nl/megafoon/download/foon2002-src-1.0208e.tar.gz. In
mine opinion I can easily import the gnunet-stats code in Megafoon. Richard
also made a Windows installer. I will ask him how to make a installer for
megafoon + gnunet-stats.

Ad 3) Automatically) Software distribution: Master/slave concept:

With a daily cron job the master server will perform:

A)      Download the last sources via de csv command: <cvs -d
:pserver:address@hidden:/var/cvs/GNUnet checkout GNUnet>

B)      Walk recursively through the source tree /usr/local/gnunet with
“fshinsert”. If the footprint (MD5 + file size) of a file is not in the
MySQL FileTrack database then the file will be zipped (with bzip2) and
transferred to the backup tree /usr/local/gnunet/backup/jjjjmmddhhMMss,
where jjjj= year, mm= month number, dd= day number, MM= minute, ss= second.
Parallel the MD5, Filesize, Path, Filename will be inserted in a temporary
database (temprelease) with a session number.

C)      If the sorted temprelease (on file size and MD5) and the sorted root
release(on file size and MD5) are the same (MD5 and File size) the
temprelease will be deleted depending on the session number else the
temprelease will be inserted in the (root) release database with equal
release number and patch number = patch number + 1.

With a daily cron job the slave server will perform:

Let version be 0.96 and patch = 1 => X = {A, B, C, F, G, H}
Let version be 0.96 and patch = 2 => Y = {A, C, D, G}, A..H element of
independent files. X is existing release on the slave server. Y is the last
release with the highest patch number.

- Files to be transferred from master to slave = (Y AND (NOT X)) = {D}
- Files to be deleted in slave = (X AND (NOT Y)) = {B, F, H}
- Files which NOT have to be transferred  = (X AND Y) = {A, C, G}.

Ad 4) Peter Kaas made perl routines to Interface to a Dutch Bank (Postbank).
See also http://sourceforge.net/projects/girotel-gto/ I mine opinion bank
transactions can be a coordination means for the sequence and allocation of
the scarce gnunet resources (CPU, Disk space, network capacity, etc.) of the
file up/downloading proccesses. (password = empty. first row is to log in,
last two rows is for downloading the source code(logout process)).

cvs -d:pserver:address@hidden:/cvsroot/girotel-gt
o login
cvs -d:pserver:address@hidden:/cvsroot/girotel-gt
o co demos
cvs -d:pserver:address@hidden:/cvsroot/girotel-gt
o co interface

Greetings Jan Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]