High Performance Comet on a Shoestring

I’ve had my eye on the advances that are being made in the Comet arena for a while now, but it was only this past weekend that I finally sat down and used it for a project. In doing so, there was a particular configuration problem I needed to address, and that was…uh, addressing.

Introducing Comet to an existing architecture assumes there is already a web server in the neighborhood, and that it is, in one way or another, receiving traffic from port 80. Due to the fact that many site visitors will likely be positioned behind a firewall unwilling to accept connections on ports other than 80 or 443, we also need to get our Comet server running on port 80 as well. This normally wouldn’t be much of a problem at all, unless you don’t want to fork over the money for an extra IP address. I don’t & I didn’t. So let me show you how I did so.

Read more

.htaccess File Causes 500 Internal Server Error on Network Solutions

How’s that for a search engine friendly title, eh?

This is just a quick note for anyone who has to deal with Network Solutions hosting (for clients or otherwise). Apperantly Network Solutions doesn’t run PHP with Apache’s mod_php, but rather as a CGI application. That means if you try to put PHP configuration directives in a .htaccess file it will cause a 500 Internal Server Error. My helpful reference: Because Network Solutions Sucks.

You have been warned.

Auto-Linking URLs with PHP

A week or so ago I was working on a bug in the auto-linking code for Laconica, the software that powers Indenti.ca. Squashing that particular bug wasn’t too hard, but I wanted to take the functionality a step further (closer to the calibre of Gmail) and it turns out, writing robust auto-linking code is more difficult than it initially seems. So I played with it a little at a time here and there, testing as many edge cases as I could think of. The result is a function that’s more robust than most URL auto-linking code I’ve come across.

I still need to add support of internationalized TLDs and HTML. So, although it only works with plain text for now, I think it’s off to a good start. Check out the demo or download the source.

LongURL Integration For Your Website

I wasn’t sure it could be done, but I’ve done it. I’m happy to say that I’ve made it even easier to use the LongURL web service, specifically on your own site. Today I wrote a jQuery plugin that allows you to add LongURL support to a website in like, I don’t know, 30 seconds?! It really depends on how fast you are, but the point is that it’s really easy.

I noticed that Twitter search lets you expand URLs from some of the most popular shortening services (though, if they used LongURL they could support a whole lot more ;-) ). I liked their UI approach; it’s clear, simple, and effective. So I pretty much mimicked their UI for my plugin.

Read more

CouchDB View Generation

An alternative technology quickly gaining popularity these days is CouchDB, a document-based database system for semi-structured data. I wasn’t sure what that meant at first, so I read as much as I could about it. The result? I couldn’t wait to use it.

I decided CouchDB would be a good fit for my next project (which I should be releasing sometime this week BTW) and rolled up my sleeves. Because of the amount of data I’m working with, I hit a few snags along the way with regard to CouchDB view performance. Some of the things I learned, although they make sense, were not what I was expecting initially (even after reading all the docs). So for the benefit of others, I thought it’d be a good idea to share my current understanding of the way views work in CouchDB, and share some of the tips & tricks Jan, Chris, and others have given me along the way.

Read more

← Previous PageNext Page →