Re:Trust upholds complaint about BBC homepage clock
by ig1 on Wednesday June 05, 2013 @07:35AM
(#5824888)
People surprised by the 100 days requirement have presumably never seen the type of infrastructure required by a top-100 website or had to deal with user-time issues.
Having an independent clock means turning off caching, which is a big deal when you're serving millions of page requests.
Not to mention having to deal with timezone issues, daylight saving, latency, etc. This stuff is hard.
Re:Trust upholds complaint about BBC homepage clock
by relix on Wednesday June 05, 2013 @08:09AM
(#5825027)
Just add some javascript to load the time from a different server after the cached version is rendered. Build a simple service in node.js, ruby or java to return a json datetime, use that as the endpoint to load the time from. This is not rocket science and should not take 3 months to build, even with all the caching involved.
Edit: I just checked the headers that are sent along with any request to bbc.co.uk, and the response already includes the current datetime. So basically they don't even need to implement a time server anymore, but just do an Ajax request to document.location, and read the Date header on the result, to get the accurate time. They can just upscale their servers a bit to handle the extra requests (or implement an empty-response URL). Why would this take 100 days again?
Re:Trust upholds complaint about BBC homepage clock
by JonnieCache on Wednesday June 05, 2013 @08:28AM
(#5825111)
This is the BBC, not some startup in a garage with a couple of EC2 instances. It's the busiest website in europe, and it's publicly funded. If they just threw up external node services whenever they felt like it there would be chaos.
For example, whenever there's a major news story they see traffic spikes that would make you weep.
Internally on the other hand, where the stakes aren't so high, they make heavy use of rails, node, go and all that cool stuff. They know what they're doing.
Check out this list of some of their machines, from part of their monitoring system which is for some reason left open: http://support.bbc.co.uk/support/rrd
EDIT: you're right that they could probably implement this quite easily, but the point is they can't just throw up an agile solution at the scale of the BBC, even if it seems safe.
Re:Trust upholds complaint about BBC homepage clock
by relix on Wednesday June 05, 2013 @08:44AM
(#5825170)
The point is that this could be solved by a solution that is completely external to their current infrastructure, meaning they don't even have to mess with any integration or legacy code. Agile in this case seems perfectly suitable because they can easily have a fallback when the server doesn't respond to a "time"-request, that falls back to the current state (i.e. use client-side time). So we've got the perfect storm of no integration with current systems, tiny overhead on requests (it's basically an ECHO server), unimportant feature and easy fallback.
In fact I have an enterprise plan to sell them that does exactly this if they would like to externalise this problem.
Re:Trust upholds complaint about BBC homepage clock
by ig1 on Wednesday June 05, 2013 @09:02AM
(#5825243)
Because your OPs and deployment team are going to know exactly how to deploy and support something you cobbled together in a completely arbitrary way.
You obviously thought through the integration with monitoring, scaling and multiple redundancy systems so in the event of traffic spike or disaster it'll keep working without manual intervention.
That's not even touching the business logic complexity of issues like DST or leap seconds where you have to be able to arbitrarily change the clock forward or backward.
Re:Trust upholds complaint about BBC homepage clock
by relix on Wednesday June 05, 2013 @09:17AM
(#5825319)
Here ya go mate, caching, fallback, all in a 15 lines of javascript. If you want to extract jquery out of there that should be easy enough.
No need for extra servers, the OPs guys don't even need to know it's there. Take an extra performance hit that is equal to loading another image per page (yeah image requests, while probably served from CDN, also include an accurate Date response header as I checked), cached for 7 days (remove the cookie during periods of daylight saving times etc). Just have to make sure the server time is reasonably accurate. I'm sure a few seconds inaccuracy wouldn't matter.
Re:Trust upholds complaint about BBC homepage clock
by ig1 on Wednesday June 05, 2013 @11:04AM
(#5826054)
Doesn't work if there's a proxy server caching old versions between the user and the server. Not to mention that according to the RFC standard intermediary servers are allowed to manipulate/remove/alter any non-restricted header (including Date).
Yes you can come up with a hacky solution that works 80% of the time quickly, but if you want a 99% solution you need to put the work in to do it right.
Re:Trust upholds complaint about BBC homepage clock
by relix on Wednesday June 05, 2013 @11:26AM
(#5826225)
Actually, the Date content header is quite well defined in HTTP/1.1 [0], and should not be manipulated nilly-willy by intermediates. If you're having problems with proxies caching your requests, even if you're asking non-cached content [1], then you're never going to be able to get an accurate time from anywhere since any request might be cached, and no solution would work anyway.
It's not quite a "hacky" solution, I would guesstimate it would work 95% of the time rather than 80%, but even 80% is a great solution for the amount of work involved, the tradeoffs, and the fact that we're talking about a clock displayed on a website.
Or, you know, you could spend £15.000 taxpayers' money over 3 months for something I'm not even sure would be more flexible/maintainable/performant.
Re:Trust upholds complaint about BBC homepage clock
by relix on Wednesday June 05, 2013 @09:32AM
(#5825409)
If you want that, you can just remove the caching, and it'll always accurately reflect the server time. However who changes their local clock? I think we could definitely get away with caching it for 7 days.
Same thing with DST (I even mentioned it). Also once you have an accurate time, the javascript time object includes the DST logic itself I think. We're only dealing with an inaccurate local clock, we don't have to reimplement whatever ISO standard stands for Time. As soon as we have the delta between local time and server time, we're golden.
Re:Trust upholds complaint about BBC homepage clock
by rasur on Wednesday June 05, 2013 @02:07PM
(#5827403)
Well, I haven't worked there since about 2006, so numbers may have changed, but it was at least 10000 servers of various types (redhat, solaris, windows were the usual suspects I had to build out) of which I was aware (between maidenhead, the various colo's i had some responsibility for, tv center, white-city).
software? i know there was a lot of perl, ruby was gaining some traction, a few different CMS's.. etc, i've (thankfully) forgotten most of the details, but diverse ecosystem is an appropriate phrase here.
undoubtedly things have changed between then and now, but i'd guess it's something similar hardware-wise.
My penultimate day of work was racking up ~300 servers for the i-player farm (i was a system engineer) at red-bus in docklands. My back has only really just started to recover. :/
Re:Trust upholds complaint about BBC homepage clock
by claudius on Wednesday June 05, 2013 @07:25AM
(#5824843)
Ignoring the issue whether a clock on a website is even remotely useful, this:
> The corporation also added that it would take around '100 staffing days to make the changes involved in switching to an independent clock'.
strikes me as at least slightly odd. Shouldn’t such a change be implementable by sending a ‘starting time’ with the initial request and then count using JS?
I’m one of these why-does-your-field-even-have-its-own-journal-guys, but this doesn’t look particularly difficult to me.
Re:Trust upholds complaint about BBC homepage clock
by IanCal on Wednesday June 05, 2013 @07:36AM
(#5824890)
That depends on the accuracy required.
1) How much drift is ok? Do you need to keep sending updates?
2) These pages should be heavily cached, which means the time you get will be out by potentially several minutes (or you've got to have a very short term cache for just the clock).
3) Load time. If the request takes 1s but you need to be accurate to the second then do you need to try and measure the initial request time and determine the likely delays?
4) Managing all the timezones. If the clock must show the local time then you can't just send server time back, we've got to send different things for different regions. How accurate does that have to be? Will Geo-IP be enough?
Changes of the size 2-4 will require new code, load testing, QA, code reviews. Plus you've got to take people from projects / push back timescales, which need to be weighed and approved (what deadlines are coming up? What change freezes?).
Re:Trust upholds complaint about BBC homepage clock
by claudius on Wednesday June 05, 2013 @07:30AM
(#5824868)
The article explicitly states that people expect this clock to show the correct time in the UK, which I find a somewhat reasonable assumption for the BBC.
Re:Trust upholds complaint about BBC homepage clock
by rwmj on Wednesday June 05, 2013 @07:37AM
(#5824891)
But we could stay on UTC all year. Why force everyone to get up one hour earlier in summer? If people want to get up, they can do it themselves. Leave the rest of us in peace.
Re:Trust upholds complaint about BBC homepage clock
by madaxe on Wednesday June 05, 2013 @07:36AM
(#5824889)
Did this years ago by grabbing the local time on the user's system clock (as many don't set their TZ correctly), rounding to the nearest 15 mins, and then guessing their TZ from this. 15 mins because Nepal and a few others of that ilk.
Re:Trust upholds complaint about BBC homepage clock
by dbdbdb on Wednesday June 05, 2013 @09:57AM
(#5825558)
"A member of the public complained that the clock on the homepage merely reproduces the time stored on an individual computer's internal system, whether it's accurate or not."
Problem exists between computer and chair. Some people need to get a life.
Re:Trust upholds complaint about BBC homepage clock
by andyhmltn on Wednesday June 05, 2013 @07:41AM
(#5824912)
How does this 'undermine trust'? If you're basing your scheduling based exactly on that clock expecting the exact time in London, then you are doing something wrong.
Re:Trust upholds complaint about BBC homepage clock
by shawabawa3 on Wednesday June 05, 2013 @08:30AM
(#5825116)
It's on the BBC and so people expect it to be accurate.
For example, I imagine a lot of people aren't sure if/when the clocks change (daylights saving time). They check on the BBC, see that their computer time is "accurate" and assume the clocks haven't changed.
As another example, I often google "time" to check to see if my clock is accurate. If that just echoed back my local time I would feel like that was a breach of trust
Re:Trust upholds complaint about BBC homepage clock
by martin-adams on Wednesday June 05, 2013 @08:31AM
(#5825126)
Often when we switch from GMT to BST (one hour ahead) I have to Google the time in the UK (because of Apple's trouble in the past with daylight savings, I can't trust my phone).
It would be reasonable to expect someone to go to the BBC homepage and see what the current time is after the daylight savings switch, and wrong to find the time was incorrect due to their PC not being configured correctly.
Re:Trust upholds complaint about BBC homepage clock
by icebraining on Wednesday June 05, 2013 @07:37AM
(#5824896)
But they don't really have to display a server generated clock, just pre-seed the client clock with the current server time in order to account for the offset. If they want to be really sure, they can re-set the offset regularly using AJAX. There's no need to reimplement the whole clock.
Re:Trust upholds complaint about BBC homepage clock
by VLM on Wednesday June 05, 2013 @08:12AM
(#5825037)
"There's no need to reimplement the whole clock."
Its a pity it "has to be" a symbolic fake looking virtual clock.
A webcam snapshot updated every minute or a live video feed of the actual real world big ben clock would look cooler and be infinitely more impressive and "British" (British being the first word of BBC)
Yes its not HTML5/CSS3/JS/AJAX but the tech infrastructure to cache semi-live real world pix like this would also be technologically cool, so don't worry about it.
Now... go reimplement Big Ben (just kidding)
(Edited to add, also you're also outsourcing your problem with this strategy... Time on Big Ben is wrong, who cares its not your problem, tell the Queen or whoever is in charge of Big Ben, its no longer a web developer problem)
Re:Trust upholds complaint about BBC homepage clock
by shawabawa3 on Wednesday June 05, 2013 @08:32AM
(#5825127)
I don't think the clock has to be accurate to the ms. The latency between client and server will almost always be < 1 second. They can probably get away with time being accurate to ~1minute
Re:Trust upholds complaint about BBC homepage clock
by PavlovsCat on Wednesday June 05, 2013 @07:33AM
(#5824878)
If you put 100 people into a small room, it will take them 24 hours to solve this problem. With less people, or a bigger room, it can be done faster, simply because having more than enough oxygen and space for your limbs helps a great deal with the process.
Re:Trust upholds complaint about BBC homepage clock
by PavlovsCat on Wednesday June 05, 2013 @07:55AM
(#5824970)
Haha, what's the downmod for? Because it was a bad joke, because it was a joke period, or because it actually went over the head of someone? HN, go out more.
Re:Trust upholds complaint about BBC homepage clock
by PavlovsCat on Wednesday June 05, 2013 @02:57PM
(#5827774)
Is that from the posting guidelines or just random snobbery? Anyway, unlimited unaccountable anonymous downmoderation is exactly that, a snarky joke that never ends. And in that respect, slashdot is dancing circles around HN. Respect your elders, how about that :P
Having an independent clock means turning off caching, which is a big deal when you're serving millions of page requests.
Not to mention having to deal with timezone issues, daylight saving, latency, etc. This stuff is hard.
Edit: I just checked the headers that are sent along with any request to bbc.co.uk, and the response already includes the current datetime. So basically they don't even need to implement a time server anymore, but just do an Ajax request to document.location, and read the Date header on the result, to get the accurate time. They can just upscale their servers a bit to handle the extra requests (or implement an empty-response URL). Why would this take 100 days again?
Edit2: Sample code here: https://news.ycombinator.com/item?id=5825319
For example, whenever there's a major news story they see traffic spikes that would make you weep.
Internally on the other hand, where the stakes aren't so high, they make heavy use of rails, node, go and all that cool stuff. They know what they're doing.
Check out this list of some of their machines, from part of their monitoring system which is for some reason left open: http://support.bbc.co.uk/support/rrd
Here's is some data about their peering: http://support.bbc.co.uk/support/peering/
Yeah that's right. Peering.
EDIT: you're right that they could probably implement this quite easily, but the point is they can't just throw up an agile solution at the scale of the BBC, even if it seems safe.
In fact I have an enterprise plan to sell them that does exactly this if they would like to externalise this problem.
You obviously thought through the integration with monitoring, scaling and multiple redundancy systems so in the event of traffic spike or disaster it'll keep working without manual intervention.
That's not even touching the business logic complexity of issues like DST or leap seconds where you have to be able to arbitrarily change the clock forward or backward.
No need for extra servers, the OPs guys don't even need to know it's there. Take an extra performance hit that is equal to loading another image per page (yeah image requests, while probably served from CDN, also include an accurate Date response header as I checked), cached for 7 days (remove the cookie during periods of daylight saving times etc). Just have to make sure the server time is reasonably accurate. I'm sure a few seconds inaccuracy wouldn't matter.
Yes you can come up with a hacky solution that works 80% of the time quickly, but if you want a 99% solution you need to put the work in to do it right.
It's not quite a "hacky" solution, I would guesstimate it would work 95% of the time rather than 80%, but even 80% is a great solution for the amount of work involved, the tradeoffs, and the fact that we're talking about a clock displayed on a website.
Or, you know, you could spend £15.000 taxpayers' money over 3 months for something I'm not even sure would be more flexible/maintainable/performant.
[0]: http://tools.ietf.org/html/rfc2616#section-14.18
[1]: E.g. URL's with random number in the query
Same thing with DST (I even mentioned it). Also once you have an accurate time, the javascript time object includes the DST logic itself I think. We're only dealing with an inaccurate local clock, we don't have to reimplement whatever ISO standard stands for Time. As soon as we have the delta between local time and server time, we're golden.
software? i know there was a lot of perl, ruby was gaining some traction, a few different CMS's.. etc, i've (thankfully) forgotten most of the details, but diverse ecosystem is an appropriate phrase here.
undoubtedly things have changed between then and now, but i'd guess it's something similar hardware-wise.
My penultimate day of work was racking up ~300 servers for the i-player farm (i was a system engineer) at red-bus in docklands. My back has only really just started to recover. :/
Didn't it say "time in the UK"?
> The corporation also added that it would take around '100 staffing days to make the changes involved in switching to an independent clock'.
strikes me as at least slightly odd. Shouldn’t such a change be implementable by sending a ‘starting time’ with the initial request and then count using JS?
I’m one of these why-does-your-field-even-have-its-own-journal-guys, but this doesn’t look particularly difficult to me.
1) How much drift is ok? Do you need to keep sending updates?
2) These pages should be heavily cached, which means the time you get will be out by potentially several minutes (or you've got to have a very short term cache for just the clock).
3) Load time. If the request takes 1s but you need to be accurate to the second then do you need to try and measure the initial request time and determine the likely delays?
4) Managing all the timezones. If the clock must show the local time then you can't just send server time back, we've got to send different things for different regions. How accurate does that have to be? Will Geo-IP be enough?
Changes of the size 2-4 will require new code, load testing, QA, code reviews. Plus you've got to take people from projects / push back timescales, which need to be weighed and approved (what deadlines are coming up? What change freezes?).
I'd like to see how they're going to implement that without relying on the user's time settings in some way.
Sure, they could get the system timezone offset, but that's not really any more safe than using the system clock.
GeoIP lookup? Surely location services won't fly because of the scary browser message.
Any other ideas?
Well, in that case it's a piece of piss to implement as claudius says below.
Problem exists between computer and chair. Some people need to get a life.
For example, I imagine a lot of people aren't sure if/when the clocks change (daylights saving time). They check on the BBC, see that their computer time is "accurate" and assume the clocks haven't changed.
As another example, I often google "time" to check to see if my clock is accurate. If that just echoed back my local time I would feel like that was a breach of trust
It would be reasonable to expect someone to go to the BBC homepage and see what the current time is after the daylight savings switch, and wrong to find the time was incorrect due to their PC not being configured correctly.
Its a pity it "has to be" a symbolic fake looking virtual clock.
A webcam snapshot updated every minute or a live video feed of the actual real world big ben clock would look cooler and be infinitely more impressive and "British" (British being the first word of BBC)
Yes its not HTML5/CSS3/JS/AJAX but the tech infrastructure to cache semi-live real world pix like this would also be technologically cool, so don't worry about it.
Now... go reimplement Big Ben (just kidding)
(Edited to add, also you're also outsourcing your problem with this strategy... Time on Big Ben is wrong, who cares its not your problem, tell the Queen or whoever is in charge of Big Ben, its no longer a web developer problem)
99.5 days of management busy-work, and 4 hours coding, testing and deploying.
At least I think that's what it means...