Getting Git to play nicely with CDNs

GitGit is a really cool version control system. So cool in fact that I decided to use it to distribute the project I’m working on to several hundreds of Planetlab nodes. So I went ahead and created a repository with git init --bare somewhere in under the root of my local Apache2. Using pssh we can clone and pull from the repository simply by specifying the URL to that repo.

Obviously the traffic is still pretty high, after all every request still ends up at my machine, so I have to serve the whole repository once for each machine. Then I stumbled over CoralCDN, a free Content Distribution Network, that runs on Planetlab. So instead of cloning directly from my machine I took the URL of the repo, added .nyud.net to the domain and cloned from that URL instead.

The drop in traffic when cloning was immediate and I was happily working with this setup, for some time. Then I noticed that having the CDN cache the contents has its drawbacks: if I want to push changes quickly one after another, say, because I noticed a typo just after issuing the update, I have to wait for the cache to time out.

To solve this problem we have to set the objects files, which do not change because it is part of gits content addressable design, and set a short caching time for the few files that do change. Placing this .htaccess file in the repository and activating mod_headers and mod_expires should do the trick:

ExpiresActive On
ExpiresDefault A300
Header append Cache-Control "public"
<FilesMatch "(info|branches|refs|HEAD)">
ExpiresDefault A10
Header append Cache-Control "must-revalidate"
</FilesMatch>

This sets everything to be cacheable for 5 minutes (300 seconds), except the references, which tells git where to look for the content.

Did you like this? Share it:

Bitcoin’s getting some traction

It’s an amazing time to be part of the Bitcoin family. With the Wikileaks scandal we had some quite heated discussions on whether to promote ourselfs as an alternative way for them to acquire funds, but in the end we decided not to, preferring not to be associated with a company being investigated by some countries. However the decision seems to have already been taken for us: as this article in PCWorld demonstrates we are not the only ones making that connection.

Furthermore people are investing more and more resources into Bitcoin as the confidence in the future of the currency grows. Currently the Bitcoin economy containing 4’464’000 coins is worth just short of 1 million USD (MtGox). Meanwhile the growing interest increased the difficulty to generate blocks (the means to acquire new coins and confirm transactions) to incredible heights, and newcomers are getting frustrated at how long it takes them to earn their first real coins. Luckily the Bitcoin Faucet and a pooled mining effort should counteract part of this problem, but the trend is quite clear, people that do not invest heavily into GPUs are will have nearly no chance at accumulating large quantities just by mining, but then where does a country just give you freshly printed money?

In the meantime a lot of discussion is going on about improvements to the Protocol, and what should be part of the Bitcoin ecosystem, specifically an alternative DNS system is in discussion, which would piggyback on the currency transactions.

That should be it for now, if you’re interested why not give Bitcoin a try, join us on the Forum or read up on the latest Developer discussions?

Did you like this? Share it:

Reviving Pitchfork

Quite some time ago I posted a tutorial on how to install the Web MPD frontend Pitchfork (Archive.org version since the original page is empty), and shortly afterwards I had to discover that the project apparently died.

But in my opinion it’s incredibly sad if such a large codebase is lost, so I just created a repository on GitHub for future development. Feel free to fork and continue development.

I’d be happy to hand over control of the code back to the original developers, so please contact me.

Did you like this? Share it:

Playing D&D on Microsoft Surface

When Microsoft first unveiled their Surface Project I thought, like so many, “Nice toy but what will it actually be used for?”. Well I just came across a nice Video of a Project by Carnegie Mellon University playing D&D on Surface. I’m a huge fan of RPGs and this ranges among the coolest accessories I’ve ever seen:

While looking around on their site I also found an older Walkthrough Video of the system which explains a bit more on how it works:

I hope the Project stays alive and hopefully RPG producers jump on the train too. Only thing I’d change is the rolling of the dice, I just love having real dice to roll instead of virtual dices.

Oh and do a Das Schwarze Auge and Shadowrun version, please

Thanks CrunchGear for pointing this out.
Did you like this? Share it:

How to fix Google Buzz

fix_google_buzzWhile I’m not quite sure on what to think about Google Buzz, just like I was ambivalent when it came to Twitter, I am quite sure that there is room for improvement. And I’m not the only one, there is an entire site dedicated to Digg style improvement idea collection called How To Fix Google Buzz created by Jyri Engeström, a former Google employee. So if you’re not happy with Buzz, just head over there and propose or vote an idea :D

»crosslinked«

Did you like this? Share it: