Thomas Freudenberg

Confessions of a caffeine addict

Save Bandwidth and Compress Your CommunityServer Feeds

Now that my vacation and the PDC are over, I can continue with all the stuff which I left unfinished on my desk. One of these is a mod for CommunityServer which compresses all the exposed feeds. I've written it some weeks ago already and deployed it on my web server. Since it seems to work properly, I now want to announce it publicly. Though my bandwidth at WebHost4Life isn't limited, for some of you it may save real money.

The HTTP standard defines the compression of any content in  RFC 2616, section 3.5. IIS supports compression, however, admin permissions on the server are required. So if your CS blog is hosted in a shared environment, you do not have access to the server. Therefore, you have to look for another solution.

Due to the nature of blogs, the most accessed part of a blog is its feed, or better, the feeds, as most blogs offer RSS as well as ATOM, and may even explose feeds for categories and comments. Therefore it makes sense to at least compress the feeds.

Some time ago Jeff Julian has written an add-on for dotText which compressed the RSS feed. I used to use this add-on on my blog as well, which reduced the size of my feed by about 80%.

Currently CommunityServer does not compress its feeds, and till now there is no add-on available which would add this functionality. Therefore I took Jeff's solution as a starting point and wrote a module myself. Now I'm happy to announce Thoemmi.CommunityServer.Compression :-)

The installation is pretty easy: Download the ZIP file and extract the DLL's to your bin folder. Then replace the handlers in the httpHandlers section in web.config to point to my classes. Here's a lineup of the corresponding items:

Original blog RSS handler
CommunityServer.Blogs.Components.WeblogRssHandler, CommunityServer.Blogs
Replacement
Thoemmi.CommunityServer.Compression.CompressedWeblogRssHandler, Thoemmi.CommunityServer.Compression
Original blog ATOM handler
CommunityServer.Blogs.Components.WeblogAtomHandler, CommunityServer.Blogs
Replacement
Thoemmi.CommunityServer.Compression.CompressedWeblogAtomHandler, Thoemmi.CommunityServer.Compression
Original blog comment RSS handler
CommunityServer.Blogs.Components.WeblogCommentRssHandler, CommunityServer.Blogs
Replacement
Thoemmi.CommunityServer.Compression.CompressedWeblogCommentRssHandler, Thoemmi.CommunityServer.Compression
Original gallery RSS handler
CommunityServer.Galleries.Components.GalleryRssHandler, CommunityServer.Galleries
Replacement
Thoemmi.CommunityServer.Compression.CompressedGalleryRssHandler, Thoemmi.CommunityServer.Compression
Original forum RSS handler
CommunityServer.Discussions.Components.ForumRssHandler, CommunityServer.Discussions
Replacement
Thoemmi.CommunityServer.Compression.CompressedForumRssHandler, Thoemmi.CommunityServer.Compression

If you have had a default installation before, the httpHandlers section should now contain following lines:

<add verb="GET" path="blogs/rss.aspx"
     type="Thoemmi.CommunityServer.Compression.CompressedWeblogRssHandler, Thoemmi.CommunityServer.Compression" />
 <add verb="GET" path="blogs/atom.aspx"
     type="Thoemmi.CommunityServer.Compression.CompressedWeblogAtomHandler, Thoemmi.CommunityServer.Compression" />
 <add verb="GET" path="blogs/commentrss.aspx"
     type="Thoemmi.CommunityServer.Compression.CompressedWeblogCommentRssHandler, Thoemmi.CommunityServer.Compression" />
 <add verb="GET" path="photos/rss.aspx"
     type="Thoemmi.CommunityServer.Compression.CompressedGalleryRssHandler, Thoemmi.CommunityServer.Compression" />
 <add verb="GET" path="forums/rss.aspx"
     type="Thoemmi.CommunityServer.Compression.CompressedForumRssHandler, Thoemmi.CommunityServer.Compression" />

That's it. By default, the feeds are compressed with deflate with normal compression. If you want to change the compression level or switch to gzip compression, have a look at web.config.merge in the ZIP file. My add-on uses Ben Lowery's HttpCompressionModule, which in turn uses SharpZipLib. Both assemblies are included in the ZIP file as well.


BTW, if you want to check the compression of your feeds, PipeBoost generates Web Compression Reports.

[Update 10/14/2005: Fixed broken link]

Comments

Meandering-Blog said:

Compress your rss feeds.&amp;nbsp;&amp;nbsp; What a great idea!

Save Bandwidth and Compress Your CommunityServer...
# December 11, 2005 8:50 PM

John Hamman said:

If you have setup your blog on cs2 as the Root blog (http://blog.danbartels.com/archive/2005/12/27/1138.aspx I followed these directions)? should you change your paths to "rss.aspx" instead of blogs/rss.aspx?
# January 28, 2006 8:47 AM

Thomas Freudenberg said:

John, AFAIK you don't need to change the path to the feed.
# January 28, 2006 10:57 AM

Elvin Ray said:

Is this the same with CS2? It seems I have different contents in my httphandlers.
# May 18, 2006 1:37 AM

Thomas Freudenberg said:

Hi Elvin. No, it's not compatible. But I'm working on it, though it may take a couple fo weeks to get it online. I'm still working on a new design for my site before I upgrade to CS2.
# May 18, 2006 2:19 AM

Impuxunny said:

Willkommen

Fette Seite - www.musikrunterladen.net

Da findet ihr nen coolen Tip wie man kostenlos an komplette Mp3 Alben rankommt.

Geht einfach auf den Videolink und zieht euch das rein. Habe es mit einigen Leuten probiert und siehe da...Hat alles wunderbar funktioniert.

Gruss

Thomas

www.musikrunterladen.net

# January 31, 2010 1:32 PM

DarryDuereVap said:

Hey I saw this on E! news.... Do you guys think people should keep pets that are so dangerous when they have little kids?  

Another sad dose of real life has hit the family of a reality TV star.

The 4-year-old daughter of Ax Men slinger Jesse Browning has been mauled to death by the family's Rottweiler.

Ashlynn Anderson's body was discovered by her mother outside on the lawn Sunday, according to officials in Astoria, Ore., where the family resides.

"Apparently, the dog just snapped," says Clatsop County Sheriff Tom Bergin. "We have detectives working on investigating [what set the dog off]...We are going to give the family a day or two to grieve before we interview them."

Browning called 911 and the girl was airlifted to a Portland hospital, but pronounced dead on arrival.

There was no immediate comment from the History Channel, which airs the popular lumberjack series.

Bergin says the attack came four months to the day after deputies removed a Rottweiler from the premises after it attacked an adult family member; that animal was euthanized. The Brownings' two other Rottweilers have been quarantined at a shelter and are awaiting their fate.

"It's from my understanding...only one of the dogs was involved in the attack but both dogs were seized by animal control services," said Alan Oja, assistant chief of the Astoria Police Department, which received the initial dispatch.

"It's a terrible tragedy."

# March 2, 2010 3:17 AM

JJAndy said:

Limited time Offer! HotGiftZone is offering a FREE ipad to a limited amount of customers. This is an exclusive offer and will be available for a short time only.

Step 1 - Go toBeer http://fastgoat.com/ipad4free[/b]

Step 2- Enjoy!

BeeriPad Specs[/b]

   * 1GHz Apple A4

   * 9.7? LED backlit, capacitive multi-touch screen (1024-by-768 res)

   * 0.5? thick

   * 16GB, 32GB, 64GB flash memory sizes

   * 10 hours of battery life

   * 802.11n Wifi

   * Bluetooth 2.1

   * Accelerometer & Compass

Beer3G Version[/b]

   * UMTS/HSDPA (850, 1900, 2100 MHz)

   * GSM/EDGE (850, 900,1800, 1900 MHz)

Price ? starts at US$499 (16GB)

Worldwide availability in 60 days for Wifi-only version, 3G version coming later.

BeeriPad Features[/b]

   * Dock

   * iTunes integration (Movies, TV shows, Podcasts, Music etc)

   * Google Maps integration

   * YouTube (including HD)

   * Thick biezel to hold the device

   * iPhone App upscaling using pixel doubling

   * New version of iWork specifically created for the iPad

   * Optional keyboard / charging doc

# March 3, 2010 5:57 AM

JJAndy said:

Limited time Offer! HotGiftZone is offering a FREE ipad to a limited amount of customers. This is an exclusive offer and will be available for a short time only.

Step 1 - Go toBeer http://fastgoat.com/ipad4free[/b]

Step 2- Enjoy!

BeeriPad Specs[/b]

   * 1GHz Apple A4

   * 9.7? LED backlit, capacitive multi-touch screen (1024-by-768 res)

   * 0.5? thick

   * 16GB, 32GB, 64GB flash memory sizes

   * 10 hours of battery life

   * 802.11n Wifi

   * Bluetooth 2.1

   * Accelerometer & Compass

Beer3G Version[/b]

   * UMTS/HSDPA (850, 1900, 2100 MHz)

   * GSM/EDGE (850, 900,1800, 1900 MHz)

Price ? starts at US$499 (16GB)

Worldwide availability in 60 days for Wifi-only version, 3G version coming later.

BeeriPad Features[/b]

   * Dock

   * iTunes integration (Movies, TV shows, Podcasts, Music etc)

   * Google Maps integration

   * YouTube (including HD)

   * Thick biezel to hold the device

   * iPhone App upscaling using pixel doubling

   * New version of iWork specifically created for the iPad

   * Optional keyboard / charging doc

# March 3, 2010 7:03 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)