<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/rss-style.xsl"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>troglodyne.net</title>
<link>http://troglodyne.net//posts/3a305a13-2c44-11ec-9ffd-c91fc93185c0?format=xml</link>
<description>troglodyne.net : /posts/3a305a13-2c44-11ec-9ffd-c91fc93185c0</description>
<language>en</language>
<pubDate>2026-04-25T10:47:38</pubDate>
<lastBuildDate>2026-04-25T10:47:38</lastBuildDate>

<image>
<title>troglodyne.net</title>
<url>/favicon.ico</url>
<link>http://troglodyne.net</link>
<width>32</width>
<height>32</height>
<description>troglodyne.net favicon</description>
</image>
<item>
<title>2 Major paths to take advantage of CDNs</title>
<link>http://troglodyne.net/posts/3a305a13-2c44-11ec-9ffd-c91fc93185c0</link>
<description><![CDATA[<p>
When considering a switch from traditional web hosting to something like S3 (or ipfs) plus <a href="https://workers.cloudflare.com/">web workers</a> or equivalent stateless compute resources (GKP, Lambda, etc) you need to re-think how you deploy your applications.  Many of the complex backends that you are used to are simply not feasible to have on the live web with this model.  That said, it's not hard to write CGIs in a stateless fashion, and many only keep their state client side or in a database, which is a model that works just fine here.
</p>
<p>
That said, most of your backend probably doesn't even need to be public. It could easily be behind a firewall and just push updates to your staging and production buckets and workers.  In fact, I'm considering this model for <a href="https://github.com/Troglodyne-Internet-Widgets/tCMS">tCMS</a> right now!  There's no good reason why I need the login functionality public, at least for post editors -- all of them could run a local instance and push out updates supposing I had an <a href="https://github.com/rqlite/rqlite">rqlite</a> backend data storage sitting in a bucket as a <a href="https://github.com/rqlite/rqlite/blob/master/DOC/READ_ONLY_NODES.md">read only node</a>, with the editors behind firewalls doing the RAFT thing.
</p>
<p>
From there the question is whether to do static generation or load sqlite with <a href="https://github.com/sql-js/sql.js">sql.js</a> and do everything client-side (or a combination of both).  Static versus dynamic web pages is well trod ground at this point so do what feels best for your application.  Personally I will probably go with static generation as I prefer to run as little as possible on the client machine to get the best user experience.
</p>
<p>
The big drawback to using <a href="https://en.wikipedia.org/wiki/Infrastructure_as_a_service">IAAS</a> is (historically) higher TCO and a lack of good abstractions making it easy to self-host under such models.  Things like <a href="https://www.openstack.org/">OpenStack</a> make self-hosting possible, but prohibitively expensive and it feels like swatting flies with an elephant gun for most webmasters.
</p>
<p>
Even containerization and it's orchestration tools require a lot of extra thought and code versus the traditional <a href="https://en.wikipedia.org/wiki/LAMP_(software_bundle)">LAMP</a> approach.  What's really needed to swim in both pools easily are some abstractions to make it easy for you to:
<ol>
    <li>Treat local directories like they are S3 buckets (and/or ipfs tokens) so you have flexibility for storage deployment</li>
    <li>Treat local httpds like they're a web worker API you deploy to, rather than vhosts</li>
</ol>
Implementing such tools would effectively allow <em>any</em> shared host to transition their existing infrastructure into such products, albeit without automatic scaling on their end.
That said, if multiple servers are supported in a sort of federated model (again, likely mediated thru rqlite), that would largely ameliorate such concerns.
</p>
<p>
For S3, <a href="https://github.com/gaul/s3proxy">s3proxy</a> is exactly what we are looking for.
As to an imitation of web workers (or other "stateless" compute resources), that would be far more complex given there is no standardization across vendors.
</p>]]></description>
<author>george</author>
<guid isPermaLink="true">http://troglodyne.net/posts/3a305a13-2c44-11ec-9ffd-c91fc93185c0</guid>
<pubDate>2021-10-13T16:40:08</pubDate>
<enclosure url="http://troglodyne.net/posts/3a305a13-2c44-11ec-9ffd-c91fc93185c0" type="text/html" />
</item>
</channel>
</rss>
