Arc Forumnew | comments | leaders | submitlogin
3 points by conanite 5794 days ago | link | parent

Minor nitpick: the introduction says "HTML and the HTTP protocol were originally designed as a way of presenting, and hyperlinking, static documents" ... but from rfc2616:

  [HTTP] is an application-level protocol for distributed, collaborative, hypermedia information systems.
And from http://www.w3.org/DesignIssues/Architecture.html (Tim Berners-Lee September 1998)

  HTTP was originally designed as a protocol for remote operations on objects, with a flexible set of methods. 
But there's a bigger question: ever since I started writing web apps, I've heard the mantra "keep no state on the server". Arc's continuation or closure thing looks like it's totally breaking the rules. "What about scalability!!", as we say in javaland. So someone's got it all wrong, and why doesn't Hacker News fall over more often?

You mention "unknown or expired link" in arc's scoreboard entry - this is due to arc's appserver harvesting old fnids (function ids). These fnids key into the closures (not continuations) corresponding to the link you clicked. This fnid-harvesting has been the subject of occasional contention on Hacker News ( http://news.ycombinator.com/item?id=169934 ).

At the risk of being totally off-topic with respect to your question: I don't know why the closure approach is always necessary: all the necessary state to vote on a submission or submit an article can easily be stored in the voting link or the submission form. I mean, to produce a HN or arc forum page, the server needs to store 30 separate closures for each article the user might vote on. Which seems a little extravagant. And whatever the benefits to server-side code readability, it results in urls that are completely opaque, which is not always an advantage.



8 points by almkglor 5794 days ago | link

> But there's a bigger question: ever since I started writing web apps, I've heard the mantra "keep no state on the server". Arc's continuation or closure thing looks like it's totally breaking the rules. "What about scalability!!", as we say in javaland. So someone's got it all wrong, and why doesn't Hacker News fall over more often?

As far as I know Hacker News is only one server. Presumably it's pretty well tuned, and besides, there may be lots of hackers there, but I'm sure the readership is much less than, say, friendster, which I'm sure has to solve larger scalability problems.

This may also very well be the reason why Yahoo rewrote Viaweb ^^

> the server needs to store 30 separate closures

Closures are cheap ^^. For example in arc2c, a closure has one cell (cell=4 bytes for 32bit, 8 bytes for 64bit) for type, one cell for length, one cell for function, and one additional cell for each captured variable. Often the captured variables are just one or two, so on a 64-bit system you're looking at 40 bytes for each closure.

On the other hand a string might take up just as much space, and would result in not-so-clear code.

-----

3 points by gidyn 5794 days ago | link

Thank you for pointing out the continuation/closure error - I've updated the site.

Perhaps for HTTP/HTML, it would have been better to say that they were originally used as ...

-----

2 points by almkglor 5794 days ago | link

If you want to be technical anyway a continuation is a form of closure. Mostly the difference is the intent of the closure: if it's meant to be the continuation of control flow, it's a continuation.

-----

3 points by conanite 5793 days ago | link

completely agree - static docs was how I understood the web for its first few years.

-----