[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24976 - in gnunet-java: . src/org/gnunet src/org/gnunet/ns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24976 - in gnunet-java: . src/org/gnunet src/org/gnunet/nse src/org/gnunet/requests src/org/gnunet/transport src/org/gnunet/util |
Date: |
Thu, 15 Nov 2012 11:22:32 +0100 |
Author: dold
Date: 2012-11-15 11:22:32 +0100 (Thu, 15 Nov 2012)
New Revision: 24976
Added:
gnunet-java/src/org/gnunet/transport/
gnunet-java/src/org/gnunet/transport/BlacklistCallback.java
gnunet-java/src/org/gnunet/transport/HelloUpdateCallback.java
gnunet-java/src/org/gnunet/transport/PeerIterateCallback.java
gnunet-java/src/org/gnunet/transport/RequestConnectMessage.java
gnunet-java/src/org/gnunet/transport/StartMessage.java
gnunet-java/src/org/gnunet/transport/Transport.java
gnunet-java/src/org/gnunet/transport/TryConnectCallback.java
Modified:
gnunet-java/ISSUES
gnunet-java/build.gradle
gnunet-java/izpack-installer.xml
gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java
gnunet-java/src/org/gnunet/requests/RequestQueue.java
gnunet-java/src/org/gnunet/util/Client.java
gnunet-java/src/org/gnunet/util/Scheduler.java
Log:
updated ISSUES, started implementing transport
Modified: gnunet-java/ISSUES
===================================================================
--- gnunet-java/ISSUES 2012-11-15 10:09:42 UTC (rev 24975)
+++ gnunet-java/ISSUES 2012-11-15 10:22:32 UTC (rev 24976)
@@ -109,3 +109,107 @@
* WoT:
* GPG itself has no API, but there's
http://www.gnupg.org/related_software/gpgme/
* whole PKI in java http://www.ejbca.org/download.html
+
+
+
+----------------------------------------------------------
+
+* currently trying to rule out a heisenbug in gnunet-java
+ * turns up only sometimes, never when running tests individually
+ * stacktraces are just wrong:
+
+java.lang.AssertionError: notifyTransmitReady called on disconnected client
+ at org.gnunet.util.Client.notifyTransmitReady(Client.java:152)
+ at
org.gnunet.requests.RequestQueue.handleNextTransmit(RequestQueue.java:102)
+ at org.gnunet.requests.RequestQueue.add(RequestQueue.java:158)
+ at org.gnunet.statistics.Statistics.set(Statistics.java:277)
+ at org.gnunet.statistics.StatisticsTest$17.run(StatisticsTest.java:263)
+ at org.gnunet.util.Scheduler$TaskConfiguration.run(Scheduler.java:200)
+ at
org.gnunet.util.Scheduler$TaskConfiguration.access$1100(Scheduler.java:115)
+ at org.gnunet.util.Scheduler.runReady(Scheduler.java:505)
+ at org.gnunet.util.Scheduler.run(Scheduler.java:481)
+ at org.gnunet.util.Scheduler.run(Scheduler.java:447)
+ at org.gnunet.nse.NSETest.test_nse(NSETest.java:52)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:616)
+
+the NSE-test case somehow calls statistics ... that would be only possible if
+the tasks got mixed up, e.g. because of static variables in Scheduler
+
+
+=> Confirmed, test cases, even from different classes, get called in the same
environment!
+
+
+
+
+about the release last week:
+actually gnunet-java-0.9.4.jar should have the name
gnunet-java-installer-0.9.4, as there would
+be confusion with the library gnunet-java.jar
+
+
+* consensus:
+ * how do we handle the "endgame" phase of a consensus session?
+ * clients can call conclude(), no new values will be accepted until enough
peers
+ have been reconciled with
+ * how do we manage memory/values for reconciled values?
+ * memory does not seem sufficient if we want to use a file / database / etc.
+ * should consensus itself handle timestamps of set elements?
+ * conclude() would need that
+ * deletion of elements should not be supported, should it?
+ * would be possible with anti-messages, see the gossiping overview paper
+ * handling multiple peers: when to partition?
+ * i.e. sometimes we can't satisfy
+ * scheduling of exchanges / when should we reconcile with whom?
+
+
+* should consensus have a fixed bytestring length, or handle variable lengths?
+ * probably the former as it is simpler
+ * later could be done by just reconciling hashes, not the data itself
+
+* should there be the ability to remove/add peer to a consensus session?
+ * I don't think so
+
+* what size should the consensus_id be?
+
+
+* how should the command line tool work?
+ * either we introduce sessions with local UIDs, or we have to provide the
list of peers every time
+
+
+* more literature:
+ * http://www.ics.uci.edu/~eppstein/pubs/EppGooUye-SIGCOMM-11.pdf
+ * more recent (2011), they are aware of the minsky/trachtenberg CPI approach
+ * but only compare themselves with the BASIC-RECON approach, not
PARTITION-RECON
+ * claim to resolve differences between two hosts in one round,
+ with computational and communication costs linear in the size of the symm.
difference
+ * does an estimate of set difference size with the first message => not very
nice for p2p
+ * make extensive use of invertible bloom filters
+ * but no public implementation available :(
+
+ * http://www.ics.uci.edu/~eppstein/pubs/EppGooUye-SIGCOMM-11.pdf
+ * also from 2011, estimates difference size with bloom filters, uses CPI,
and is still computationally expensive
+
+
+
+* found a TR with the same title by minsky/trachtenberg, also add it to biblio?
+ * http://dspace.library.cornell.edu/bitstream/1813/5788/1/2000-1796.pdf
+
+
+transport:
+* offer_hello: why a task, not a callback?
+* blacklist: why do we pass a config handle, not a transport handle?
+
+
+
+
+
+* automake stuff:
+ * INCLUDES is deprecated:
+ http://www.gnu.org/software/automake/manual/automake.html#Program-Variables
+ INCLUDES
+ This does the same job as AM_CPPFLAGS (or any per-target _CPPFLAGS variable
if it is used). It is an older name for the same functionality. This variable
is deprecated; we suggest using AM_CPPFLAGS and per-target _CPPFLAGS instead.
+
+
+
Modified: gnunet-java/build.gradle
===================================================================
--- gnunet-java/build.gradle 2012-11-15 10:09:42 UTC (rev 24975)
+++ gnunet-java/build.gradle 2012-11-15 10:22:32 UTC (rev 24976)
@@ -108,7 +108,7 @@
outputs.file("$installerFile")
}
-installer.dependsOn "build"
+installer.dependsOn "build","javadoc"
installer.outputs.upToDateWhen { false }
Modified: gnunet-java/izpack-installer.xml
===================================================================
--- gnunet-java/izpack-installer.xml 2012-11-15 10:09:42 UTC (rev 24975)
+++ gnunet-java/izpack-installer.xml 2012-11-15 10:22:32 UTC (rev 24976)
@@ -73,6 +73,14 @@
<include name="javadoc/**" />
</fileset>
</pack>
+ <pack name="source code" required="no">
+ <description>
+ The source code of gnunet-java
+ </description>
+ <fileset dir="." targetdir="$INSTALL_PATH/share/gnunet-java">
+ <include name="gnunet-java-0.9.4-src.tar.gz" />
+ </fileset>
+ </pack>
</packs>
</installation>
Modified: gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java
===================================================================
--- gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java 2012-11-15
10:09:42 UTC (rev 24975)
+++ gnunet-java/src/org/gnunet/nse/NetworkSizeEstimation.java 2012-11-15
10:22:32 UTC (rev 24976)
@@ -139,7 +139,7 @@
*/
public void disconnect() {
disconnected = true;
- client.disconnect();
+
}
public static void main(String[] args) {
Modified: gnunet-java/src/org/gnunet/requests/RequestQueue.java
===================================================================
--- gnunet-java/src/org/gnunet/requests/RequestQueue.java 2012-11-15
10:09:42 UTC (rev 24975)
+++ gnunet-java/src/org/gnunet/requests/RequestQueue.java 2012-11-15
10:22:32 UTC (rev 24976)
@@ -78,6 +78,7 @@
* Handle next request.
*/
private void handleNextTransmit() {
+
if (clogged) {
return;
}
Added: gnunet-java/src/org/gnunet/transport/BlacklistCallback.java
===================================================================
--- gnunet-java/src/org/gnunet/transport/BlacklistCallback.java
(rev 0)
+++ gnunet-java/src/org/gnunet/transport/BlacklistCallback.java 2012-11-15
10:22:32 UTC (rev 24976)
@@ -0,0 +1,9 @@
+package org.gnunet.transport;
+
+/**
+ * ...
+ *
+ * @author Florian Dold
+ */
+public class BlacklistCallback {
+}
Added: gnunet-java/src/org/gnunet/transport/HelloUpdateCallback.java
===================================================================
--- gnunet-java/src/org/gnunet/transport/HelloUpdateCallback.java
(rev 0)
+++ gnunet-java/src/org/gnunet/transport/HelloUpdateCallback.java
2012-11-15 10:22:32 UTC (rev 24976)
@@ -0,0 +1,9 @@
+package org.gnunet.transport;
+
+/**
+ * ...
+ *
+ * @author Florian Dold
+ */
+public class HelloUpdateCallback {
+}
Added: gnunet-java/src/org/gnunet/transport/PeerIterateCallback.java
===================================================================
--- gnunet-java/src/org/gnunet/transport/PeerIterateCallback.java
(rev 0)
+++ gnunet-java/src/org/gnunet/transport/PeerIterateCallback.java
2012-11-15 10:22:32 UTC (rev 24976)
@@ -0,0 +1,9 @@
+package org.gnunet.transport;
+
+/**
+ * ...
+ *
+ * @author Florian Dold
+ */
+public class PeerIterateCallback {
+}
Added: gnunet-java/src/org/gnunet/transport/RequestConnectMessage.java
===================================================================
--- gnunet-java/src/org/gnunet/transport/RequestConnectMessage.java
(rev 0)
+++ gnunet-java/src/org/gnunet/transport/RequestConnectMessage.java
2012-11-15 10:22:32 UTC (rev 24976)
@@ -0,0 +1,25 @@
+package org.gnunet.transport;
+
+import org.gnunet.construct.NestedMessage;
+import org.gnunet.construct.UInt32;
+import org.gnunet.construct.UnionCase;
+import org.gnunet.util.GnunetMessage;
+import org.gnunet.util.PeerIdentity;
+
+/**
+ * ...
+ *
+ * @author Florian Dold
+ */
address@hidden(374)
+public class RequestConnectMessage implements GnunetMessage.Body {
+ @UInt32
+ public int reserved;
+
+ /**
+ * Identity of the peer we would like to connect to.
+ */
+ @NestedMessage
+ public PeerIdentity peer;
+
+}
Added: gnunet-java/src/org/gnunet/transport/StartMessage.java
===================================================================
--- gnunet-java/src/org/gnunet/transport/StartMessage.java
(rev 0)
+++ gnunet-java/src/org/gnunet/transport/StartMessage.java 2012-11-15
10:22:32 UTC (rev 24976)
@@ -0,0 +1,32 @@
+package org.gnunet.transport;
+
+import org.gnunet.construct.NestedMessage;
+import org.gnunet.construct.UInt32;
+import org.gnunet.construct.UnionCase;
+import org.gnunet.util.GnunetMessage;
+import org.gnunet.util.PeerIdentity;
+
+/**
+ * ...
+ *
+ * @author Florian Dold
+ */
address@hidden(360)
+public class StartMessage implements GnunetMessage.Body {
+ /**
+ * 0: no options
+ * 1: The 'self' field should be checked
+ * 2: this client is interested in payload traffic
+ */
+ @UInt32
+ public int options;
+
+ /**
+ * Identity we think we have. If it does not match, the
+ * receiver should print out an error message and disconnect.
+ */
+ @NestedMessage
+ public PeerIdentity self;
+
+
+}
Added: gnunet-java/src/org/gnunet/transport/Transport.java
===================================================================
--- gnunet-java/src/org/gnunet/transport/Transport.java
(rev 0)
+++ gnunet-java/src/org/gnunet/transport/Transport.java 2012-11-15 10:22:32 UTC
(rev 24976)
@@ -0,0 +1,103 @@
+package org.gnunet.transport;
+
+import org.gnunet.hello.HelloMessage;
+import org.gnunet.util.*;
+
+/**
+ * ...
+ *
+ * @author Florian Dold
+ */
+public class Transport {
+
+ public Transport(Configuration cfg) {
+
+ }
+
+ /**
+ * Ask the transport service to establish a connection to
+ * the given peer.
+ *
+ * @param target who we should try to connect to
+ * @param cb callback to be called when request was transmitted to
transport
+ * service
+ * @return a GNUNET_TRANSPORT_TryConnectHandle handle or
+ * NULL on failure (cb will not be called)
+ */
+ Cancelable tryConnect(PeerIdentity target, TryConnectCallback cb) {
+ throw new UnsupportedOperationException();
+ }
+
+
+ /**
+ * Obtain the HELLO message for this peer.
+ *
+ * @param rec function to call with the HELLO, sender will be our peer
+ * identity; message and sender will be NULL on timeout
+ * (handshake with transport service pending/failed).
+ * cost estimate will be 0.
+ * @return handle to cancel the operation
+ */
+ Cancelable getHello(HelloUpdateCallback rec) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Offer the transport service the HELLO of another peer. Note that
+ * the transport service may just ignore this message if the HELLO is
+ * malformed or useless due to our local configuration.
+ *
+ * @param hello the hello message
+ * @param cont continuation to call when HELLO has been sent,
+ * tc reason GNUNET_SCHEDULER_REASON_TIMEOUT for fail
+ * tc reasong GNUNET_SCHEDULER_REASON_READ_READY for success
+ * @return a GNUNET_TRANSPORT_OfferHelloHandle handle or NULL on failure,
+ * in case of failure cont will not be called
+ */
+
+ Cancelable offerHello(HelloMessage hello,
+ Scheduler.Task cont) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Install a blacklist callback. The service will be queried for all
+ * existing connections as well as any fresh connections to check if
+ * they are permitted. If the blacklisting callback is unregistered,
+ * all hosts that were denied in the past will automatically be
+ * whitelisted again. Cancelling the blacklist handle is also the
+ * only way to re-enable connections from peers that were previously
+ * blacklisted.
+ *
+ * @param cfg configuration to use
+ * @param cb callback to invoke to check if connections are allowed
+ * @return NULL on error, otherwise handle for cancellation
+ */
+ static Cancelable blacklist(Configuration cfg,
+ BlacklistCallback cb) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Return all the known addresses for a specific peer or all peers.
+ * Returns continuously all address if one_shot is set to GNUNET_NO
+ * <p/>
+ * CHANGE: Returns the address(es) that we are currently using for this
+ * peer. Upon completion, the 'AddressLookUpCallback' is called one more
+ * time with 'NULL' for the address and the peer. After this, the
operation must no
+ * longer be explicitly canceled.
+ *
+ * @param cfg configuration to use
+ * @param peer peer identity to look up the addresses
of, CHANGE: allow NULL for all (connected) peers
+ * @param one_shot GNUNET_YES to return the current state
and then end (with NULL+NULL),
+ * GNUNET_NO to monitor the set of
addresses used (continuously, must be explicitly canceled)
+ * @param timeout how long is the lookup allowed to take
at most (irrelevant if one_shot is set to GNUNET_NO)
+ * @param peer_address_callback function to call with the results
+ */
+ Cancelable
+ peer_get_active_addresses(Configuration cfg, PeerIdentity peer, int
one_shot,
+ RelativeTime timeout, PeerIterateCallback
peer_address_callback) {
+ throw new UnsupportedOperationException();
+ }
+}
+
Added: gnunet-java/src/org/gnunet/transport/TryConnectCallback.java
===================================================================
--- gnunet-java/src/org/gnunet/transport/TryConnectCallback.java
(rev 0)
+++ gnunet-java/src/org/gnunet/transport/TryConnectCallback.java
2012-11-15 10:22:32 UTC (rev 24976)
@@ -0,0 +1,9 @@
+package org.gnunet.transport;
+
+/**
+ * ...
+ *
+ * @author Florian Dold
+ */
+public class TryConnectCallback {
+}
Modified: gnunet-java/src/org/gnunet/util/Client.java
===================================================================
--- gnunet-java/src/org/gnunet/util/Client.java 2012-11-15 10:09:42 UTC (rev
24975)
+++ gnunet-java/src/org/gnunet/util/Client.java 2012-11-15 10:22:32 UTC (rev
24976)
@@ -148,7 +148,10 @@
if (notifyTransmitReadyDelayed) {
throw new AssertionError("notifyTransmitReady called twice!");
}
- if (connection != null && connection.isConnected()) {
+ if (connection == null) {
+ throw new AssertionError("notifyTransmitReady called on
disconnected client");
+ }
+ if (connection.isConnected()) {
return connection.notifyTransmitReady(0, timeout, transmitter);
} else {
notifyTransmitReadyDelayed = true;
Modified: gnunet-java/src/org/gnunet/util/Scheduler.java
===================================================================
--- gnunet-java/src/org/gnunet/util/Scheduler.java 2012-11-15 10:09:42 UTC
(rev 24975)
+++ gnunet-java/src/org/gnunet/util/Scheduler.java 2012-11-15 10:22:32 UTC
(rev 24976)
@@ -63,7 +63,9 @@
private static Selector selector = null;
+ private static boolean scheduler_running = false;
+
static {
try {
selector = SelectorProvider.provider().openSelector();
@@ -455,6 +457,12 @@
* @param initialTask the initial task to run immediately
*/
public static void run(Task initialTask) {
+ if (scheduler_running) {
+ throw new AssertionError("can't call run recursively");
+ }
+
+ scheduler_running = true;
+
if (initialTask != null) {
addContinuation(initialTask, EnumSet.of(Reason.STARTUP));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24976 - in gnunet-java: . src/org/gnunet src/org/gnunet/nse src/org/gnunet/requests src/org/gnunet/transport src/org/gnunet/util,
gnunet <=