Commit Graph

64 Commits

Author SHA1 Message Date
a8ad8644c8 0.3.1.5 (backwards compatible)
lots of bugfixes.  still no rate limiting, but, uh, lots of bugfixes
(release will be packaged and deployed later today)
2004-06-25 19:25:33 +00:00
d5987c51c9 yet another deployment option - the user can define a jbigi.ref environmental variable to specify a file from which the name of the resource to be loaded should be found (default is "jbigi.cfg")
if that file exists, the NativeBigInteger will act as if jbigi.impl was set to the contents of that file.
For instance, a jbigi.cfg containing "win-p4" would have the NativeBigInteger search the classpath for the "win-p4" file and use it as a native library.
The jbigi.ref preempts the jbigi.impl property (only if the file exists and is not empty), but the external platform specific jbigi
preempts this (e.g. jbigi.dll or libjbigi.so), as does the jbigi.enable flag.
This option lets us have the admin console write to a file to choose which jbigi to use, rather than have to parse some shell script, etc
2004-06-25 18:32:17 +00:00
dd781e256c new constructor 2004-06-22 04:53:22 +00:00
5c3e815757 dummy DSA (for sim - dont run on live net) 2004-06-22 04:23:19 +00:00
55e780d885 logging and doc of a todo (wrt bestEffort) 2004-06-22 04:16:17 +00:00
5166eab5ee replaced double check locking (http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html) with the actual logic
- prepare the cache prior to use if you want to have the hash cache.
also fix the ejection policy to not clear the cache, but merely to remove sufficient values.
though maybe clearing the cache is the right thing to do so as to avoid ejection churn... hmm.
both of these fixes brought to you by the keen eyes of the one called mihi
2004-06-20 04:27:58 +00:00
232f6f158d removed (likely already ignored by the compiler) op. force of habit from dealing with stream.read() i suppose.
thanks mihi
2004-06-20 03:48:16 +00:00
cc904ba9dc use new SessionConfig constructor 2004-06-19 23:46:08 +00:00
1679ba6719 so this String.getBytes(), its inefficient? you don't say...
(yeah, i know, this optimization takes advantage of the fact that the data in question uses single byte charsets)
2004-06-19 23:41:55 +00:00
07fadd4a6c avoid string.getBytes like the plague 2004-06-19 23:40:03 +00:00
57e1ff39e0 new method: cachedXor which, suprisingly, determines the xor of a hash against another hash, caching up to a certain number of values
currently uses an essentially random ejection policy, but this saves a lot of temporarly memory churn, since we xor many hashes against a router/destination's key
2004-06-19 23:35:43 +00:00
51e259c198 avoiding the String.getBytes() since its a bitch on gc (measured for this situation) 2004-06-19 23:32:41 +00:00
de334b003d for safety, always create a session config with a destination 2004-06-19 23:30:57 +00:00
a61ff12390 more microoptimizations, whee! 2004-06-19 23:28:12 +00:00
f4697be159 just a simple catch all for OOM while handling an OOM (naw, we dont recurse too much (just a little)) 2004-06-19 23:25:47 +00:00
3835fe3960 give the shutdown hook thread a name 2004-06-19 23:13:09 +00:00
76c374ef06 more accurate memory usage to reduce gc churn 2004-06-19 23:11:42 +00:00
57d24bd948 read the logger.config when its been updated, even if we dont have any log messages to write out (duh)
also, a micro-optimization for charset handling identified through profiling
2004-06-19 23:02:59 +00:00
da8341d014 reduced buffer size and updated domain name reference (dev.i2p.net, not i2p.dyndns.net) 2004-06-13 19:31:22 +00:00
95c33e88ed handle decompress error by propogating the IOE (thanks nickster for bug report) 2004-06-13 19:30:31 +00:00
fed8369a5f big rewrite of how we load the native implementation:
- the old method is default: it looks for jbigi.dll / libjbigi.so in the current dir (and library path)
- otherwise, you can specify -Djbigi.impl=blah and if there is a file called "blah" in the classpath (including any jar file), it will load that file as a native implementation
there are lots more javadocs now as well, and the dependency upon Log was removed (so anyone else who wants to use this just needs NativeBigInteger.java and the jbigi implementation)
2004-06-12 20:08:32 +00:00
1ebb0ac5fb 0.3.1.4 (backwards compatible)
i'll package & push later this evening
2004-05-23 16:54:29 +00:00
8888a960c0 logging 2004-05-23 16:51:30 +00:00
d70c5df5a0 0.3.1.3 (not backwards compatible, yadda yadda yadda) 2004-05-20 11:32:32 +00:00
242b9a6af9 fix the reread short circuiting algorithm 2004-05-20 10:44:31 +00:00
7293a8d3c0 more logging than your mom 2004-05-19 15:24:25 +00:00
9f17654052 tuned to avoid expensive biginteger operation (well, not "expensive", but a lot more expensive than a few shifts)
when we need to debug, essentially assert the validity of the new tuned op, losing the performance benefit by duplicating the effort (to verify)
2004-05-18 18:33:37 +00:00
292363eb65 imports (sorry, includes alphabetizing, wee)
(shendaras)
2004-05-17 03:38:53 +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
ea9b9fbf17 0.3.1.1 (tastes like chicken)
backwards compatible but some config changes necessary
2004-05-07 17:52:49 +00:00
e216e18368 update the clock more liberally (since we've got the new ntp code) 2004-05-07 04:34:03 +00:00
e57c5b4bc2 log to CRIT for jbigi load failure 2004-05-07 04:23:30 +00:00
2df0007a10 logging 2004-05-07 03:29:06 +00:00
25314fd91a make sure we mark the send as *failed* if we need to reconnect 2004-05-06 04:18:28 +00:00
b04512a4f6 add unique IDs to the threads for easier tracing 2004-05-04 04:46:04 +00:00
1b4af66986 flag as closed /after/ we send the disconnect message *cough* 2004-05-03 11:13:44 +00:00
74209e2607 0.3.1 (backwards compatible, still testnet, release later this evening) 2004-04-30 23:04:13 +00:00
a460a0dc44 logging, and be more forgiving if the guaranteed/failed comes back before the ack does 2004-04-30 07:00:13 +00:00
70faecb8b5 handle the UnsignedInteger's new "IllegalArgumentException on negative" policy 2004-04-27 08:33:15 +00:00
237f278479 we only need to reread it if its been updated, dimwit. 2004-04-27 08:31:56 +00:00
e766a00a12 dont be such a reuse zealot and just fscking optimize the use case
(aka shift instead of creating heavyweight BigInteger objects)
plus some good ol' caching and gc churn reduction
2004-04-27 08:30:55 +00:00
ea03637ec1 cache the hashCode and getBytes data, significantly reducing the contention on these objects 2004-04-27 08:28:16 +00:00
d0f6d47b14 logging (reduced temporary object creation by _log.shouldLog) 2004-04-27 08:26:23 +00:00
5bf1658d9a dont go into an infinite loop if we shut down before the log manager was fully created
(since the appContext creates a log manager if one doesn't exist, and that create will fail
if we're shutting down, and it'll create a log manager to log the fact that its failing, etc)
2004-04-26 03:32:59 +00:00
1ad6dde146 allow a whole set of OOM listeners on threads, not just one
cache the hash's base64 value too
use the context's logging more
logging updates
2004-04-26 00:57:10 +00:00
d659447879 allow overriding the env props 2004-04-24 22:29:01 +00:00
a52cea29f4 Class.getConstructor pulls the public ones... 2004-04-24 12:49:13 +00:00
3d91e59386 la la la 2004-04-24 12:38:21 +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