Archive for April, 2007

Happy Birthday, Django!

Thursday, April 12th, 2007
root@airvent:/usr/local/web/django-svn $ svn up
U    docs/install.txt
U    docs/templates.txt
Updated to revision 5000.

Yippie!

Thursday, April 12th, 2007

“I’m happy to inform that the ZFS file system is now part of the FreeBSD
operating system. ZFS is available in the HEAD branch and will be
available in FreeBSD 7.0-RELEASE as an experimental feature.” (Pawel Dawidek)

Sending Stomp messages, the brute force way

Monday, April 9th, 2007

I had to send out Stomp Messages to ActiveMQ at 100 Messages per second. In Python.
Leaving out all the framework stuff, this ugly code takes less than 0.001s per message.
Ugly, but works.

import socket

HOST = 'localhost'
PORT = 61613

# Minimal Stomp sending without any error checking
def send_message_brute_force(msg, dest):
    """Send msg to dest."""
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect((HOST, PORT))
    sock.send('CONNECT\n\n\x00\n')
    if 'x00' in msg:
        sock.send('SEND\ndestination: %s\ncontent-length:%d\n\n%s\x00\n' % (dest, len(msg), msg))
    else:
        sock.send('SEND\ndestination: %s\n\n%s\x00\n' % (dest, msg))
    sock.send('DISCONNECT\n\x00\n')

send_message_brute_force('TESTING', '/queue/FOO/BAR')

Sunday, April 1st, 2007

Skype is open sourcing stuff

Sunday, April 1st, 2007

I missed that.

https://developer.skype.com/SkypeGarage/DbProjects/

Bewart of the slices!

Sunday, April 1st, 2007

For the last 10 year or so I had a tendency to format disks on FreeBSD in a mode which was called “dangerously dedicated” in FreeBSD 3.x. Basically when putting a second disk in a system I didn’t partition or label it at all but did something like newfs /dev/da1 ; mount /dev/da1 /mnt.

That works well, there is no reasnon not to do it, or is there?

It seems there is. My benchmarks indicate that filesystem operations are up to 8 times faster when happening on a filesystem on an partitioned and labeled disk than when happening on a “raw” filesystem. Strange