Live data from Hacker News

"Unknown or expired link." - Why?

google.com

31–40 of 142 posts

Re: "Unknown or expired link." - Why?

#31

You get that when your session expires, which takes just slightly less time than writing a well thought out comment.

It doesn't just happen when writing comments; it can happen almost anywhere on the site if you linger too long. It's the most glaring fault with the software behind this site and would be completely impracticable if this site weren't populated by technology-minded people who aren't bothered by error messages.

Re: "Unknown or expired link." - Why?

#32
post #20
post #15

The first complaints are from 1575 days (over 4 years) ago, including about the more button breaking, so I am guessing pg has no interest in fixing it.

Hacker News is open source, so it seems as if nobody is interested in fixing it. Or are there fixes and pg has rejected them?

Or it's so ingrained in the architecture of the software that a fix isn't possible without completely rewriting it and changing the entire design philosophy.

Re: "Unknown or expired link." - Why?

#33
post #11

The HN server uses a table of closures to implement those links (the id code for the closure is the bit after fnid= in the url). When the HN server starts running out of memory, it drops entries from this table. When your browser asks for an entry that is no longer in this table, you get the "Unknown or expired link" error. This is a crazy design, but unless someone would like to patch the source code and get PG to a…

It's not crazy at all, it greatly simplifies development to use callbacks for actions rather than manually encoding the necessary state into the URL. Techniques such as this are what enable a single developer to be so productive by automating boring and time consuming stuff.

Simplifies development? This is not a complicated piece of software and the techniques to build it are well known. You wouldn't need any more state than the id number you need for the callback anyway.

Building broken software is always much easier than building robust correct software so this is hardly a good argument.

Re: "Unknown or expired link." - Why?

#34
post #24

Earlier quoted context omitted.

It's not crazy at all, it greatly simplifies development to use callbacks for actions rather than manually encoding the necessary state into the URL. Techniques such as this are what enable a single developer to be so productive by automating boring and time consuming stuff.

Except it doesn't appear to work robustly, which makes it poor design. "Automating boring and time consuming stuff," is all well and good if it actually produces a functional system, but that concern is secondary to robustness.

It'd work robustly enough if the links didn't expire, and if we believe other posts on this page, the links are expiring due to memory limits on the system. (The other possibility is a timeout, I guess, which is easily fixed.) If it's running out of memory to store the closures it would run out of memory to store the interaction state.

In other words, there's a problem here, but it's not the programming model that pg chose.

Re: "Unknown or expired link." - Why?

#36

Earlier quoted context omitted.

You don't want to execute code from URLs. (Yes, you can use cryptography to "sign" URLs you create. Don't try that at home unless you know the difference between MACs and hashes, and how to avoid timing attacks.)

Whoa, whoa. Putting the state from the closure in the url is not the same as putting the closure in the url.

But you are still likely to want to sign the state so you can tell if it has been corrupted (or deliberately doctored) and reject it if so.

Re: "Unknown or expired link." - Why?

#37
post #34
post #24

Earlier quoted context omitted.

Except it doesn't appear to work robustly, which makes it poor design. "Automating boring and time consuming stuff," is all well and good if it actually produces a functional system, but that concern is secondary to robustness.

It'd work robustly enough if the links didn't expire, and if we believe other posts on this page, the links are expiring due to memory limits on the system. (The other possibility is a timeout, I guess, which is easily fixed.) If it's running out of memory to store the closures it would run out of memory to store the interaction state. In other words, there's a problem here, but it's not the programming model that pg…

Except the links do expire, so its not robust. I expect that when I visit a web page, I can let it sit for an extended period of time before moving on to the next page and have it work. HN doesn't work.

Furthermore, the technique of holding important state authoritatively in memory like this is not a good web-development practice for various reasons. Doubly so if its state data which can be round-tripped. Links should not break when the web server or cache (I'm not sure which one it is) runs low on memory. So yes, there is a problem with the programming model that pg chose.

Re: "Unknown or expired link." - Why?

#38

Earlier quoted context omitted.

You don't want to execute code from URLs. (Yes, you can use cryptography to "sign" URLs you create. Don't try that at home unless you know the difference between MACs and hashes, and how to avoid timing attacks.)

Whoa, whoa. Putting the state from the closure in the url is not the same as putting the closure in the url.

I wouldn't call it a closure unless it has something like a "next-instruction" field, which is probably enough to get control - and certainly enough to do nasty things (think 'debug-mode, 'restart-server, 'shutdown.)

Re: "Unknown or expired link." - Why?

#39
post #34
post #24

Earlier quoted context omitted.

Except it doesn't appear to work robustly, which makes it poor design. "Automating boring and time consuming stuff," is all well and good if it actually produces a functional system, but that concern is secondary to robustness.

It'd work robustly enough if the links didn't expire, and if we believe other posts on this page, the links are expiring due to memory limits on the system. (The other possibility is a timeout, I guess, which is easily fixed.) If it's running out of memory to store the closures it would run out of memory to store the interaction state. In other words, there's a problem here, but it's not the programming model that pg…

> If it's running out of memory to store the closures it would run out of memory to store the interaction state.

Not necessarily. The way I would approach this is to keep the link cache in memory, but have the links contain the minimal necessary state to reconstruct the link from disk-based storage in the case where the cache is gone. That gives the same excellent median performance without any breakage.

Re: "Unknown or expired link." - Why?

#40

Earlier quoted context omitted.

Whoa, whoa. Putting the state from the closure in the url is not the same as putting the closure in the url.

But you are still likely to want to sign the state so you can tell if it has been corrupted (or deliberately doctored) and reject it if so.

Sign or sanity check, whichever you prefer. Personally in a simple interface like this site I'd rather sanity check the few simple parameters.
Post reply on HN