Friday, April 30, 2010

Forcing Firefox to Cache Secure Silverlight Video Content

The latest GridRoom release moves all video playback to the Web using a Silverlight-based video player. During my testing I had some problems getting Firefox caching to work properly with video content delivered via https.

At first I tried to deliver all video content over http, not https. But since the secure areas of the GridRoom site are accessed via https I was forced by Silverlight security restrictions to also deliver video content via https for now. (The Silverlight MediaElement does not support cross-scheme access--or mixed http/https content delivery).

During my initial testing with https Firefox seemed to cache video intermittently. Sometimes video was loaded from the cache and sometimes it was streamed again from the Web site, even during the space of a few minutes. Firefox provides an easy way to inspect cache contents using the "about:cache" URL, and after some poking around I noticed that https-delivered video was only held in the memory cache, while http-delivered video was stored in the disk cache. Caching appeared intermittent because my large video files were randomly evicting each other from the relatively small memory cache as I clicked around.

By default Firefox 3 does not use the disk cache for content delivered over https. Users may force this content to be disk-cached by setting the hidden browser.cache.disk_cache_ssl option to true, but this isn't something developers can depend on. The solution is to set a "Cache-Control: public" header for whatever content you want to be disk-cached. This makes Firefox behave like Internet Explorer, which disk-caches https-delivered content by default.

Be careful when using this workaround. The "Cache-Control: public" header tells any caching proxy servers between your server and the client that it's OK to cache your data for use by anyone!

All About Model Releases

imageSince I'm working on a product for managing sports video I occasionally need to use sports media for marketing, demos, tutorials, and other purposes. We have lots of photos and videos of our own kids--especially since my wife is quite the avid amateur photographer. But these sometimes include other folk's children as well as ours.

Not wanting to follow in the footsteps of Virgin Mobile, whose marketers were once sued after grabbing 15-year old Allison Chang's picture from Flickr for use in an Australian billboard campaign, it seemed a good idea to understand the legal requirements for obtaining parental permission before digging into our personal stock.

The best layman's resource I've found on the topic is this 15,000 word treatise compiled by photographer Dan Heller. If that seems like more than you ever wanted to know about model releases, you may prefer the shorter primer. Especially interesting are his reasons why you shouldn't consult a lawyer for advice.

How can it possibly take 15,000 words to explain the ins and outs of model releases? Well, it covers arcane distinctions such as whether I'm also violating Chang's rights by including a picture of the Virgin billboard on this blog. (No, because I'm using the picture for editorial commentary, rather than commercial purposes. And it doesn't matter that this blog includes advertisements or is associated with a software company.)

It turns out that model releases are required (for commercial uses only) when both of the following conditions apply:

  • Subjects in the photo or video are individually recognizable
  • These recognizable subjects appear to be endorsing a specific product, company or belief

Virgin's use of Chang's photo seems problematic because she is recognizable, appears to be endorsing a product, and possibly because her picture was used in a derogatory way. However, the Chang family's lawsuit was dismissed because the US court lacked jurisdiction over the Australian-based Virgin subsidiary.

For my purposes, I've concluded that using our personal stock of sports photos and videos is fine in most cases where the focus of attention is our own children and other kids are in the background and/or unrecognizable.

Friday, April 23, 2010

When Competitors Are Using Your Code...Does That Mean You're Being Too Transparent?

Openness and transparency are all the rage in startups these days. Don't hide the fact you're small. Be accessible to customers. Blog about your ideas and plans. Openly dissect your successes and failures. Share your work.

About 2 years ago I posted a video scene detection algorithm written in C# on this blog, while I was still just tinkering with the ideas behind GridRoom (and before I had decided to make a business of it).

Last night I was contacted by a developer who works for Agile Sports, makers of a high-end competitor to GridRoom. Their product is used by a number of NFL and Division I college football teams. The bottom end of their market is probably the largest high schools, while that's the top end of my intended market for GridRoom.

Apparently they've been using my scene-detection code with great success, but he had a couple of questions about how it worked. I'm pretty sure he didn't realized he was asking a competitor for help.

Thursday, April 08, 2010

Simple Savant v0.5 Released

Simple Savant v0.5 is now available at CodePlex. This release includes the following features:

  • Reliable cross-domain write support. Reliable-writes guarantee that you will never suffer partial data loss when writing associated data to multiple domains. System failure during a reliable-write will result in all or none of your data being stored in SimpleDB. This is accomplished using a 2-phased update. In the first phase your data is transactionally stored in a single domain. In the second phase your data is propagated to the final destination domains. If the initial propagation attempt is interrupted your data may remain in an inconsistent state for a short time. Other key points:
    • Cross-domain puts, batch-puts, and deletes are supported
    • Maximum of 25 sub-operations may be included in a single reliable-write operation
    • Conditional puts and deletes are not supported
    • Reliable-write adds about 150% overhead to each sub-operation. However, parallel propagation of sub-operations allows the overall write to complete with very little additional latency.
    • Propagation of sub-operations can fail permanently if SimpleDB limits are exceeded. This condition will be very obvious and requires manual intervention to correct.
  • Support for custom constraint/validation logic that's invoked automatically whenever you get, select, put, or delete an item.
  • Expanded and improved support for asynchronous operations
  • Logging supported by the .NET Commons Logging API

The Codeplex documentation wiki will be updated shortly with more details. You may also want to check the release notes for a complete list of bug fixes and minor enhancements.

 
Header photo courtesy of: http://www.flickr.com/photos/tmartin/ / CC BY-NC 2.0