Archive for the ‘Technology’ Category
Network Tuning
We’ve been busy at work tuning a high performance network application. We were having trouble tuning the Windows network stack, with a 30% throughput drop compared to Linux. Searching MSDN, we got some clues, but not a solution. Following those clues into “man socket” and its friends on a Linux machine told us what we needed to do!
So we now have similar performance in Linux and Windows, which is good.
Lesson: MSDN is an amazing resource, but it sure could be improved. Bigger Lesson: Thank god for BSD heritage!
Naked POJO's
James Strachan asks if it is time for “Naked POJO’s”:http://radio.weblogs.com/0112098/2004/03/02.html#a461.
When I first came accross “Naked Objects”:http://www.nakedobjects.org/ a couple of years ago, I was excited at what I thought was a cool idea. That thought quickly turned into mild derision when I realised that all objects need to extend from Naked Object… read the gory details in max’s “criticism”:http://weblog.hibernate.org/cgi-bin/blosxom.cgi/2004/02/12#notsonakedobjects if you are interested.
Naked Objects would probably be the best way to prototype an Object Oriented System. You can focus on creating and validating the business objects without worrying about UI. I can also see how such an effort would be useful in ensuring a cleaner/”pure-er” object model.
Another useful case would in to create simple data admin screens for application. One often spends a large amount of effort in creating data admin screens which are quite incidental to the rest of the application.
I’ve never liked O-R tools that insist that all your objects should extend “PersistentObject” or some such thing. To me, its a bad architectural smell. Same here.
From a practical perspective (since this is quite a revolutionary idea for most users)l, I would first like to see how users react to naked Objects using an existing application. Again, I think no-one can, in his right mind, justify the cost-benefit of coercing existing classes into the Naked Objects hierarchy.
So, I imagine its time for a Naked POJO. I am certain its technically feasible as well. If anyone wants to write one, consider me an early beta user 🙂
Brian
Just back from the “BLUG”:http://www.linux-bangalore.org meet where Brian Behlendorf spoke. It was interesting to hear “Apache”:http://www.apache.org history from the “horse’s mouth” … I thought he quite held the audience captive. Personally, it was great to meet up with someone you’ve only known through emails.
Pipelines and OpenAdaptor
The “Pragmatic Duo”:http://www.pragmaticprogrammer.com have published a nice “article on Pipelines”:http://www.pragmaticprogrammer.com/articles/nov_03_pipelines.pdf 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”:http://www.openadaptor.org. 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.
Talk Slides
I have uploaded the slides for my talk on OpenBSD firewalls at Linux Bangalore/2003 “here”:/talks/openbsdfirewall/ .
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.
Rewards and Creativity?
Came across “this article”:http://www.gnu.org/philosophy/motivation.html by “Alfie Kohn”:http://www.alfiekohn.org/books/pbr.htm which suggests that rewards lower performance levels for creative tasks. If you believe software development is primarily a creative task (an many probably don’t), it suggests a very pessimistic outlook for commercial software development (which is why FSF has reproduced the article on its website, I suppose :).
Site Changes
I have changed the stylesheets on the site to enable visitors using IE to read these pages. So now the pages dont re-flow too well, nor is whitespace managed properly in large monitors. However, the pages display usably on IE5.0 and above. The previous design had a reflowing content pane and a fixed with right menu. However, it was unusable in IE. Oh, for a “standards compliant”:http://www.mozilla.org browser!
I have also uploaded the presentations from some of my talks “here”:/talks. More to follow.
Comment Spam
No one seems to read this stuff 🙂 , but I still recieve comment spam. Strange!
More CleverCactus
After my previous “post”:http://www.sengupta.net/musings/archives/000002.html on the erstwhile Spaces aggregator among others, its creator “Diego Duval”:http://www.dynamicobjects.com/d2r/ left a comment asking why it didnt work for me. I realised that I had been playing around with an old version, with the project even having a new name in the meanwhile.
Since Diego cared enough to leave a comment, I thought the least I could do is give it another shot. So off I went to “CleverCactus”:http://www.clevercactus.com/ and downloaded the latest beta.
I’ve always thought that the product has a very interesting concept, in terms of being an “information aggregator” rather than just an RSS aggregator. The new version looks good, works well. Goes through proxies without a problem. Displays html pretty well. So it didn’t have any of the issues that had put me off earlier.
But after using it for a while, I found something interesting. Earlier, I thought I wanted a three pane view, which is one reason I liked the NetNewsWire screenshots. However, I now find that I actually prefer the two pane view much more, because it allows me to scan very quickly which article I want to read. Scrolling through individual items in a three pane view is much more time consuming when I want to read the details of only a few of the articles in a feed. Time.. the killer app!
So I’ll keep checking out on the status of CleverCactus since I find its concept pretty cool, but for now, I’ll do with NewsMonster. Maybe someday, when i am willing to trade in my mail and NNTP clients for CleverCactus, I might go back to using it.