20 Jun
Posted by Mike Heath as Uncategorized
Why is DataInputStream.read(byte[] b, int off, int len) declared final? Stupid. Stupid. Stupid.
I am a big GWT fan and am excited about Google App Engine which is why some of my friends and I are starting the Utah Google Technology User Group. We’re just getting started and don’t yet have a place to meet but we’re working to get the word out.
If you’re interested in participating, please let us know.
One of my big complaints with Apache MINA is the high latency that’s incurred when sending data. MINA uses a set of I/O threads to handle reads and writes. This is typical of many non-blocking I/O frameworks.
Netty is much more clever than MINA. In Netty, when you make a call to send data and the send queue is empty, Netty will just send the data. We are using non-blocking I/O so the call will still be asynchronous. If the send queue is not empty, Netty will queue up the data to be sent in much the same way that MINA does sends. The Netty approach is much faster.
Using ADBCJ I conducted a simple performance test comparing MINA and Netty. The test runs 100 simple select SQL queries against MySQL that each return a single string. Each test was run 100,000 times.
| Mean | Stdev | |
|---|---|---|
| MINA | 618,912,430.60ns | 104,509,066.50ns |
| Netty | 563,756,985.70ns | 104,440,106.73ns |
As you can see, Netty is significantly faster. In all the tests I’ve run so far, Netty has been faster.
To say I’m please with Netty would be an understatement.
I recently saw this fascinating Google Tech Talk from Van Jacobsen. It’s a few years old but it’s one of those things I wish I would have scene years ago when I started grad school doing research in networking and the Internet.
This talk really puts into perspective the importance of things like distributed hash tables and other peer-to-peer technologies and shows that there’s more use for these technologies than just pirating software.
I was just looking for some Spring documentation when I cam across this posting, http://springframework.org/node/654 that was linked from the Spring home page. In the picture on the left, there’s a shiny head that I happened to recognize as my coworker, Jason Allen. I looked a little closer and found myself in the picture. I’m the guy wearing the black baseball cap on the right of the picture. You can also see the face of a good friend of mine, Mike Youngstrom, towards the back of the crowd.
I’ve been playing with SSL client authentication in Apache httpd today at work. It’s something I’ve always wanted to play with but haven’t had a good reason to invest the time until now.In the process of testing my configuration, I came across openssl s_client. It’s one of those things I should have already known about but didn’t. I wish I would have stumbled across it years ago. Basically it works similar to nc (netcat) except you can use it with SSL/TLS. So if you want to do HTTPS by hand to connect to Google you can do:
openssl s_client -connect google.com:443
Google’s server will send back some information about your secure connection at which point you can type:
GET / HTTP/1.1Host: www.google.com
(don’t forget an extra carriage return after the last line) and happily watch Google redirect you to a normal HTTP URL.openssl s_client will also let you do STARTTLS with SMTP. I wish I would have known about that when I was building my SMTP server on MINA. I implemented STARTTLS for it and and was an absolute pain to test and debug. Using openssl would have made my life much easier.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | ||||||