Garmin Forerunner 910XT

 

Whether you wear a wetsuit while participating in amateur triathlons, a life-vest while kayaking down river, or have a leash strapped between you and your paddle-board, we have the perfect device for you! Today we announced the Forerunner 910XT – the only all-in-one GPS-enabled device that provides detailed swim metrics and tracks distance, speed/pace, elevation and heart rate for running and cycling. The 910XT sports a sleek profile allowing users to easily slide wetsuits on and off, and has an on-board barometric altimeter for improved elevation data, all without sacrificing the size of its easy-to-read display. The Forerunner 910XT was announced in preparation for the Triathlon World Championship in Kona, HI, October 8, 2011, where it will be prominently displayed.

The Time Protocols

Have you ever had a watch that ran slow or fast, and that you’d correct every morning off your bedside clock? Computers have that same problem. Many computers, including some desktop and laptop computers, use a service called the “Network Time Protocol” (NTP), which does something very similar—it periodically checks the computers’ time against a more accurate server, which may be connected to an external source of time, such as an atomic clock. NTP also takes into account variable factors like how long the NTP server takes to reply, or the speed of the network between you and the server when setting a to-the-second or better time on the computer you’re using.

Soon after the advent of ticking clocks, scientists observed that the time told by them (and now, much more accurate clocks), and the time told by the Earth’s position were rarely exactly the same. It turns out that being on a revolving imperfect sphere floating in space, being reshaped by earthquakes and volcanic eruptions, and being dragged around by gravitational forces makes your rotation somewhat irregular. Who knew?

These fluctuations in Earth’s rotational speed mean that even very accurate clocks, like the atomic clocks used by global timekeeping services, occasionally have to be adjusted slightly to bring them in line with “solar time.” There have been 24 such adjustments, called “leap seconds,” since they were introduced in 1972. Their effect on technology has become more and more profound as people come to rely on fast, accurate and reliable technology.

Why time matters at Google

Having accurate time is critical to everything we do at Google. Keeping replicas of data up to date, correctly reporting the order of searches and clicks, and determining which data-affecting operation came last are all examples of why accurate time is crucial to our products and to our ability to keep your data safe.

Very large-scale distributed systems, like ours, demand that time be well-synchronized and expect that time always moves forwards. Computers traditionally accommodate leap seconds by setting their clock backwards by one second at the very end of the day. But this “repeated” second can be a problem. For example, what happens to write operations that happen during that second? Does email that comes in during that second get stored correctly? What about all the unforeseen problems that may come up with the massive number of systems and servers that we run? Our systems are engineered for data integrity, and some will refuse to work if their time is sufficiently “wrong.” We saw some of our clustered systems stop accepting work on a small scale during the leap second in 2005, and while it didn’t affect the site or any of our data, we wanted to fix such issues once and for all.

This was the problem that a group of our engineers identified during 2008, with a leap second scheduled for December 31. Given our observations in 2005, we wanted to be ready this time, and in the future. How could we make sure everything at Google stays running as if nothing happened, when all our server clocks suddenly see the same second happening twice? Also, how could we make this solution scale? Would we need to audit every line of code that cares about the time? (That’s a lot of code!)

The solution we came up with came to be known as the “leap smear.” We modified our internal NTP servers to gradually add a couple of milliseconds to every update, varying over a time window before the moment when the leap second actually happens. This meant that when it became time to add an extra second at midnight, our clocks had already taken this into account, by skewing the time over the course of the day. All of our servers were then able to continue as normal with the new year, blissfully unaware that a leap second had just occurred. We plan to use this “leap smear” technique again in the future, when new leap seconds are announced by the IERS.

Here’s the science bit

Usually when a leap second is almost due, the NTP protocol says a server must indicate this to its clients by setting the “Leap Indicator” (LI) field in its response. This indicates that the last minute of that day will have 61 seconds, or 59 seconds. (Leap seconds can, in theory, be used to shorten a day too, although that hasn’t happened to date.) Rather than doing this, we applied a patch to the NTP server software on our internal Stratum 2 NTP servers to not set LI, and tell a small “lie” about the time, modulating this “lie” over a time window w before midnight:

lie(t) = (1.0 – cos(pi * t / w)) / 2.0

What this did was make sure that the “lie” we were telling our servers about the time wouldn’t trigger any undesirable behavior in the NTP clients, such as causing them to suspect the time servers to be wrong and applying local corrections themselves. It also made sure the updates were sufficiently small so that any software running on the servers that were doing synchronization actions or had Chubby locks wouldn’t lose those locks or abandon any operations. It also meant this software didn’t necessarily have to be aware of or resilient to the leap second.

In an experiment, we performed two smears—one negative then one positive—and tested this setup using about 10,000 servers. We’d previously added monitoring to plot the skew between atomic time, our Stratum 2 servers and all those NTP clients, allowing us to constantly evaluate the performance of our time infrastructure. We were excited to see monitoring showing plots of those servers’ clocks tracking our model’s predictions, and that we were continuing to serve users’ requests without errors.

Following the successful test, we reconfigured all our production Stratum 2 NTP servers with details of the actual leap second, ready for New Year’s Eve, when they would automatically activate the smear for all production machines, without any further human intervention required. We had a “big red button” opt-out that allowed us to stop the smear in case anything went wrong.

What we learned

The leap smear is talked about internally in the Site Reliability Engineering group as one of our coolest workarounds, that took a lot of experimentation and verification, but paid off by ultimately saving us massive amounts of time and energy in inspecting and refactoring code. It meant that we didn’t have to sweep our entire (large) codebase, and Google engineers developing code don’t have to worry about leap seconds. The team involved in solving this issue was a handful of people, distributed around the world, who were able to work together without restriction in order to solve this problem.

The solution to this challenge drove a lot of thinking to develop better ways to implement locking and consistency, and synchronizing units of work between servers across the world. It also meant we thought more about the precision of our time systems, which have a knock-on effect on our ability to minimize resource wastage and run greener data centers by reducing the amount of time we must spend waiting for responses and rarely doing excess work.

By anticipating potential problems and developing solutions like these, the Site Reliability Engineering group informs and inspires the development of new technology for distributed systems—the systems that you use every day in Google’s products.

Google Places: Local Search Problems

 

The good folks from Artfibers, a prominent yarn store at 266 Sutter St. in San Francisco, CA, made this recent post in the forums:

I own one of the oldest and best yarn stores in San Francisco — Artfibers. Six months ago our name came up in a Google search “yarn San Francisco”. Now we do not. It seems that Google is determined to destroy our business. What can we do?

After several efforts by myself and another poster to help they proceeded to only get angrier at Google. I penned this response.

To seabright.nyle from Artfibers in San Francisco.

I understand that you are frustrated. I understand that Google Local results seem crazy and unpredictable to you and that you are angry. I understand that your time is limited but you feel compelled to explain all of this to Google. There is a reason for all of this:

Google is from Mars and most small business people are from Venus.

Let me explain.

Google solves big computational problems with algorithms. That is what they do, that is how they define themselves. On this particular computational problem of local search, they attempt to rank the 100 million or so world wide off-line businesses using on-line proxies. By that I mean that Google is looking to compare the importance of your business to another by looking across the Internet for signals that your real, substantial and significant Place in the real world has more prominence than another in your particular area of geography and specialty.

This is not small task that Google has undertaken. They use a statistical approach to improving the results and figure that if they can provide mostly accurate and relevant results and those are more accurate this week than last week than they are moving in the right direction. Computational and statistical approaches to the question of which businesses exist today and which are more important will never be 100% accurate. Your perception of reality and statistics rarely offer the same reflection of the real world.

You, on the other hand, think that your business deserves to be noticed, acknowledged and affirmed for the unique entity that it is. You feel that your business has earned this attention. Your business is often how you define yourself. When yours is one of the businesses that is affected by Google’s seemingly distant approach, you are justifiably angry.

But in this context your business is no more important to Google than a gnat on a the pettuti of an elephant is to that elephant. It might get noticed but it won’t change the general direction of travel. But it might also get swatted out of existence with the swish of a tail, regardless of ground truth.

You as a business owner can fight this tendency or you can take a more “go with the flow” approach.  I have been doing both for over 6 years. I can tell you from a narrow cost benefit approach, understanding the flow and going with it is usually the most profitable approach for small businesses.

You can try to get support in the forums, you can attempt to e-mail Google or call them and ask why your prominent off-line business is not more prominent online in their search engine. You can argue until you are blue in the face that they are “getting it wrong”.

The answer you will likely get IF you do manage to break through the veritable Iron Curtain of silence and connect with a human is the same answer that  Google provides in the Help Documents.

Google Maps search results are based primarily on relevance, distance, and prominence. These factors are combined to help us find the best match for your search.

Google Maps and Google Places are free services, so there’s no way to request or pay for a better ranking. In addition, we do our best to keep the details of the algorithm confidential in order to make the ranking system as fair as possible for everyone.

Their answer will make you will wonder if the people working there are any less computational and statistical than their algo. (I can assure you that they are.)

That leaves the “go with the flow” option. That means the “Google flow” or rather the flow as they have designed for they are big and you are little. You are the fly mentioned above.

This option means that you need to embark on an effort to learn how to make your business more relevant and more prominent in ways that Google (the machine, not the few humans behind the curtain) understands.

This effort will require either some time or some money. Perhaps more than you have readily available.

Either though is preferable to beating your head against that iron wall. Both directions will provide results. The latter though (the wall tactic) will provide just a headache.