April 3, 2008

Animated GIFs and externally hosted images in Flash

We're about to change the way some of our flash works. One of the problems that come is how we can load an animated GIF into one of our flash applications. Well, it turns out someone built a (not free) component for this:

How to load animated GIFs using Adobe Flex 2.0

Next problem, we need to display images that don't have a friendly crossdomain.xml letting us access them. Someone has solved this too (free):

Ignoring crossdomain.xml policy with AS3

Hurray

April 1, 2008

Berkeley DB Replication & Ruby on Leopard

I've been messing around with Berkeley DB & Ruby this evening as an experiment. I wanted to try out their replication support along with master election. This may wind up being a faster way of doing master election than the PAXOS library I wrote for ruby. Anyways, getting replication enabled in Ruby BDB on Leopard wasn't straightforward. The macports versions of Berkeley DB don't have threads enabled so the replication manager isn't there. So...

First build DB46 with threads

download db-4.6.21 from oracle

tar -zxf db-4.6.21.tar.gz
cd db-4.6.21/build_unix
../dist/configure --with-prefix=/usr/local --enable-cxx --disable-tcl --enable-pthread_api
make
sudo make install

Then build BDB

wget ftp://moulon.inra.fr/pub/ruby/bdb.tar.gz
tar -zxf bdb.tar.gz
cd bdb-0.6.2
ruby extconf.rb --with-db-dir=/usr/local/BerkeleyDB.4.6 --with-db-version=-4.6
make
sudo make install

You should now have a working Ruby/Berkely DB setup with replication working, hurray.