The MOB tester is quite bitrotted, and not documented at all, so it'll take a fair bit of effort to package up. There are a number of http testers around anyway. As for the KWS, all the essential bits are already in kilim.http. If all you're using Tomcat for is request and response handling (and not say, https or cookies), then kilim http is more than sufficient and really really fast. The HTTP parser is Ragel-based, and is lazy (in that it goes through all the unimportant headers without creating a map), and the kilim/ NIO combination is something I'm rather kicked about. The SimpleHttpServer example in the examples directory shows off all the bits.
In essence:
1. Define a task, MyServlet, say inheriting from HttpSession.
2. Create/register with new HTTPServer:
new HttpServer(listenPort, MyServlet.class);
3. A task instance of MyServlet class is created for every new incoming client connection,
and can hang around as long as it wants.
4. MyServlet.execute() looks like this:
public void execute() throws Pausable {
HttpRequest req = new HttpRequest();
super.readRequest(req); // fill up the request
HttpResponse resp = new HttpResponse();
}
You can have a long-lasting connection by wrapping the whole thing in an infinite loop.
That said, there's no reason to fear threads. Take a look at
Paul Tyma's presentation. He argues that threads are simpler and faster than the standard way of doing NIO. Very true.
But the Kilim way of doing NIO is much much faster than his approach, for reasons described in my thesis.