Commit Graph

1110 Commits

Author SHA1 Message Date
0e5d164a8a support shutting down the router from the web console:
specify a "router.shutdownPassword" value in the router.config (or in the environment [ala -D]),
  then specify that password on the shutdown form in the web console and hit submit.  after 30 seconds, it'll kill the router (and unless you're running the sim, it'll kill the JVM too, including clientApp.* started tunnels / etc)
if we had some sort of ACL for accessing the web console, we could avoid the password field altogether, but we dont, so we cant.
2004-05-19 22:00:32 +00:00
7243963106 removed the insane explicit GC 2004-05-18 18:39:43 +00:00
292363eb65 imports (sorry, includes alphabetizing, wee)
(shendaras)
2004-05-17 03:38:53 +00:00
07e79ce61a * do a db store after a successful db search (healing the netDb)
* timeout each peer in a db search after 10 seconds, not 30
* logging
2004-05-17 00:59:29 +00:00
ff0023a889 big ol' memory, cpu usage, and shutdown handling update. main changes include:
* rather than have all jobs created hooked into the clock for offset updates, have the jobQueue stay hooked up and update any active jobs accordingly (killing a memory leak of a JobTiming objects - one per job)
* dont go totally insane during shutdown and log like mad (though the clientApp things still log like mad, since they don't know the router is going down)
* adjust memory buffer sizes based on real world values so we don't have to expand/contract a lot
* dont display things that are completely useless (who cares what the first 32 bytes of a public key are?)
* reduce temporary object creation
* use more efficient collections at times
* on shutdown, log some state information (ready/timed jobs, pending messages, etc)
* explicit GC every 10 jobs.  yeah, not efficient, but just for now we'll keep 'er in there
* only reread the router config file if it changes (duh)
2004-05-16 04:54:50 +00:00
61c97ab940 0.3.1.2 (backwards compatible, etc) 2004-05-13 23:49:08 +00:00
4c7af01edc allow dynamic update to the reliability threshold factor (e.g. rather than the top 2/3rds being considered "reliable", allow that to be the top 1/3, or 1/2, etc)
the router.config var "profileOrganizer.reliabilityThresholdFactor=0.75" (or environment property -DprofileOrganizer.reliabilityThresholdFactor=0.5) etc
2004-05-13 23:24:09 +00:00
0d431213cd include the previous period in the measurements (since they're discrete, not rolling)
also include the other elements as necessary by default
2004-05-13 07:14:54 +00:00
ad9dd9a2e2 Lots of updates. I'm not calling this 0.3.1.2, still need to
"burn it it" some more, but its looking good.
* test all tunnels we manage every period or two. later we'll want to include some randomization to help fight traffic analysis, but that falls into the i2p 3.0 tunnel chaff / mixing / etc)
* test inbound tunnels correctly (use an outbound tunnel, not direct)
* only give the tunnels 30 seconds to succeed
* mark the tunnel as tested for both the inbound and outbound side and adjust the profiles for all participants accordingly
* keep track of the 'last test time' on a tunnel
* new tunnel test response time profile stat, as well as overall router stat (published in the netDb as "tunnel.testSuccessTime")
* rewrite of the speed calculator - the value it generates now is essentially "how many round trip messages can this router pass in a minute".
  it also allows a few runtime configurable options:
  = speedCalculator.eventThreshold:
    we use the smallest measurement period that has at least this many events in it (10m, 60m, 24h, lifetime)
  = speedCalculator.useInstantaneousRates:
    when we use the estimated round trip time, do we use instantaneous or period averages?
  = speedCalculator.useTunnelTestOnly:
    do we only use the tunnel test time (no db response or tunnel create time, or even estimated round trip times)?
* fix the reliability calculator to use the 10 minute tunnel create successes, not the (almost always 0) 1 minute rate.
* persist the tunnel create response time and send success time correctly (duh)
* add a new main() to PeerProfile - PeerProfile [filename]* will calculate the values of the peer profiles specified.  useful for tweaking the calculator, and/or the configurable options.  ala:
     java -DspeedCalculator.useInstantaneousRates peerProfiles/profile-*.dat
2004-05-13 04:32:26 +00:00
57d7979d51 removed obsolete code
minor reorganization to help track down whats intermittently b0rking my kaffe instance
logging
2004-05-12 07:55:25 +00:00
af2f5cd2e1 kaffe shits a brick if you want the socket's address after .close() (grumble) 2004-05-11 01:55:22 +00:00
ea9b9fbf17 0.3.1.1 (tastes like chicken)
backwards compatible but some config changes necessary
2004-05-07 17:52:49 +00:00
303e257841 synchronization reduction and keep track of the 'last' job for each runner (to help debug something i see once a week on kaffe) 2004-05-07 17:51:28 +00:00
cd37c301d9 if (log.shouldLog())
yeah, aspect oriented programming sure would be nice.
2004-05-07 04:07:14 +00:00
f5fa26639e minor html cleanup 2004-05-07 03:45:48 +00:00
13952ebd8b include the expiration and messageId in the toString (shown on msg drop due to "unknown tunnel") 2004-05-07 03:31:33 +00:00
2df0007a10 logging 2004-05-07 03:29:06 +00:00
89bc5db3e1 increase the bundle probability to yet another arbitrary value
add the jobId to log messages to simplify tracing individual parallel sends
logging cleanup
2004-05-07 03:28:22 +00:00
9a06a5758d check shouldBundle only when its ready to be checked (duh) 2004-05-06 01:02:50 +00:00
e5a2a9644f *cough* [d'oh] 2004-05-05 23:01:36 +00:00
cdaeb4d176 track and publish two new stats:
* netDb.failedPeers (how many peers didn't reply to a lookup in time)
* netDb.searchCount (how many searches we send out in a 3 hour period)
probabalistically include the leaseSet of the sender in the garlic sent
to a peer if the client requests it to be included (aka if they want
replies).  By default, this is enabled (disable by setting the I2CP
prop "shouldBundleReplyInfo=false").  Also, by default the probability is
30% (w00 h00, arbitrary values!), which can be overridden via the I2CP
prop "bundleReplyInfoProbability=80" (or =10, or =100, etc).  The tradeoff
here is quicker replies in exchange for bandwidth (the dbStore).
Yeah, it'd be nice if there were something keeping track of which leaseSet
each client sent to each peer so that it could explicitly include it only
if it were necessary, but for now that's probably overkill.
2004-05-05 22:46:10 +00:00
d9f0cc27ef formatting 2004-05-05 03:37:26 +00:00
cd82089d4d upgrade deprecated argument
fix ze german
(duck)
2004-05-04 17:17:10 +00:00
bc3b7ffd86 start the admin listener ASAP (right after reading the config)
fire the LoadClientAppsJob right after the admin listener is booted, which now includes support for the onBoot property (which causes the client to run immediately, instead of waiting 2+ minutes)
(yeah, it'd suck if all routers started up, tried to connect to people, got shitlisted, then 2 minutes later got the right NTP time, 'eh?)
2004-05-02 05:02:10 +00:00
e22cb62493 handle /setTime?blah&now=yyyyMMdd_HH:mm:ss.SSSS (updating the router's clock)
yes, we'll want to filter the access to the admin manager ;)
2004-05-02 04:46:52 +00:00
74209e2607 0.3.1 (backwards compatible, still testnet, release later this evening) 2004-04-30 23:04:13 +00:00
e5ab5d6a5a new stat: client.sendAckTime containing the average time to get an ack for a client message send
this stat is published in the netDb, but the quantity fields (how many acks the stat is averaged over) is h4x0red
(it always reads "666", since otherwise it'd be fairly easy to identify what routers run servers, and i can live without knowing the quantity)
2004-04-30 07:56:05 +00:00
9cb11d4d5f allow some overrides that the ExploreJob needs
logging
2004-04-30 07:14:26 +00:00
7202ea3340 dont dieFatal() if the first leaseSet lookup fails (this was the cause of those "fast fail" errors [bugId=69])
try up to 6 times to search (or until the expiration, etc)
logging
2004-04-30 07:11:41 +00:00
d234ea01d0 logging 2004-04-30 07:09:05 +00:00
e246cd37dd simple exponential decay on the exploration
(min/max frequency=1m/30m, doubling every time we don't find something new)
reduce the bredth and duration of explorations
republish less often (every 60s send out one random one [or however many explicit ones])
logging
2004-04-30 07:08:25 +00:00
0a4ddedac9 be more forgiving of slow connections (and fix my math in the comments) 2004-04-30 07:03:13 +00:00
0e4b80b002 make sure we only try to request from people we know about (*cough*) 2004-04-30 07:02:16 +00:00
4b0d1aac15 only read from or write to disk if necessary 2004-04-27 08:47:48 +00:00
fb7c06aa01 throw in a 10 second pause between starting up each router to try and avoid too much synchronicity 2004-04-27 08:47:00 +00:00
5c41be3470 only read from or write to disk if there is new data to transfer
(and set the file modification date to the 'published on' date in the netDb object)
2004-04-27 08:44:23 +00:00
a78df1a152 logging (reduce gc churn) 2004-04-27 08:42:40 +00:00
34e8db0fe3 logging & formatting to reduce gc churn 2004-04-27 08:41:38 +00:00
4ce9fb5b5a new MultiRouter (allows you to fire up mutliple routers in the same JVM)
new VMCommSystem (useful for running large multirouter instances)
new MultiRouterBuilder (helper app for setting up a MultiRouter simulator)
updates to the router to handle multiple routers in the same VM, as well as
deal with the multiple OOM listener stuff
see the javadocs for info on the MultiRouter and MutliRouterBuilder
(yeah, its not ready for prime time, and its really just for the simulator,
so I'm not sure if anyone else is going to use it anyway ;)
2004-04-26 03:30:20 +00:00
f80f02da73 use the context to find a location for the sessionKeys.dat file (router.sessionKeys.location=filename in router.config) 2004-04-26 01:09:10 +00:00
52ece833a7 logging 2004-04-26 01:00:22 +00:00
64bcfd23bd expose the way to specify context env properties
remove unused lazy load code (we actively load components in the RouterContext)
2004-04-24 22:32:10 +00:00
393b1d7674 big ol' update to strip out the singletons, replacing them with
a rooted app context.  The core itself has its own I2PAppContext
(see its javadoc for, uh, docs), and the router extends that to
expose the router's singletons.  The main point of this is to
make it so that we can run multiple routers in the same JVM, even
to allow different apps in the same JVM to switch singleton
implementations (e.g. run some routers with one set of profile
calculators, and other routers with a different one).
There is still some work to be done regarding the actual boot up
of multiple routers in a JVM, as well as their configuration,
though the plan is to have the RouterContext override the
I2PAppContext's getProperty/getPropertyNames methods to read from
a config file (seperate ones per context) instead of using the
System.getProperty that the base I2PAppContext uses.
Once the multi-router is working, i'll shim in a VMCommSystem
that doesn't depend upon sockets or threads to read/write (and
that uses configurable message send delays / disconnects / etc,
perhaps using data from the routerContext.getProperty to drive it).
I could hold off until the sim is all working, but there's a
truckload of changes in here and I hate dealing with conflicts ;)
Everything works - I've been running 'er for a while and kicked
the tires a bit, but if you see something amiss, please let me
know.
2004-04-24 11:54:35 +00:00
4d3e4c1a15 d'oh 2004-04-22 03:11:12 +00:00
afeecdf4af logging, formatting 2004-04-22 03:09:03 +00:00
64b94ab124 0.3.0.4 (backwards compatible, release info / docs / etc coming later today [is today tuesday already?] 2004-04-20 09:18:53 +00:00
bed7d09764 delete that stupid 'interactive' mode where we dump things to stdout on command
(hello, we have an admin console now, duh)
formatting touchups.
2004-04-20 07:06:39 +00:00
3c762c9a02 short circuit some handling when building custom length tunnels
if a client only wants 0 hop tunnels, give them 0 hop tunnels (rather than wasting a 2+ hop on it)
make inNetPool.dropped and inNetPool.duplicate rate stats, not frequency stats
formatting, minor refactoring
2004-04-20 02:42:56 +00:00
ba5f0fb70b correctly differentiate between handled & matched requests
logging and some minor refactoring
2004-04-20 02:18:20 +00:00
c23d8efe08 publish the new data points (crypto.garlic.decryptFail, tunnel.unknownTunnelTimeLeft) 2004-04-18 03:40:42 +00:00