You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(123) |
Dec
(100) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(12) |
Feb
(80) |
Mar
(35) |
Apr
|
May
|
Jun
(28) |
Jul
(10) |
Aug
(6) |
Sep
|
Oct
|
Nov
(16) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
| 2009 |
Jan
(20) |
Feb
(1) |
Mar
(19) |
Apr
(12) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
|
From: Jonathan L. <le...@us...> - 2007-02-05 18:43:05
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv609/src/edu/harvard/syrah/pyxida/nc Modified Files: NCManager.java Log Message: added app coord to ncmanager and pulled in some updates from Azureus into the library Index: NCManager.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc/NCManager.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** NCManager.java 1 Feb 2007 14:59:14 -0000 1.33 --- NCManager.java 5 Feb 2007 18:43:04 -0000 1.34 *************** *** 183,193 **** } ! /** ! * @return local coordinate ! */ ! public Coordinate getLocalCoord() { ! return localNC.nc.getSystemCoords(); ! } /** * @return local error --- 183,201 ---- } ! /** ! * @return local coordinate ! */ ! public Coordinate getLocalCoord() { ! return localNC.nc.getSystemCoords(); ! } ! ! /** ! * @return local coordinate ! */ ! public Coordinate getStableCoord() { ! return localNC.nc.getApplicationCoords(); ! } + /** * @return local error |
|
From: Peter P. <pr...@us...> - 2007-02-05 18:32:52
|
Update of /cvsroot/pyxida/Pyxida/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30287/bin Modified Files: animateNC.pl Log Message: Updated anim script Index: animateNC.pl =================================================================== RCS file: /cvsroot/pyxida/Pyxida/bin/animateNC.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** animateNC.pl 4 Feb 2007 20:31:05 -0000 1.1 --- animateNC.pl 5 Feb 2007 18:32:39 -0000 1.2 *************** *** 4,42 **** use Getopt::Std; my %params = (); my %pos = (); ! getopts("f:", \%params); ! my $frameTime = 60; ! $frameTime = $params{'f'} if defined $params{'f'}; while (my $line = <>) { if ($line =~ m/\w\w (\d+) .* addr=(.+) c=\[(.+),(.+),(.+),(.+),h(.+)\]/) { ! my ($ts, $addr, $a, $b, $c, $d, $h) = ($1, $2, $3, $4, $5, $6, $7); ! my $dateTS = localtime($ts / 1000); ! #print STDERR "$dateTS $ts $addr $a $b $c $d $h\n"; ! $pos{$addr} = [$a, $b, $c]; #, $d, $h]; ! } } ! print "splot '-'\n"; ! foreach my $addr (keys %pos) { ! my $o = ""; ! foreach my $c (@{$pos{$addr}}) { ! $o .= "$c "; } ! chop $o; ! print "$o\n"; ! } - print "e\n"; - sub fixedNum() { my $num = shift; ! my $result = sprintf("%08d", $num); return $result; } \ No newline at end of file --- 4,85 ---- use Getopt::Std; + use IPC::Open2; my %params = (); my %pos = (); ! getopts("f:d", \%params); ! my $framePeriod = 120; # frame period in sec ! $framePeriod = $params{'f'} if defined $params{'f'}; ! ! my $debug = 0; ! $debug = 1 if defined $params{'d'}; ! ! my $frameFormat="png"; ! ! my $startFrameTS; ! my $frameCounter = 0; ! ! local (*GPIN, *GPOUT); ! open2(\*GPIN, \*GPOUT, "gnuplot"); ! ! print GPOUT "set xrange[-1000:1000]\n"; ! print GPOUT "set yrange[-1000:1000]\n"; ! print GPOUT "set zrange[-1000:1000]\n"; while (my $line = <>) { if ($line =~ m/\w\w (\d+) .* addr=(.+) c=\[(.+),(.+),(.+),(.+),h(.+)\]/) { ! my ($ts, $addr, $a, $b, $c, $d, $h) = ($1 / 1000, $2, $3, $4, $5, $6, $7); ! my $dateTS = localtime($ts); ! print STDERR "$dateTS $ts $addr $a $b $c $d $h\n" if ($debug); ! ! # TODO make the 4D->3D conversion properly ! $pos{$addr} = [$a, $b, $c]; #, $d, $h]; ! ! $startFrameTS = $ts unless defined $startFrameTS; ! ! if ($ts - $startFrameTS > $framePeriod) { ! $frameCounter++; ! &outputFrame($dateTS); ! %pos = (); ! $startFrameTS = $ts; ! print STDERR "Starting a new frame at " . $dateTS . "\n"; ! } ! ! } } ! close GPIN; ! close GPOUT; ! print STDERR "Generating animation...\n"; ! system "mencoder \"mf://*.png\" -mf fps=25 -o pyxida-anim.avi -ovc lavc -lavcopts vcodec=mpeg4"; ! print STDERR "Deleting frames...\n"; ! system "rm pyxida-anim-*.$frameFormat\n"; ! print STDERR "Done.\n"; ! ! sub outputFrame() { ! my $title = shift; ! ! my $filenameCount = &fixedNum($frameCounter); ! print GPOUT "set terminal $frameFormat size 1024,768\n"; ! print GPOUT "set output \'pyxida-anim-$filenameCount.$frameFormat\'\n"; ! print GPOUT "set title \'$title\'\n"; ! print GPOUT "splot '-' notitle\n"; ! foreach my $addr (keys %pos) { ! my $o = ""; ! foreach my $c (@{$pos{$addr}}) { ! $o .= "$c "; ! } ! chop $o; ! print GPOUT "$o\n"; } ! print GPOUT "e\n"; } sub fixedNum() { my $num = shift; ! my $result = sprintf("%05d", $num); return $result; } \ No newline at end of file |
|
From: Peter P. <pr...@us...> - 2007-02-04 20:31:11
|
Update of /cvsroot/pyxida/Pyxida/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15060/bin Added Files: animateNC.pl Log Message: Started writing a perl script that creates an animation from a Pyxida coords log file. --- NEW FILE: animateNC.pl --- #!/usr/bin/perl -w use strict; use Getopt::Std; my %params = (); my %pos = (); getopts("f:", \%params); my $frameTime = 60; $frameTime = $params{'f'} if defined $params{'f'}; while (my $line = <>) { if ($line =~ m/\w\w (\d+) .* addr=(.+) c=\[(.+),(.+),(.+),(.+),h(.+)\]/) { my ($ts, $addr, $a, $b, $c, $d, $h) = ($1, $2, $3, $4, $5, $6, $7); my $dateTS = localtime($ts / 1000); #print STDERR "$dateTS $ts $addr $a $b $c $d $h\n"; $pos{$addr} = [$a, $b, $c]; #, $d, $h]; } } print "splot '-'\n"; foreach my $addr (keys %pos) { my $o = ""; foreach my $c (@{$pos{$addr}}) { $o .= "$c "; } chop $o; print "$o\n"; } print "e\n"; sub fixedNum() { my $num = shift; my $result = sprintf("%08d", $num); return $result; } |
|
From: Peter P. <pr...@us...> - 2007-02-02 19:29:14
|
Update of /cvsroot/pyxida/Pyxida/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26504/config Modified Files: pyxida.cfg Added Files: log-logserver.config Log Message: Minor fixes --- NEW FILE: log-logserver.config --- ############################################################ # Default Logging Configuration File # # You can use a different file by specifying a filename # with the java.util.logging.config.file system property. # For example java -Djava.util.logging.config.file=myfile ############################################################ # "handlers" specifies a comma separated list of log Handler # classes. These handlers will be installed during VM startup. handlers= java.util.logging.ConsoleHandler # Default global logging level. .level= CONFIG ############################################################ # Handler specific properties. ############################################################ # Limit the messages that are printed on the console: java.util.logging.ConsoleHandler.level = FINEST # use this format instead of the default java.util.logging.SimpleFormatter java.util.logging.ConsoleHandler.formatter = edu.harvard.syrah.prp.LogFormatter ############################################################ # Provides extra control for each logger. ############################################################ # For example, set the com.xyz.foo logger to only log SEVERE # messages: #com.xyz.foo.level = SEVERE #sun.rmi.level = CONFIG ############################################################################################### main ############################################################################################### edu.harvard.syrah.level = INFO #edu.harvard.syrah.level = FINEST ############################################################################################### async ############################################################################################### #edu.harvard.syrah.sbon.async.level = CONFIG ############################################################################################### pyxida ############################################################################################### edu.harvard.syrah.pyxida.level = DEBUG edu.harvard.syrah.pyxida.ping.level = DEBUG Index: pyxida.cfg =================================================================== RCS file: /cvsroot/pyxida/Pyxida/config/pyxida.cfg,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pyxida.cfg 2 Feb 2007 16:07:23 -0000 1.11 --- pyxida.cfg 2 Feb 2007 19:29:12 -0000 1.12 *************** *** 38,40 **** pyxida.logserver=columbia.doc.ic.ac.uk ! #pyxida.logserver.error_interval=10000 \ No newline at end of file --- 38,44 ---- pyxida.logserver=columbia.doc.ic.ac.uk ! # Specifies how often to retry connecting to the log server (read by the nodes) ! #pyxida.logserver.error_interval=10000 ! ! # Specifies the log interval (read by the server) ! #pyxida.logserver.log_interval=10000 \ No newline at end of file |
|
From: Peter P. <pr...@us...> - 2007-02-02 19:29:14
|
Update of /cvsroot/pyxida/Pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26504 Modified Files: runLogServer.sh Log Message: Minor fixes Index: runLogServer.sh =================================================================== RCS file: /cvsroot/pyxida/Pyxida/runLogServer.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** runLogServer.sh 2 Feb 2007 16:22:38 -0000 1.2 --- runLogServer.sh 2 Feb 2007 19:29:12 -0000 1.3 *************** *** 1,2 **** #!/bin/bash ! java -ea -cp dist/pyxida.jar edu.harvard.syrah.pyxida.LogServer >>pyxida-pl-coords.log 2>&1 --- 1,3 ---- #!/bin/bash ! [ "$JAVA_HOME" = "" ] && export JAVA_HOME=/usr/local/jdk1.5.0_07 ! $JAVA_HOME/bin/java -ea -cp dist/pyxida-0.1.3.jar -Djava.util.logging.config.file=config/log-logserver.config edu.harvard.syrah.pyxida.LogServer |
|
From: Peter P. <pr...@us...> - 2007-02-02 19:29:14
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26504/src/edu/harvard/syrah/pyxida Modified Files: LogServer.java Log Message: Minor fixes Index: LogServer.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/LogServer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LogServer.java 2 Feb 2007 15:49:22 -0000 1.1 --- LogServer.java 2 Feb 2007 19:29:12 -0000 1.2 *************** *** 30,34 **** // By default tell nodes to report their coords every 10 seconds ! private static final long LOG_INTERVAL = 10 * 1000; private static LogServer logServer = null; --- 30,34 ---- // By default tell nodes to report their coords every 10 seconds ! private static final long LOG_INTERVAL = Long.valueOf(Config.getConfigProps().getProperty("pyxida.logserver.log_interval", "10000")); private static LogServer logServer = null; *************** *** 71,77 **** log.error("Please run the code with assertions turned on: java -ea ..."); ! // Turn on colour support ! ANSI.use(Boolean.valueOf(Config.getConfigProps().getProperty("sbon.console.ansi", "true"))); ! /* * Create the event loop --- 71,77 ---- log.error("Please run the code with assertions turned on: java -ea ..."); ! // Turn off colour support ! ANSI.use(false); ! /* * Create the event loop |
|
From: Peter P. <pr...@us...> - 2007-02-02 19:29:14
|
Update of /cvsroot/pyxida/Pyxida/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26504/lib Modified Files: sbon-async.jar Log Message: Minor fixes Index: sbon-async.jar =================================================================== RCS file: /cvsroot/pyxida/Pyxida/lib/sbon-async.jar,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 Binary files /tmp/cvsW9Muej and /tmp/cvsIrNg3X differ |
|
From: Peter P. <pr...@us...> - 2007-02-02 16:22:55
|
Update of /cvsroot/pyxida/Pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15210 Modified Files: runLogServer.sh Log Message: Updated logserver run script Index: runLogServer.sh =================================================================== RCS file: /cvsroot/pyxida/Pyxida/runLogServer.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** runLogServer.sh 2 Feb 2007 15:49:22 -0000 1.1 --- runLogServer.sh 2 Feb 2007 16:22:38 -0000 1.2 *************** *** 1,2 **** #!/bin/bash ! java -ea -cp dist/pyxida-0.2.jar edu.harvard.syrah.pyxida.LogServer --- 1,2 ---- #!/bin/bash ! java -ea -cp dist/pyxida.jar edu.harvard.syrah.pyxida.LogServer >>pyxida-pl-coords.log 2>&1 |
|
From: Jonathan L. <le...@us...> - 2007-02-02 16:18:59
|
Update of /cvsroot/pyxida/Pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13606 Modified Files: TODO Log Message: todo Index: TODO =================================================================== RCS file: /cvsroot/pyxida/Pyxida/TODO,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TODO 29 Dec 2006 10:22:21 -0000 1.16 --- TODO 2 Feb 2007 16:18:44 -0000 1.17 *************** *** 13,16 **** --- 13,17 ---- http://nodename:55501/xmlrpc + - JL: merge Azureus updates into Pyxida library ###################################################################### |
|
From: Peter P. <pr...@us...> - 2007-02-02 16:07:31
|
Update of /cvsroot/pyxida/Pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9348 Modified Files: build.xml Log Message: Changed version to 0.1.3 Index: build.xml =================================================================== RCS file: /cvsroot/pyxida/Pyxida/build.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** build.xml 2 Feb 2007 15:49:22 -0000 1.10 --- build.xml 2 Feb 2007 16:07:23 -0000 1.11 *************** *** 13,17 **** <property name="log-nodes" location="log/nodes" /> ! <property name="version" value="0.2" /> <property name="Pyxida-jar" value="pyxida-${version}.jar" /> --- 13,17 ---- <property name="log-nodes" location="log/nodes" /> ! <property name="version" value="0.1.3" /> <property name="Pyxida-jar" value="pyxida-${version}.jar" /> |
|
From: Peter P. <pr...@us...> - 2007-02-02 16:07:29
|
Update of /cvsroot/pyxida/Pyxida/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9348/config Modified Files: pyxida.cfg Log Message: Changed version to 0.1.3 Index: pyxida.cfg =================================================================== RCS file: /cvsroot/pyxida/Pyxida/config/pyxida.cfg,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pyxida.cfg 2 Feb 2007 15:49:21 -0000 1.10 --- pyxida.cfg 2 Feb 2007 16:07:23 -0000 1.11 *************** *** 36,40 **** # Hostname of a centralised log server that periodically logs the coordinate ! pyxida.logserver=hourglass.eecs.harvard.edu #pyxida.logserver.error_interval=10000 \ No newline at end of file --- 36,40 ---- # Hostname of a centralised log server that periodically logs the coordinate ! pyxida.logserver=columbia.doc.ic.ac.uk #pyxida.logserver.error_interval=10000 \ No newline at end of file |
|
From: Peter P. <pr...@us...> - 2007-02-02 16:07:28
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9348/src/edu/harvard/syrah/pyxida Modified Files: Pyxida.java Log Message: Changed version to 0.1.3 Index: Pyxida.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/Pyxida.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Pyxida.java 2 Feb 2007 15:49:22 -0000 1.19 --- Pyxida.java 2 Feb 2007 16:07:23 -0000 1.20 *************** *** 21,27 **** private static final Log log = new Log(Pyxida.class); ! private static final int MAJOR_VERSION_NUM = 0; ! private static final int MINOR_VERSION_NUM = 2; ! private static final String VERSION = MAJOR_VERSION_NUM + "." + MINOR_VERSION_NUM; static { --- 21,28 ---- private static final Log log = new Log(Pyxida.class); ! private static final int MAJOR_VERSION = 0; ! private static final int MINOR_VERSION = 1; ! private static final int MINOR_MINOR_VERSION = 3; ! private static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + MINOR_MINOR_VERSION; static { |
|
From: Peter P. <pr...@us...> - 2007-02-02 15:49:30
|
Update of /cvsroot/pyxida/Pyxida/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2402/lib Modified Files: sbon-async.jar Log Message: Created a centralised Pyxida log server that all nodes report to. Index: sbon-async.jar =================================================================== RCS file: /cvsroot/pyxida/Pyxida/lib/sbon-async.jar,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 Binary files /tmp/cvsQoTRWI and /tmp/cvsFyTPOm differ |
|
From: Peter P. <pr...@us...> - 2007-02-02 15:49:26
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2402/src/edu/harvard/syrah/pyxida Modified Files: Pyxida.java Added Files: LogServer.java Log Message: Created a centralised Pyxida log server that all nodes report to. Index: Pyxida.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/Pyxida.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Pyxida.java 1 Feb 2007 14:59:14 -0000 1.18 --- Pyxida.java 2 Feb 2007 15:49:22 -0000 1.19 *************** *** 6,9 **** --- 6,10 ---- import edu.harvard.syrah.prp.Log; import edu.harvard.syrah.pyxida.api.APIManager; + import edu.harvard.syrah.pyxida.log.LogManager; import edu.harvard.syrah.pyxida.nc.NCManager; import edu.harvard.syrah.pyxida.ping.PingManager; *************** *** 20,24 **** private static final Log log = new Log(Pyxida.class); ! private static final String VERSION = "0.1"; static { --- 21,27 ---- private static final Log log = new Log(Pyxida.class); ! private static final int MAJOR_VERSION_NUM = 0; ! private static final int MINOR_VERSION_NUM = 2; ! private static final String VERSION = MAJOR_VERSION_NUM + "." + MINOR_VERSION_NUM; static { *************** *** 44,47 **** --- 47,51 ---- private APIManager apiManager; private PingManager pingManager; + private LogManager logManager; private ObjCommIF comm; final CB0 statCB; *************** *** 68,72 **** } ! private void init() { random = new Random(System.currentTimeMillis()); registerStatsTimer(); --- 72,76 ---- } ! private void init(final CB0 cbDone) { random = new Random(System.currentTimeMillis()); registerStatsTimer(); *************** *** 92,97 **** switch (result.state) { case OK: { ! // Initialise the external APIs ! apiManager = new APIManager(ncManager); apiManager.init(new CB0() { --- 96,100 ---- switch (result.state) { case OK: { ! // Initialise the external APIs apiManager = new APIManager(ncManager); apiManager.init(new CB0() { *************** *** 99,120 **** switch (result.state) { case OK: { ! log.main("Pyxida node initialised correctly."); break; } ! case TIMEOUT: ! case ERROR: { ! log.error("Initialising failed: " + result.toString()); ! break; } } } }); - break; } ! case TIMEOUT: ! case ERROR: { ! log.error("Could not initialise the NCManager: " + result.what); ! break; } } --- 102,120 ---- switch (result.state) { case OK: { ! // Initialise the log manager ! logManager = new LogManager(comm, ncManager); ! logManager.init(cbDone); break; } ! default: { ! cbDone.call(result); } } } }); break; } ! default: { ! cbDone.call(result); } } *************** *** 125,132 **** break; } ! case TIMEOUT: ! case ERROR: { ! log.error("Could not bind to objcomm port: " + result.what); ! break; } } --- 125,130 ---- break; } ! default: { ! cbDone.call(result); } } *************** *** 169,173 **** pyxida = new Pyxida(); ! pyxida.init(); try { --- 167,186 ---- pyxida = new Pyxida(); ! ! pyxida.init(new CB0() { ! protected void cb(CBResult result) { ! switch (result.state) { ! case OK: { ! log.main("Pyxida node initialised successfully"); ! break; ! } ! case TIMEOUT: ! case ERROR: { ! log.error("Could not initialise Pyxida node: " + result.toString()); ! break; ! } ! } ! } ! }); try { --- NEW FILE: LogServer.java --- package edu.harvard.syrah.pyxida; import edu.harvard.syrah.prp.ANSI; import edu.harvard.syrah.prp.Log; import edu.harvard.syrah.pyxida.log.ReportCoordReplyMsg; import edu.harvard.syrah.pyxida.log.ReportCoordReqMsg; import edu.harvard.syrah.sbon.async.*; import edu.harvard.syrah.sbon.async.CBResult.CBState; import edu.harvard.syrah.sbon.async.CallbacksIF.CB0; import edu.harvard.syrah.sbon.async.CallbacksIF.CB1; import edu.harvard.syrah.sbon.comm.AddressFactory; import edu.harvard.syrah.sbon.comm.AddressIF; import edu.harvard.syrah.sbon.comm.obj.*; public class LogServer { private static final Log log = new Log(LogServer.class); static { /* * All config properties in the file must start with 'pyxida.' */ Config.read("pyxida", System.getProperty("pyxida.config", "config/pyxida.cfg")); } private static final String CONFIG_FILE = System.getProperty("pyxida.config", "config/pyxida.cfg"); // Imperial blocks ports outside of 55000-56999 public static final int COMM_PORT = Integer.parseInt(Config.getConfigProps().getProperty("pyxida.port", "55504")); // By default tell nodes to report their coords every 10 seconds private static final long LOG_INTERVAL = 10 * 1000; private static LogServer logServer = null; ObjCommIF comm; private void init(final CB0 cbDone) { // Initiliase the ObjComm communication module comm = new ObjComm(); AddressIF objCommAddr = AddressFactory.createServer(COMM_PORT); log.debug("Starting objcomm server..."); comm.initServer(objCommAddr, new CB0() { protected void cb(CBResult result) { if (result.state == CBState.OK) { comm.registerMessageCB(ReportCoordReqMsg.class, new ReportCoordMsgHandler()); } cbDone.call(result); } }); } /** * @param args */ public static void main(String[] args) { log.main("Pyxida Log Server Version 0.1 starting..."); if (args.length > 0 && args[0].equals("-d")) { Log.setPackageRoot(LogServer.class); String[] newArgs = new String[args.length - 1]; for (int i = 0; i < newArgs.length; i++) newArgs[i] = args[i]; args = newArgs; } // Turn on assertions boolean assertsEnabled = false; assert assertsEnabled = true; if (!assertsEnabled) log.error("Please run the code with assertions turned on: java -ea ..."); // Turn on colour support ANSI.use(Boolean.valueOf(Config.getConfigProps().getProperty("sbon.console.ansi", "true"))); /* * Create the event loop */ EventLoop.set(new EventLoop(Long.valueOf(Config.getConfigProps().getProperty( "sbon.eventloop.statedump", "600000")), Boolean.valueOf(Config.getConfigProps().getProperty( "sbon.eventloop.showidle", "false")))); logServer = new LogServer(); logServer.init(new CB0() { protected void cb(CBResult result) { switch (result.state) { case OK: { log.main("Pyxida log server initialised successfully"); break; } case TIMEOUT: case ERROR: { log.error("Could not initialise Pyxida log server: " + result.toString()); break; } } } }); try { EventLoop.get().main(); } catch (OutOfMemoryError e) { EventLoop.get().dumpState(true); e.printStackTrace(); log.error("Error: Out of memory: " + e); } log.main("Shutdown"); System.exit(0); } class ReportCoordMsgHandler extends ObjCommCB<ReportCoordReqMsg> { private final Log log = new Log(ReportCoordMsgHandler.class); @Override protected void cb(CBResult result, ReportCoordReqMsg reqMsg, AddressIF remoteAddr, Long delay, CB1<Boolean> cbHandled) { switch (result.state) { case OK: { log.info("addr=" + remoteAddr + " c=" + reqMsg.coord); ReportCoordReplyMsg replyMsg = new ReportCoordReplyMsg(); replyMsg.interval = LOG_INTERVAL; LogServer.this.comm.sendResponseMessage(replyMsg, remoteAddr, reqMsg.getMsgId(), new CB0() { protected void cb(CBResult result) { if (result.state != CBState.OK) { log.warn("Could not send reply: " + result); } } }); cbHandled.call(CBResult.OK(), true); break; } case TIMEOUT: case ERROR: { log.warn(result.toString()); break; } } } } } |
|
From: Peter P. <pr...@us...> - 2007-02-02 15:49:24
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/log In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2402/src/edu/harvard/syrah/pyxida/log Added Files: ReportCoordReqMsg.java LogManager.java ReportCoordReplyMsg.java Log Message: Created a centralised Pyxida log server that all nodes report to. --- NEW FILE: ReportCoordReplyMsg.java --- package edu.harvard.syrah.pyxida.log; import edu.harvard.syrah.sbon.comm.obj.ObjMessage; public class ReportCoordReplyMsg extends ObjMessage { private static final long serialVersionUID = 1L; public long interval; } --- NEW FILE: LogManager.java --- package edu.harvard.syrah.pyxida.log; import edu.harvard.syrah.prp.Log; import edu.harvard.syrah.pyxida.Pyxida; import edu.harvard.syrah.pyxida.nc.NCManager; import edu.harvard.syrah.sbon.async.*; import edu.harvard.syrah.sbon.async.CBResult.CBState; import edu.harvard.syrah.sbon.async.CallbacksIF.CB0; import edu.harvard.syrah.sbon.async.CallbacksIF.CB1; import edu.harvard.syrah.sbon.comm.AddressFactory; import edu.harvard.syrah.sbon.comm.AddressIF; import edu.harvard.syrah.sbon.comm.obj.ObjCommIF; import edu.harvard.syrah.sbon.comm.obj.ObjCommRRCB; public class LogManager { private static final Log log = new Log(LogManager.class); private static final String LOG_SERVER_HOSTNAME = Config.getProperty("pyxida.logserver"); static final long ERROR_RETRY_INTERVAL = Long.valueOf(Config.getProperty("pyxida.logserver.error_interval", "600000")); private ObjCommIF comm; private NCManager ncManager; public LogManager(ObjCommIF objComm, NCManager ncManager) { this.comm = objComm; this.ncManager = ncManager; } public void init(final CB0 cb0) { if (LOG_SERVER_HOSTNAME == null) { log.debug("Not logging to log server"); cb0.callOK(); return; } AddressFactory.createResolved(LOG_SERVER_HOSTNAME + ":" + Pyxida.COMM_PORT, new CB1<AddressIF>() { protected void cb(CBResult result, AddressIF logServerAddr) { if (result.state == CBState.OK) { EventLoop.get().registerTimerCB(new ReportCoordCB(comm, logServerAddr, ncManager)); } cb0.call(result); } }); } } class ReportCoordCB extends CB0 { private static final Log log = new Log(ReportCoordCB.class); private ObjCommIF comm; private AddressIF logServerAddr; private NCManager ncManager; ReportCoordCB(ObjCommIF objComm, AddressIF logServerAddr, NCManager ncManager) { this.comm = objComm; this.logServerAddr = logServerAddr; this.ncManager = ncManager; } @Override protected void cb(CBResult result) { ReportCoordReqMsg reqMsg = new ReportCoordReqMsg(); reqMsg.coord = ncManager.getLocalCoord(); log.debug("Reporting coord=" + reqMsg.coord + " to logserver"); comm.sendRequestMessage(reqMsg, logServerAddr, new ObjCommRRCB<ReportCoordReplyMsg>() { protected void cb(CBResult result, ReportCoordReplyMsg replyMsg, AddressIF remoteAddr, Long rtt) { switch (result.state) { case OK: { log.debug("Coord updated successfully. interval=" + replyMsg.interval); EventLoop.get().registerTimerCB(replyMsg.interval, ReportCoordCB.this); break; } case TIMEOUT: case ERROR: { log.debug("LogServer error: " + result.what + ". Retrying in " + LogManager.ERROR_RETRY_INTERVAL + " ms"); EventLoop.get().registerTimerCB(LogManager.ERROR_RETRY_INTERVAL, ReportCoordCB.this); break; } } } }); } } --- NEW FILE: ReportCoordReqMsg.java --- package edu.harvard.syrah.pyxida.log; import edu.harvard.syrah.pyxida.nc.lib.Coordinate; import edu.harvard.syrah.sbon.comm.obj.ObjMessage; public class ReportCoordReqMsg extends ObjMessage { private static final long serialVersionUID = 1L; public Coordinate coord; } |
|
From: Peter P. <pr...@us...> - 2007-02-02 15:49:24
|
Update of /cvsroot/pyxida/Pyxida/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2402/config Modified Files: pyxida.cfg log.config Log Message: Created a centralised Pyxida log server that all nodes report to. Index: log.config =================================================================== RCS file: /cvsroot/pyxida/Pyxida/config/log.config,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** log.config 1 Dec 2006 17:33:15 -0000 1.5 --- log.config 2 Feb 2007 15:49:21 -0000 1.6 *************** *** 38,41 **** --- 38,42 ---- edu.harvard.syrah.level = INFO + #edu.harvard.syrah.level = FINEST ############################################################################################### *************** *** 51,54 **** edu.harvard.syrah.pyxida.level = DEBUG ! edu.harvard.syrah.pyxida.ping.level = INFO --- 52,55 ---- edu.harvard.syrah.pyxida.level = DEBUG ! edu.harvard.syrah.pyxida.ping.level = DEBUG Index: pyxida.cfg =================================================================== RCS file: /cvsroot/pyxida/Pyxida/config/pyxida.cfg,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pyxida.cfg 31 Dec 2006 03:22:29 -0000 1.9 --- pyxida.cfg 2 Feb 2007 15:49:21 -0000 1.10 *************** *** 34,35 **** --- 34,40 ---- # that you run the code as root. pyxida.use_icmp=false + + # Hostname of a centralised log server that periodically logs the coordinate + pyxida.logserver=hourglass.eecs.harvard.edu + + #pyxida.logserver.error_interval=10000 \ No newline at end of file |
|
From: Peter P. <pr...@us...> - 2007-02-02 15:49:24
|
Update of /cvsroot/pyxida/Pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2402 Modified Files: build.xml Added Files: runLogServer.sh Log Message: Created a centralised Pyxida log server that all nodes report to. Index: build.xml =================================================================== RCS file: /cvsroot/pyxida/Pyxida/build.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** build.xml 5 Dec 2006 03:19:06 -0000 1.9 --- build.xml 2 Feb 2007 15:49:22 -0000 1.10 *************** *** 13,17 **** <property name="log-nodes" location="log/nodes" /> ! <property name="version" value="0.1.2" /> <property name="Pyxida-jar" value="pyxida-${version}.jar" /> --- 13,17 ---- <property name="log-nodes" location="log/nodes" /> ! <property name="version" value="0.2" /> <property name="Pyxida-jar" value="pyxida-${version}.jar" /> *************** *** 159,163 **** <jvmarg value="-verbose:gc" /> <jvmarg value="-Xrunhprof:heap=all,file=java-hprof=${env.HOSTNAME}.txt" /> ! <sysproperty key="pyxida.config" value="${pyxida.config}" /> <sysproperty key="java.util.logging.config.file" value="${java.util.logging.config.file}" /> </java> --- 159,164 ---- <jvmarg value="-verbose:gc" /> <jvmarg value="-Xrunhprof:heap=all,file=java-hprof=${env.HOSTNAME}.txt" /> ! <sysproperty key="pyxida.config" value="${py replyMsg.setMsgId(reqMsg.getMsgId()); ! xida.config}" /> <sysproperty key="java.util.logging.config.file" value="${java.util.logging.config.file}" /> </java> --- NEW FILE: runLogServer.sh --- #!/bin/bash java -ea -cp dist/pyxida-0.2.jar edu.harvard.syrah.pyxida.LogServer |
|
From: Peter P. <pr...@us...> - 2007-02-02 15:49:04
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/log In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2027/src/edu/harvard/syrah/pyxida/log Log Message: Directory /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/log added to the repository |
|
From: Peter P. <pr...@us...> - 2007-02-01 15:06:35
|
Update of /cvsroot/pyxida/Pyxida/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20567/lib Modified Files: sbon-async.jar Log Message: New version of SBON async lib Index: sbon-async.jar =================================================================== RCS file: /cvsroot/pyxida/Pyxida/lib/sbon-async.jar,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 Binary files /tmp/cvsaxEZYT and /tmp/cvsN2n2q2 differ |
|
From: Jonathan L. <le...@us...> - 2007-02-01 14:59:24
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16977/edu/harvard/syrah/pyxida/nc Modified Files: NCManager.java ProxyPingRequestMsg.java Log Message: reduced ncmanager output Index: ProxyPingRequestMsg.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc/ProxyPingRequestMsg.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProxyPingRequestMsg.java 5 Dec 2006 03:21:28 -0000 1.1 --- ProxyPingRequestMsg.java 1 Feb 2007 14:59:14 -0000 1.2 *************** *** 1,6 **** package edu.harvard.syrah.pyxida.nc; - import edu.harvard.syrah.sbon.comm.obj.ObjMessage; import edu.harvard.syrah.sbon.comm.AddressIF; /** --- 1,6 ---- package edu.harvard.syrah.pyxida.nc; import edu.harvard.syrah.sbon.comm.AddressIF; + import edu.harvard.syrah.sbon.comm.obj.ObjMessage; /** Index: NCManager.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc/NCManager.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** NCManager.java 3 Jan 2007 16:52:10 -0000 1.32 --- NCManager.java 1 Feb 2007 14:59:14 -0000 1.33 *************** *** 125,130 **** public void printStats() { ! log.info(listNeighbors()); ! log.info("coord= "+localNC.nc); } --- 125,129 ---- public void printStats() { ! log.info("coord= "+localNC.nc+" "+summarizeNeighbors()); } *************** *** 514,534 **** } ! String listNeighbors() { ! StringBuffer sb = new StringBuffer(); ! sb.append("pending:"); ! for (AddressIF node : pendingNeighbors) { ! sb.append (" "+node); ! } ! sb.append(" up:"); ! for (AddressIF node : upNeighbors) { ! sb.append (" "+node); ! } ! sb.append(" down:"); ! for (AddressIF node : downNeighbors) { ! sb.append (" "+node); ! } ! return new String(sb); ! } class CoordClient { final NCClient<AddressIF> nc; --- 513,542 ---- } ! String listNeighbors() { ! StringBuffer sb = new StringBuffer(); ! sb.append("pending:"); ! for (AddressIF node : pendingNeighbors) { ! sb.append (" "+node); ! } ! sb.append(" up:"); ! for (AddressIF node : upNeighbors) { ! sb.append (" "+node); ! } ! sb.append(" down:"); ! for (AddressIF node : downNeighbors) { ! sb.append (" "+node); ! } ! return new String(sb); ! } + String summarizeNeighbors() { + StringBuffer sb = new StringBuffer(); + return new String ( + "p= "+pendingNeighbors.size()+ + " u= "+upNeighbors.size()+ + " d= "+downNeighbors.size()); + } + + class CoordClient { final NCClient<AddressIF> nc; |
|
From: Jonathan L. <le...@us...> - 2007-02-01 14:59:22
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16977/edu/harvard/syrah/pyxida Modified Files: Pyxida.java Log Message: reduced ncmanager output Index: Pyxida.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/Pyxida.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Pyxida.java 30 Nov 2006 17:28:17 -0000 1.17 --- Pyxida.java 1 Feb 2007 14:59:14 -0000 1.18 *************** *** 2,5 **** --- 2,6 ---- import java.util.Random; + import edu.harvard.syrah.prp.ANSI; import edu.harvard.syrah.prp.Log; |
|
From: Peter P. <pr...@us...> - 2007-01-08 14:08:00
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22563/src/edu/harvard/syrah/pyxida/api Modified Files: ExternalAPI.java Log Message: comment about createResolved error handling Index: ExternalAPI.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/api/ExternalAPI.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ExternalAPI.java 3 Jan 2007 16:52:10 -0000 1.17 --- ExternalAPI.java 8 Jan 2007 14:07:57 -0000 1.18 *************** *** 165,169 **** } ! final Map resultMap = new Hashtable(); AddressFactory.createResolved(nodesStr, new CB1<Map<String, AddressIF>>() { --- 165,169 ---- } ! final Map<String, Object> resultMap = new Hashtable<String, Object>(); AddressFactory.createResolved(nodesStr, new CB1<Map<String, AddressIF>>() { *************** *** 171,174 **** --- 171,178 ---- switch (result.state) { case OK: + + //TODO jonathan: why do you handle OK and TIMEOUT together and why is there an ERROR clause? + // The way createResolved works is that it always returns OK but only includes the hostnames + // that resolved correctly in the map. Let me know if you don't like this behaviour and I can change it. case TIMEOUT: { *************** *** 251,255 **** ncManager.getRemoteCoord(remoteNode, new CB1<Coordinate>() { protected void cb(CBResult ncResult, Coordinate remoteCoord) { ! Map resultMap = new Hashtable(); switch (ncResult.state) { --- 255,259 ---- ncManager.getRemoteCoord(remoteNode, new CB1<Coordinate>() { protected void cb(CBResult ncResult, Coordinate remoteCoord) { ! Map<String, Object> resultMap = new Hashtable<String, Object>(); switch (ncResult.state) { *************** *** 276,280 **** case ERROR: { log.warn(nsResult.toString()); ! Map resultMap = new Hashtable(); resultMap.put("result", nsResult.toString()); cbRemoteCoord.call(nsResult, resultMap); --- 280,284 ---- case ERROR: { log.warn(nsResult.toString()); ! Map<String, Object> resultMap = new Hashtable<String, Object>(); resultMap.put("result", nsResult.toString()); cbRemoteCoord.call(nsResult, resultMap); |
|
From: Jonathan L. <le...@us...> - 2007-01-03 16:52:16
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9789/src/edu/harvard/syrah/pyxida/api Modified Files: ExternalAPI.java Log Message: getRemoteCoords for BU appears to work Index: ExternalAPI.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/api/ExternalAPI.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ExternalAPI.java 3 Jan 2007 10:00:56 -0000 1.16 --- ExternalAPI.java 3 Jan 2007 16:52:10 -0000 1.17 *************** *** 173,195 **** case TIMEOUT: { List<AddressIF> remoteNodes = new ArrayList<AddressIF>(); ! remoteNodes.addAll(addrMap.values()); for (AddressIF node : addrMap.values()) { ! if (node != null) { remoteNodes.add(node); } } - // TODO are we OK even if none resolve correctly? - ncManager.getRemoteCoords(remoteNodes, new CB2<Map<AddressIF,Coordinate>,String>() { protected void cb(CBResult ncResult, Map<AddressIF,Coordinate> addr2coord, String errorString) { ! resultMap.put("result", errorString); for (Map.Entry<AddressIF,Coordinate> entry : addr2coord.entrySet()) { ! resultMap.put(entry.getKey().toString(), getVectorFromCoord(entry.getValue())); } } }); --- 173,216 ---- case TIMEOUT: { + //StringBuffer dnsErrors = new StringBuffer(); List<AddressIF> remoteNodes = new ArrayList<AddressIF>(); ! for (AddressIF node : addrMap.values()) { ! if (node != null && node.hasPort()) { remoteNodes.add(node); } + //else { + //dnsErrors.append("Could not resolve "+node); + //} } ncManager.getRemoteCoords(remoteNodes, new CB2<Map<AddressIF,Coordinate>,String>() { protected void cb(CBResult ncResult, Map<AddressIF,Coordinate> addr2coord, String errorString) { ! // TODO this does not work ! // We want to return DNS failures to the client ! ! // combine the two errors if there is already one in there ! // caused through DNS resolution problem below ! if (errorString.equals("Success")) { ! if (resultMap.get("result") == null) { ! resultMap.put("result", "Success"); ! } ! } else { ! if (resultMap.get("result") == null) { ! resultMap.put("result", errorString); ! } else { ! resultMap.put("result", resultMap.get("result") + "\n"+errorString); ! } ! } ! ! log.debug("responding to client addr2coord="+addr2coord.size()+ ! " errorString="+resultMap.get("result")); for (Map.Entry<AddressIF,Coordinate> entry : addr2coord.entrySet()) { ! resultMap.put(entry.getKey().toString(false), getVectorFromCoord(entry.getValue())); } + cbRemoteCoords.call(CBResult.OK(), resultMap); } }); *************** *** 198,202 **** case ERROR: { ! // problem resolving one of the addresses log.warn(result.toString()); resultMap.put("result", result.toString()); --- 219,223 ---- case ERROR: { ! // problem resolving one or more of the addresses log.warn(result.toString()); resultMap.put("result", result.toString()); *************** *** 234,238 **** switch (ncResult.state) { case OK: { ! Vector<Double> listCoord = getVectorFromCoord(remoteCoord); resultMap.put("coord", listCoord); resultMap.put("result", "Success"); --- 255,259 ---- switch (ncResult.state) { case OK: { ! Vector<Double> listCoord = getVectorFromCoord(remoteCoord); resultMap.put("coord", listCoord); resultMap.put("result", "Success"); |
|
From: Jonathan L. <le...@us...> - 2007-01-03 16:52:15
|
Update of /cvsroot/pyxida/Pyxida/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9789/bin Modified Files: query.pl Log Message: getRemoteCoords for BU appears to work Index: query.pl =================================================================== RCS file: /cvsroot/pyxida/Pyxida/bin/query.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** query.pl 3 Jan 2007 10:00:56 -0000 1.11 --- query.pl 3 Jan 2007 16:52:10 -0000 1.12 *************** *** 9,12 **** --- 9,13 ---- my $API_PORT=55501; my $USE_HEIGHT = 1; + my $DEBUG = 0; my $usage = "query.pl [options] url\n"; *************** *** 16,19 **** --- 17,21 ---- $usage .= " -p proxy-node: get proxy coord that is stored on contacted node\n"; $usage .= " -a nodeA -b nodeB: estimate latency btw overlay nodes A and B\n"; + $usage .= " -d debug\n"; $usage .= "\n"; *************** *** 22,29 **** $usage .= "Default port numbers can be overridden with \":port\" syntax\n"; my %para = (); ! getopts('lr:a:b:s:', \%para); ############################################################ if ($#ARGV < 0) { die ("Missing arguments\n$usage"); --- 24,35 ---- $usage .= "Default port numbers can be overridden with \":port\" syntax\n"; my %para = (); ! getopts('lr:a:b:s:d', \%para); ############################################################ + if (defined($para{'d'})) { + $DEBUG = 1; + } + if ($#ARGV < 0) { die ("Missing arguments\n$usage"); *************** *** 45,58 **** ############################################################ #warn "url $url\n"; ! my $server = Frontier::Client->new(url => "$url", debug => 1); if (defined($para{'l'})) { - #warn "making call\n"; my $coordArray = $server->call("pyxida.getLocalCoord"); ! #warn "call returned\n"; ! #print Dumper($coordArray); ! #&Aux::printHash($hash); my $coord = &parse_coord ($coordArray); print "$coord\n"; } elsif (defined($para{'s'})) { my %remoteNodes = (); --- 51,64 ---- ############################################################ #warn "url $url\n"; ! my $server = Frontier::Client->new(url => "$url", debug => $DEBUG); if (defined($para{'l'})) { my $coordArray = $server->call("pyxida.getLocalCoord"); ! if ($DEBUG) { ! print Dumper($coordArray); ! } my $coord = &parse_coord ($coordArray); print "$coord\n"; + } elsif (defined($para{'s'})) { my %remoteNodes = (); *************** *** 62,74 **** next if ($line =~ /\#/); if ($line =~ /\w+/) { ! $remoteNodes{$line} = 1; } } close IN; my $node2coord = $server->call("pyxida.getRemoteCoords", \%remoteNodes); ! print Dumper($node2coord); } elsif (defined($para{'r'})) { my $remoteNode = &addPort ($para{'r'},$PORT); my $resHash = $server->call("pyxida.getRemoteCoord", $remoteNode); if (defined($resHash->{'result'})) { if (($resHash->{'result'} eq 'Success') && --- 68,98 ---- next if ($line =~ /\#/); if ($line =~ /\w+/) { ! my $node = &addPort ($line,$PORT); ! $remoteNodes{$node} = 1; } } close IN; my $node2coord = $server->call("pyxida.getRemoteCoords", \%remoteNodes); ! if ($DEBUG) { ! print Dumper($node2coord); ! } ! foreach my $node (keys %$node2coord) { ! my $coordArray = $node2coord->{$node}; ! if ($node ne 'result') { ! my $coord = &parse_coord ($coordArray); ! print "$node $coord\n"; ! } ! } ! if ((defined($node2coord->{'result'})) && ! ($node2coord->{'result'} ne 'Success')) { ! warn "$node2coord->{'result'}\n"; ! } ! } elsif (defined($para{'r'})) { my $remoteNode = &addPort ($para{'r'},$PORT); my $resHash = $server->call("pyxida.getRemoteCoord", $remoteNode); + if ($DEBUG) { + print Dumper($resHash); + } if (defined($resHash->{'result'})) { if (($resHash->{'result'} eq 'Success') && *************** *** 77,84 **** print "$coord\n"; } else { ! print "Failure: $resHash->{'result'}\n"; } } else { ! print "Failure: cause unknown\n"; } } elsif (defined($para{'a'}) && defined($para{'b'})) { --- 101,108 ---- print "$coord\n"; } else { ! warn "Failure: $resHash->{'result'}\n"; } } else { ! warn "Failure: cause unknown\n"; } } elsif (defined($para{'a'}) && defined($para{'b'})) { *************** *** 87,91 **** my $distance = $server->call("pyxida.estimateRTT", $nodeA, $nodeB); ! #print Dumper($distance); if (defined($distance)) { $distance = sprintf ("%.3f", $distance); --- 111,117 ---- my $distance = $server->call("pyxida.estimateRTT", $nodeA, $nodeB); ! if ($DEBUG) { ! print Dumper($distance); ! } if (defined($distance)) { $distance = sprintf ("%.3f", $distance); |
|
From: Jonathan L. <le...@us...> - 2007-01-03 16:52:15
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9789/src/edu/harvard/syrah/pyxida/nc Modified Files: NCManager.java Log Message: getRemoteCoords for BU appears to work Index: NCManager.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc/NCManager.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** NCManager.java 3 Jan 2007 15:24:26 -0000 1.31 --- NCManager.java 3 Jan 2007 16:52:10 -0000 1.32 *************** *** 231,234 **** --- 231,235 ---- if (node.equals(comm.getLocalAddress())) { addr2coord.put(node,getLocalCoord()); + log.debug("got local coord "+getLocalCoord()); return; } *************** *** 236,239 **** --- 237,241 ---- if (proxyCoord != null) { addr2coord.put(node,proxyCoord.nc.getSystemCoords()); + log.debug("got proxy coord "+proxyCoord.nc.getSystemCoords()); return; } *************** *** 247,251 **** switch (result.state) { case OK: { ! log.debug("received coord back from "+node); addr2coord.put(node,resp.coord); break; --- 249,253 ---- switch (result.state) { case OK: { ! log.debug("received coord back from "+node+" coord="+resp.coord); addr2coord.put(node,resp.coord); break; *************** *** 257,261 **** log.warn(error); if (errorBuffer.length() != 0) { ! errorBuffer.append("\n"); } errorBuffer.append(error); --- 259,263 ---- log.warn(error); if (errorBuffer.length() != 0) { ! errorBuffer.append(","); } errorBuffer.append(error); *************** *** 273,278 **** public void getRemoteCoords(final List<AddressIF> nodes, final CB2<Map<AddressIF,Coordinate>,String> cbCoords) { ! final Barrier barrier = new Barrier(true); ! final Map<AddressIF,Coordinate> addr2coord = new HashMap<AddressIF,Coordinate>(); final StringBuffer errorBuffer = new StringBuffer(); for (AddressIF addr : nodes) { --- 275,287 ---- public void getRemoteCoords(final List<AddressIF> nodes, final CB2<Map<AddressIF,Coordinate>,String> cbCoords) { ! final Map<AddressIF,Coordinate> addr2coord = new HashMap<AddressIF,Coordinate>(); ! if (nodes.size() == 0) { ! String errorString = "getRemoteCoords: no valid nodes"; ! log.warn(errorString); ! cbCoords.call(CBResult.OK(), addr2coord, errorString); ! return; ! } ! ! final Barrier barrier = new Barrier(true); final StringBuffer errorBuffer = new StringBuffer(); for (AddressIF addr : nodes) { *************** *** 281,285 **** EventLoop.get().registerTimerCB(barrier, new CB0() { protected void cb(CBResult result) { ! String errorString = new String (errorBuffer); cbCoords.call(CBResult.OK(),addr2coord, errorString); } --- 290,299 ---- EventLoop.get().registerTimerCB(barrier, new CB0() { protected void cb(CBResult result) { ! String errorString; ! if (errorBuffer.length() == 0) { ! errorString = new String ("Success"); ! } else { ! errorString = new String (errorBuffer); ! } cbCoords.call(CBResult.OK(),addr2coord, errorString); } |