The reason I like static site generators so much is because it allows me to treat my website as a program that outputs a website. Take some posts in whichever format you prefer, write a program to parse them as a tree of HTML nodes, insert them into templates for HTML pages, Atom feeds, etc. It's all just plain text code and markup, no stateful database with a dynamic web application in front doing everything.
Have you had a look at Pollen, by Matthew Butterick?
Static Website Generators Are the Next Big Thing
111–120 of 187 posts
Re: Static Website Generators Are the Next Big Thing
#112Earlier quoted context omitted.
"Statically generated JSON resources" implies client-side rendering, and I suspect you'd find some disagreement over whether that's really static. If there's only one such resource per page, then maybe, though you'd still be losing some advantages wrt caching. If the JS running on the client has to fetch many such resources and stitch them together, then it's functionally equivalent to a standard dynamic website and…
How do you figure that loading a static file is the same as a DB query? Even if the actual finding of the bits on the hard drive and sending them across the wire is close to the same, you don't need a database running. You get to shut down an entire process, or depending on your architecture, an entire server. Heck, once CDNs and caching get involved, I wonder how many requests will even hit your HTTP process at all.
Re: Static Website Generators Are the Next Big Thing
#113I'm not entirely sure they're the next big thing. More likely, is that 15 years ago, it was people who were used to static sites began moving to dynamically generated ones as sites became more complex. They were the new thing then. Now we have a load of people who have grown up with dynamically generated sites and are suddenly discovering the benefits of static sites - thanks in part to the proliferation of tools tha…
Re: Static Website Generators Are the Next Big Thing
#114I'm not entirely sure they're the next big thing. More likely, is that 15 years ago, it was people who were used to static sites began moving to dynamically generated ones as sites became more complex. They were the new thing then. Now we have a load of people who have grown up with dynamically generated sites and are suddenly discovering the benefits of static sites - thanks in part to the proliferation of tools tha…
Back then, this really had some advantages: Updates were rare, but views comparably frequent, while databases were either not that performant or quite expensive. This way, you could serve everything from cache (remember Squid?), and, compared to a dynamic site, it was really quick, even in admin-mode. Given the modern machines and the lots of memory they come with, it's quite ironic to see this come back, while we saw the triumph of the LAMP stack on comparably modest machines. Nevertheless, if you've only a few updates and lots of views, it's a good idea towards green computing. (Save some mountaintops! [1])
On the other hand, there is some "magical" limit regarding flexibility and complexity, where things tend soon towards unmaintainable code. So, the judgement is left to you, respective to the purpose.
Edit: [1] "Mountaintop mining" at Google-images: https://www.google.com/search?tbm=isch&hl=en&q=mountaintop+m...
Re: Static Website Generators Are the Next Big Thing
#115Earlier quoted context omitted.
Do you - or anyone - have stats about the possible traffic demands of Slashdot/Reddit/HN front page stardom? I'm very much in the Nginx/static camp, but it would be useful to know how bad the spikes can get.
I spoke with Alan Bellows from 'Damn Interesting'[0] on Reddit after his site hit the front page via a TIL post and he revealed a little about the traffic load.[1] It was very interesting to see and was quite a lot of traffic for sure. Bear in mind that the screenshot he posted is for concurrent visitors too. [0] http://www.damninteresting.com/ [1] https://www.reddit.com/r/todayilearned/comments/3d3vct/til_a...
Re: Static Website Generators Are the Next Big Thing
#116Earlier quoted context omitted.
How do you figure that loading a static file is the same as a DB query? Even if the actual finding of the bits on the hard drive and sending them across the wire is close to the same, you don't need a database running. You get to shut down an entire process, or depending on your architecture, an entire server. Heck, once CDNs and caching get involved, I wonder how many requests will even hit your HTTP process at all.
Loading the set of files needed to satisfy a request is equivalent to a database query. Databases and file systems have to deal with similar issues when looking up a single item, so there's a clear correspondence there. The difference is that a database can do a JOIN but a file system can't (directory traversals really aren't equivalent). In that case any such logic would have to be in the client-side JS, fetching ob…
The DB is truly the scalability bottleneck.
Re: Static Website Generators Are the Next Big Thing
#117When I was heading up reliability at Netflix, we considered, and even began evaluating, turing the whole thing into one big static site. Each user had a custom listing, but generating 60+ million static sites is a very parallelizeable problem. At the time, the recommendations only updated once a day, but an active user would have to dynamically load that content repeatedly, and at the same time, the recs were getting…
Re: Static Website Generators Are the Next Big Thing
#118I've been a fan of static websites for a long while now. In addition to page load issues, they also more or less completely solve the Slashdot effect (aka the Reddit Hug Of Death, these days). A competently-configured Nginx server on a 512mb VPS, serving static-only content, will handle ridiculous amounts of traffic without flinching. Ever since a front-page mention on BoingBoing took down my feature film BloodSpell'…
Do you - or anyone - have stats about the possible traffic demands of Slashdot/Reddit/HN front page stardom? I'm very much in the Nginx/static camp, but it would be useful to know how bad the spikes can get.
Re: Static Website Generators Are the Next Big Thing
#119You know what I've always wanted, but my searches have led me to believe that it (inexplicably) doesn't exist? I want a simple site generator. I don't want markdown, I don't want a fancy templating engine. I want some simple templating system that takes in normal HTML and generates pages from simple templates I define. I want to shove in some arbitrary HTML and have it spit out a site using some base templates. To th…
Re: Static Website Generators Are the Next Big Thing
#120I'm not entirely sure they're the next big thing. More likely, is that 15 years ago, it was people who were used to static sites began moving to dynamically generated ones as sites became more complex. They were the new thing then. Now we have a load of people who have grown up with dynamically generated sites and are suddenly discovering the benefits of static sites - thanks in part to the proliferation of tools tha…