Posts

Showing posts with the label web

Redirecting to the closest site using Javascript

I'm sure this problem has been solved this way many times before, but I haven't seen it while idly browsing around sites about scalability and load balancing. So here it is, a Javascript solution to the closest-site problem . For static content optimizing for latency is easy and cheap. Just put your files in a CDN such as Amazon CloudFront and you're done. Low (lower) latency all over the world. Done. For dynamic content it's a bit harder. You can set up several data centers (sites) and try to redirect the user to their closest site. But how do you find out what site is the closest one, and how do you redirect the user to the right one? There are several solutions to this, such as using anycast BGP or source-aware DNS. But they have big drawbacks. DNS based solutions depend on the users resolver to be close to the user and that the ip2location database is correct. BGP-based solutions depend on you having access to BGP (and the staf...

Lightwave. Like Google Wave only much less

I felt sorry for all those who don't yet have a Google Wave account, and I was impressed with their demo. And I also wanted an Erlang project. So I killed three birds with one stone. I made Lightwave. It's like Google Wave only: Dumber Buggier Uglier More incomplete Written in Erlang Future plans include API for hooking in bots Only save data for last X time or entries Automatic on-disk persistence Links Lightwave on Github Lightwave "technology preview" :-)