Letsgetdugg

Random tech jargon

Browsing the tag java

I was recently considering trying out the new G1 garbage collector, see if it was any better than current real time CMS garbage collector. A concurrent soft real-time garbage collector that can compact? Awesome! I switched one of my production applications to use the new G1 garbage collector and noticed a spike in CPU and […]

Tagged with , ,

I hate expired sessions, death to all expired sessions. Traditionally a Java servlet container has a fixed session time, a flood of traffic can potentially cause JVM OOM errors if the session time is set too high. I wanted a smart session container that can hold onto sessions for as long as possible and expire […]

Are you running JRuby in production? Do you want distributed file storage for your “enterprise” application? Look no further, MogileFS is here. MogileFS-Client has compatibility issues with JRuby due to it’s use of the low level Socket class. JRuby 1.5-dev does not yet support all the Socket methods, so here is a monkey patch to […]

Tagged with , ,

I finally got around to open sourcing our scala memcached implementation that we use at fabulously40 for session storage. Since wicket sessions can vary greatly in size, using the standard memcached server implementation became impractical due to the slab allocator. The current code on github lacks the ehcache store and an Actor IoHandler adapter. The […]

Tagged with , , ,

I am about to run out the house for the Labor Day weekend, quickie post on my new coding url strategy. MixedParamHybridUrlCodingStrategy lets you keep stateful multi-pagemap URLs clean while using mixed parameters. Example… mount(new MixedParamHybridUrlCodingStrategy(“/questions”,QuestionsPage.class,false,new String[]{“cat”})); This will mount “/questions/stupid-category” and convert it to… new PageParameters(“cat”,”stupid-category”); package com.base.target.coding; import java.util.HashSet; import java.util.Iterator; import java.util.Map; […]

Tagged with ,

This is a late night post, so I am just going to make it short. This patch lets you use QueuedThreadPool with the Grizzly Connector. This is a monkey patch, getMaxThreads() should be moved up into the Thread Interface. — GrizzlyConnection-old.java Sat May 2 01:08:02 2009 +++ GrizzlyConnector.java Sat May 2 00:56:37 2009 @@ -51,6 […]

Tagged with , ,

OpenSolaris uses a single-threaded malloc by default for all applications. The JDK that is compiled for Solaris fails to be linked against mtmalloc or the newer umem malloc implementation that is multithread optimized. In a multithreaded application using a single threaded malloc can degrade performance. As memory is being allocated concurrently in multiple threads, all the […]