Cable Fail

I’ve been looking for a 4 conductor male TRS connector (Apple iPhone headset jack) for a small project. Simple enough. I found a cheap extension on Amazon a week ago that seemed to fit the bill. For posterity here’s what the description says:

Technical Details

  • Made and designed to work seamlessly with the Apple iPhone.
  • Will act as an extension cable, carrying both the stereo audio and microphone signals from your device.
  • Allows the adapter to be used with stereo headphones that also have integrated microphone functionality
  • Made with Nickel plated materials, 3.5mm 4-pole plug, 3.5mm 4-pole jack and a 10 cm (L)
  • A perfect accessory for your NEW Apple iPhone.

Emphasis mine.

It arrived in an envelope containing a tiny ziplock back with no labeling (it’s barebones). When I hooked it up it seemed that audio quality wasn’t very good. I never bothered to check out the microphone. At that price it obviously didn’t make fiscal sense to return it as the postage costs about as much as it’s worth. So I decided to finish dissecting it.

From what I can tell it’s actually 3 wires. Each is a different color (red, copper, green) with some white strands in the core. The female jack has two prongs with one wire attached to each and the enclosure itself which seems like it’s the ground. My suspicion is that the audio is either combined or only one channel is used making it actually mono. The jacket I dissected was molded on so it was virtually impossible to remove the plastic without severing the thin wires in the process.

Here’s what the wire and the female jack (sideways on the bottom) look like:
Full Sized iPhone Wire Dissected

Here’s the jack from the back side. I suck at photography and only have a P&S camera, so it’s a bit blurry:
iPhone Cable Female Terminal

I’m now debating trying another vendor or a more expensive 2.5 mm to 3.5 mm adapter.

My original plan was to find a new 4 conductor TRS male plug, but that proved impossible via the usual sources. 3 conductor is easy.

If anyone has suggestions feel free to reach out.

Engineering Efficiency

Internet companies have the unique ability to scale quicker than any other industry on earth. Never before has a company been able to position itself from being nothing more than an idea to being in the living rooms of millions around the globe in a matter of hours. While this introduces seemingly unlimited opportunities to grow it also allows for exponential waste if a company isn’t careful. It’s interesting to see how they scale. Scaling businesses in many ways isn’t very different than scaling servers and software stacks.

The Classic Example: UPS

Started in 1907 and adopting the name United Parcel Service in 1919 UPS has no real “high tech” background unless you include the Ford Model T. That doesn’t mean it couldn’t become more efficient. UPS has made a science of the delivery business. For example it’s famous for it’s “no left” policy. Simply put they found that avoiding left turns means less time waiting at lights which means less fuel is wasted. The more efficient routing formerly done by humans now computerized saves them 3 million gallons of fuel in 2007 alone. Lets do the math:

Assuming they run 100% diesel at an average cost of $2.87/gallon in 2007 [doe] multiplied by 3 million that’s $8.61 million dollars by trying to avoid left turns.

Not bad for a souped up mapping application.

By having their drivers do things like turning of the ignition while unbuckling their seat belt at the same time, and scanning for the doorbell while walking towards the door (it’s easier to see from a distance than up close) they can shave time off of their routes.

Then of course there’s package tracking. While customers might like to know in what city their weight loss taps are sitting tracking systems help reduce loss and monitor package routing for optimal efficiency.

Cutting Utility Bills: Google

Being the largest search engine, a large ad network, email provider, analytics firm, mapping service, video site, and whatever else they do means Google needs a ton of servers. Cramming servers into data centers and keeping them cool to prevent hardware failures is a complicated and expensive task. Keeping the whole thing powered is also really expensive. Google has scrutinized server designs to eliminate all waste possible. This has resulted in Google having more horsepower at a lower cost than their competitors. Having more capacity at a lower cost means Google can do more at a lower cost than their competitors. I won’t discuss Google in too much detail since they did a great job themselves recently and I mentioned it the other day in another blog post: Google’s Data Center Secrets.

Shipping Efficiency: Amazon

Amazon’s long been improving efficiency by using data collection and analysis to encouraging their customers to spend more. Their algorithms to recommend related products you might be interested in is one of the best out there. Their ordering system is streamlined to prevent customers from bailing before completion. Their products are SEO’d to appear on the top of Google searches. That doesn’t mean Amazon can’t improve other parts of their business.

Amazon several months ago started a Frustration-Free Packaging program. Here’s how they describe it:

The Frustration-Free Package (on the left) is recyclable and comes without excess packaging materials such as hard plastic clamshell casings, plastic bindings, and wire ties. It’s designed to be opened without the use of a box cutter or knife and will protect your product just as well as traditional packaging (on the right). Products with Frustration-Free Packaging can frequently be shipped in their own boxes, without an additional shipping box.

The key here is “can frequently be shipped in their own boxes”. By shipping a box alone rather than packaging they can skip a step in their warehouses (and the packaging materials that go with packaging something for delivery). This also lowers the weight as those extra boxes don’t weigh 0 oz. The frustration free packaging is also the perfect shape for efficiently filling trucks and strong enough to not crush easily thus lowering returns due to damage.

Amazon now even has a feedback form [login required] for users to share what they think of their package. This has the added bonus of helping further reduce the inefficient shipping practices so common right now.

Amazon’s also done a significant amount of work on their infrastructure to make their servers scale well using tech such as EC2 and S3. By selling capacity to other companies they able to take advantage of economy of scale as well as diversify their business beyond just retail. Of course they are planning their data centers to have access to cheap power.

These aren’t haphazard attempts at increasing efficiency, these are well calculated engineered approaches to removing even the smallest inefficiencies with the knowledge of how they compound as operations scale. Aren’t they clever?

Amazon S3 Outage

The buzz around the web today was the outage of Amazon’s S3. It shows what websites are “doing it right”, and who fails. This is a great follow up to my “Reliability On The Grid” post the other day.

Amazon S3 is cloud based computing. Essentially when you send them a file using their REST or SOAP interface Amazon stores it on multiple nodes in their infrastructure. This provides redundancy and security (in case a data center catches fire for example). Because of this design it’s often though that cloud based computing is invincible to problems. This is hardly the fact. Just like any large system, it’s complicated and full of hazards. It takes only a small software glitch, or an unaccounted for issue to cause the entire thing to grind to a halt. More complexity = more things that can fail.

Amazon S3 is popular because it’s cheap and easy to scale. It’s pay-per-use based on bandwidth, disk storage, and requests. Because that allows for websites to grow without having to make a large infrastructure investment, it’s popular for “Web 2.0″ companies trying to keep their budgets tight. Notably sites like Twitter, WordPress.com, SmugMug and Amazon.com themselves all use Amazon S3 to host things like images.

Many sites, notably Twitter, and SmugMug didn’t have a good day today. WordPress.com and Amazon.com operated like normal. The obvious reason for this is WordPress.com and Amazon.com are much better in terms of infrastructure and design.

WordPress.com uses S3, but proxies that with Varnish. There’s a brief description here, and a more detailed breakdown here. According to Barry Abrahamson, WordPress.com does 1500 image requests per second across and 80-100 are served through S3. They have (slower) back up’s in house for when S3 is down and can failover if S3 has a problem. This means they can leverage S3 to their advantage, but aren’t down because of S3. Using Varnish allows them to keep the S3 bill down by using their own bandwidth (likely cheaper since they are a large site and can get better rates on bandwidth). This also and lets them have this have a good level of redundancy. Awesome job.

Amazon.com uses S3 themselves. If you look at images on the site, they are actually served from g-ecx.images-amazon.com. Which is actually:

g-ecx.images-amazon.com. 38     IN      CNAME   ant.mii.instacontent.net.

instacontent.net is actually part of Mirror Image, a CDN. This is essentially outsourcing what WordPress.com is doing in terms of caching. It’s similar to Akamai’s services. A CDN’s biggest advantage is lowering latency by using servers closer to the customer, which are generally going to feel faster. The other benefit is that they cache content for when the origin is having problems. Because Amazon has a layer on top of S3, they have an added level of protection and remained up and images loaded.

Twitter serves most images such as avatars right off of S3. This means when S3 went down, there were thousands of dead images on their pages. No caching, not even a CNAME in place. Image hosting is the least of their concerns. Keeping the service up and running is their #1 concern right now. The service was still usable, just ugly. Many users take advantage of third party clients anyway.

Using a CDN or having the infrastructure in house is obviously more expensive (it makes S3 more of a luxury than a cost savings measure), but it means your not depending on one third party for your uptime.

Reliability On The Grid

There’s been a lot of discussion lately (in particular NYTimes, Data Center Knowledge) regarding both reliability of web applications which users are becoming more and more reliant on, as well as the security of such applications. It’s a pretty interesting topic considering there are so many things that ultimately have an impact on these two metrics. I call them metrics since that’s what they really are.

Continue reading

April Fools 2008

As usual, my list of April Fools that I saw today:

Site Backups And Bandwidth Fun

I keep regular backups of everything on this server just in case something happens. Recently I switched to a more automated and secure (PGP encrypted) solution for this blog due to it’s fast-paced nature. Just the critical stuff (database, media, templates). I choose PGP (implemented using GPG) since it’s easy, and I only have to store the public key on the server, making it safer than most alternatives.

I’m strongly considering moving it all eventually over to Amazon’s S3 storage. At $0.15 per GB-Month of storage used and $0.20 per GB of data transferred it would be very affordable to keep backups in an even more secure fashion. I’d still use my own encryption on top of theirs for extra security. For things like media, I could even see myself hosting it solely at Amazon. It just seems like that may be a more practical and scalable approach.

Unfortunately until either FTTH or DOCSIS 3.0 comes to town, it doesn’t look like Amazon’s S3 will be practical for home backup purposes. This server has a beefy connection to a few large pipes to the internet (Level3, Global Crossing, and Cogent last I checked). They provides high speed connectivity so a backup would take only a few seconds. At home with a cable modem on a DOCSIS 1.1 network (such as Comcast) the bandwidth is just to slim to allow enough upload capacity. Comcast still only allows 384kbps up. Even the top plans in select areas don’t top 1Mbps. Of course these are Comcast’s numbers (the actual performance is often less). In areas that they currently serve, Verizon FiOS (FTTH) is available at 15 Mbps/2 Mbps. Much better suited for such purposes (though more would be welcome). As strange as it may seem pricing is quite competitive, giving cable a run for it’s money. Perhaps one day DOCSIS 3.0 will appear, though that seems to be a while away. Perhaps one day all homes will have 100Mbps full duplex connections with low latency.

The only real way to get around this limitation is to perhaps use rsync to perform backups. Initial backups would still suck, but after that it wouldn’t be too bad. Though that wouldn’t work with services such as Amazon’s S3, which are token based. There is an rsync-like clone, but it’s still not the real thing. Perhaps Google’s upcoming GDrive will be cool enough to allow the use of rsync over SSH (I could dream) in addition to WebDAV (which is what I expect to see). Last I checked rsync doesn’t support WebDAV because WebDAV is done over HTTP. If I understand it right, RFC 3229 would add Delta encoding support to HTTP, making something like rsync over WebDAV possible since it uses delta encoding.

Online Memorials, Fundraising

In the wake of this weeks events, I decided to spend several minutes browsing the home pages of the world’s largest companies, just to see how many made an alteration either as a memorial or to raise funds for disaster relief… I easily hit all the big brands here in the US, odds are I tackled most of the top 100 companies in the United States. Here were my findings:

Amazon.com
Apple
Google 1
Google 2
Marriott

Apple cleared the entire homepage. Amazon as usual took advantage of it’s ability to quickly collect payments. Google has a huge audience, and put a link to a page containing help info. Marriott did as well. eBay has setup a few things as well.

I was surprised how many have no indication of such events. During 9/11 several websites completely redid their corporate homepage. This isn’t anywhere near a US trend, as I checked many international companies as well. IBM, Intel, Microsoft, all have no mention or indication.

Amazon Eager to Get A9 off the ground

It appears Amazon is giving a geeky (π/2) discount to early adopters who uses their search engine.

So before you make an amazon purchase do the following:

  1. Visit a9 and perform a search
  2. Visit amazon.com (if you like me… use my link so I get affiliate credit)

Robert Accettura, since you’ve been using A9.com recently, virtually everything at Amazon.com is automatically an additional π/2% (1.57%) off for you. Collecting this discount is zero effort on your part. It will be applied automatically at checkout (it will happen whether you use the shopping cart or our 1-Click Shopping®). You don’t need to do anything to get this discount except keep using A9.com as your regular search engine.

We don’t advertise this additional discount that we give in exchange for using A9.com, so if you want your friends to know about it, please tell them. It is probably the only way they’ll find out. All they have to do is use A9.com as their regular search engine. They should make sure they are signed in to A9.com (it should be recognizing them by name) so that we can be certain they get credit for their visit.

While the π/2% discount is a good additional reason to use A9.com it isn’t the best reason. A9.com licenses its web search results from the industry leader Google, and then supplements those results with Amazon’s Search Inside the Book™ results. The coolest feature is that A9.com keeps track of your search history for you on the server side. To see how this works, do some A9 searches from your computer at work and then sign in to A9.com from your computer at home.

How can we afford this additional π/2% discount?

Sponsored links revenue -from the small text-based ads on A9.com and Amazon.com search results pages -will help offset costs we incur through the Rewards promotion. With our automatic π/2% discount, we are effectively sharing with you some of the money we collect from sponsored links, i.e. sharing the pi.

Please use A9.com and tell your friends.

Thank you

  • A9.com Instant Rewards will not be applied to the purchase of gift certificates or gift cards, such as Amazon.com Gift Certificates, Target GiftCards, or Borders Gift Cards.
  • A9.com Instant Rewards will not be applied to purchases from Amazon.com zShops or Amazon.com Auctions; payments and contributions made using the Amazon.com Honor System; Marketplace Pre-Orders; or In-Store Pickup purchases.
  • A9.com Instant Rewards may be inactivated for any Amazon.com account at any time depending on the number of A9.com Web searches performed.
  • Product searches performed on Amazon.com will not help to qualify an account for A9.com Instant Rewards.
  • You do not have to click on sponsored links to qualify an account for A9.com Instant Rewards.
  • The A9.com Instant Reward rate is π/2% (1.57%) off the total purchase price, including tax and shipping.
  • The exact amount of the A9.com Instant Reward stated on the order summary is only an estimate. After taxes are finalized, the exact amount of the Instant Reward will be finalized.
  • A9.com Instant Rewards are not for use on Amazon.co.uk, Amazon.de, Amazon.co.jp, Amazon.ca, Amazon.fr, or any Web site other than www.amazon.com.
  • Amazon.com reserves the right to change or discontinue the A9.com Instant Reward program at any time.

[Source:Amazon.com 9/19/2004]