December 18, 2003

Pipelines and OpenAdaptor

The Pragmatic Duo have published a nice article on Pipelines in a recent issue of IEEE Software. It talks about moving the idea of pipes from the realm of unix shell programming into general software architecture. Couldnt agree more.

The implementation section however suffers from a little bit of “handwaving”. I would suggest that rather than writing a thread/processor/queue implementation (which is a dog to get right unless you are Doug Lea :), or using a messaging middleware (which is usually an overkill if you dont need distributed messaging), try out OpenAdaptor. There is nothing that’s easier for getting a random set of data sources, sinks and filters tied together without much coding. I think its the best way to do pipelining, at least in Java … it’s saved me months of work at various occasions.

Posted by aviks at 11:05 PM | Comments (0)

December 09, 2003

Talk Slides

I have uploaded the slides for my talk on OpenBSD firewalls at Linux Bangalore/2003 here .

Posted by aviks at 10:10 PM | Comments (0)

December 05, 2003

SIGQUIT is your friend

So you are debugging this massive multi threaded server application in java that shows strange behaviour only under heavy load. Attaching a debugger isn’t much help, since it slows things down so much that problems go away. Also, sending a million requests to a server with a debugger connected is not good for the sanity of the debugger or its stats collection process.

The easiest thing to do in these situations is to send a SIGQUIT signal to the java process (in Windows, press Ctrl-Break in the console). This will dump the current stack trace for all threads in the system. You’re sure to find some interesting things in there : too many threads waiting for locks, code paths you never dreamt of, threads waiting for system calls to return … and so on.

Try it … its very instructive, and an exceptional, though under-rated, debugging tool.

Posted by aviks at 12:40 AM | Comments (2)