Hacker News new | ask | show | jobs
by nthj 4972 days ago
to be fair,

cache invalidation is hard.

2 comments

And naming things.
Together with off by one errors, they're the two hardest things in computer science...
Yes, the three hardest things in Comp Sci are cache invalidation and off by one errors.
Don't you mean the 10 hardest things?
I think he means the 11 hardest things actually.
10 in ternary (which I think was his part of the joke)
All they need to do is add a new "message" to say "y'know that message number 4029375 in the cache, yeah that ones deleted, ignore it".

This is not hard.

This arrogance is baffling. What makes you think you know enough about Facebook's infrastructure to make such a claim?
huh? Infrastructure is totally and utterly irrelevant to the problem. I know enough about common sense to make such a claim.

Just send a new message, exactly as you would post an original item/comment/etc, but have some special text/field in there that says "please ignore the previous message". The UI would then hide the previous message.

eg

  COMMENT: {id:9374758, from:"mibbitier", data:"I hate you all!"}
  COMMENT: {id:9374759, from:"mibbitier", data:"*IGNORE_MESSAGE_IN_UI* 9374758"}
Nothing whatsoever to do with infrastructure. Nothing to do with caches. Purely to do with the UI. Not rocket science.

Granted, it's a poor way to do it, but it's better than nothing, and easier than trying to invalidate caches etc

Here's the thing that customers, managers, and less experienced developers all have in common: they understand that no one thing is difficult. But they don't take into account that managing the complexity between a thousand, or a hundred thousand, or a million rules is very, very difficult.

That's why you hire more experienced developers: they're more experienced, not at things like cache invalidation (sure, just nuke your entire cache anytime anything changes! easy!), but at managing complexity.

Which is difficult.

That's why I try to keep my mouth shut about how somebody should "just do this, it'd be so easy, why are they dumb?"

I'm sure it's already rendered to a static presentation-level (HTML/template language du jour) form at that point. That wouldn't work.
Just put some more javascript in there to deal with it. I'm sure it's not the hardest problem in the world.
Great, you've hidden the message with javascript, but now it's still in view-source and in search results for bots.

It's also still visible if someone is using noscript (actually, I have no idea if Facebook works with noscript, probably not).

The solution you are suggestion doesn't solve the problem and injects more corner cases.