When cache is king

Caching is a fine thing. Except when its not.

After updating some audio that is played to people who phone our Twilio app, we ran into an issue with callers still hearing the old prompts. Our app manages jillions of prompts, and for a variety of reasons we chose to make the prompt filenames static, adhering to a naming convention that uniquely identifies each of our customers. In our case, customers sometimes add static links to ‘their’ audio and we don’t want those links to ever change. (Web browsers, for example, grab the updated audio just fine.)

We don’t update prompts that often, but when we do, we need them to go ‘live’ immediately.

The issue is that Twilio (reasonably) caches remote audio urls to avoid having to reload them every single time an audio is played.

Twilio technical support offered a very workable solution… their urls are cached with the query string in the url, so if we add ?version=XXX at the end of our audio urls, each time we bump XXX it forces a reload of the “new” file into Twilio’s cache.

In our case, we added a single system-wide counter that we bump when anything changes. We’ll eventually get around to maintaining a version number for each file.

Using Heroku ENV config vars with Settings.yml

The guys discovered today how to include Heroku config variables in the settings.yml file. It was working for simple constants like 10, but was crashing the app when the constant was something more complex, like a URL.

There are a lot of reasons to deply Heroku apps with certain constants in Heroku’s config variables. Keeping passwords or backoffice urls out of the source code is one reason. Or if you deploy the same source code to multiple Heroku instances, such as a staging server.

Suppose you have a Heroku config variable called MYAPP_FOO.

This works ‘sometimes':

settings.yml:
my_foo_simple: < %= ENV['MYAPP_FOO'] %>

However, if MYAPP_FOO is a url such as http://mydomain/mypath/ it will crash your app.

This works ‘always':
settings.yml:
my_foo_simple: “< %= ENV['MYAPP_FOO'] %>”

My favorite guerilla marketing story (so far)

I get asked if there was a truly pivotal moment that led to my last IPO, a moment where everything hung in the balance, when sheer determination tipped the scale. Here’s the moment that comes to mind…

Once upon a time, around ’95, I got this crazy idea that the still-nascent internet would be the best medium for training since chalk. At the time, CBT (computer based training) was the end-all for corporations, and Asymetrix was the king of CBT tools. We were out to disrupt the whole notion of shipping CDROMs and having people mail (not email, mail) the training results back to someone who then more or less manually compiled the results.

So my small team built the world’s first internet-based training system for authoring and publishing interactive training courses on the internet. But… how to market it?

Back in the day, before google ad words (heck, before google, before webex, before most corporate training departments even used email) a poor startup had a harder time getting any meaningful customer traction on a shoestring. You hopefully got a little press to get them to call you. You visited them. You demoed. Old school. And hitting the road to talk to customers was pretty expensive.

But I’ve always been a “bring the mountain to me” kinda guy, so I started thinking “where is one place I could meet a lot of the people I wanted as customers?” And the annual Asymetrix User Group seemed like the perfect place, seeing as how they were precisely the people who needed our product. So I registered as a vendor, paid the exhibitor fee. Our registration was accepted. So for the next couple of months we got ready… booth, cool demos, sexy new features, the works.

About a week before the conference I got a call from the Asymetric VP of marketing who politely, but firmly, explained that even though they did not have internet tools, we were clearly competitive, and no way would we be permitted to exhibit at their user group, and our refund check was in the mail. Period. Two voicemails appealing to the CEO went unreturned.

My first reaction was, as The Dude says, “This will not stand.”

I’d sunk every marketing nickel into getting ready for the show. The thought of so many of ‘my’ fortune 500 training directors being in the same building at the same time, so close yet deprived of the chance to see my world-changing invention, was unacceptable.

So we immediately
1) Secured a permit from the city to hand out flyers on the sidewalk outside the convention center where the Asymetrix User Group was held
2) Hired a enough actors to cover all the entrances
3) Gave each actor a big stack of flyers that said “Welcome to Seattle! After you enjoy the Asymetrix User Group today, walk right across the street and see the new training technology that Asymetrix refused to let exhibit, while you enjoy some great Pacific Northwest salmon and wines.”
4) We also gave each actor a copy of our permit (just in case, which turned out to be useful, since Asymetrix did in fact try to tell them they were illegally handing out flyers).

Turns out, using actors was a fantastic idea my sales guy John suggested. We used actors because, well, they work cheap, and are able to really get into “the role” of being articulate, fun, energetic, engaging, polite, and slightly mischievous.

And that little stunt is how we got Boeing as one of our first customers. Which is how we got two brand-name VC’s to invest. Which is how Docent.com went public.

P.S. Oh, one more thing. After my company’s IPO, Asymetrix merged with us.