<?xml version="1.0" encoding="utf-8"?>



<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:fh="http://purl.org/syndication/history/1.0"
    xmlns:at="http://purl.org/atompub/tombstones/1.0">

    <title>Publ: Development Blog</title>
    <subtitle>A personal publishing system for the modern web</subtitle>
    <link href="http://publ.beesbuzz.biz/blog/feed?tag=rumination" rel="self" />
    <link href="http://publ.beesbuzz.biz/blog/feed" rel="current" />
    <link href="https://busybee.superfeedr.com" rel="hub" />
    
    
    <link href="http://publ.beesbuzz.biz/blog/" />
    <fh:archive />
    <id>tag:publ.beesbuzz.biz,2020-01-07:blog</id>
    <updated>2018-09-29T21:00:00-07:00</updated>

    
    <entry>
        <title>Some thoughts on WebMention</title>
        <link href="http://publ.beesbuzz.biz/blog/113-Some-thoughts-on-WebMention" rel="alternate" type="text/html" />
        <published>2018-09-29T21:00:00-07:00</published>
        <updated>2018-09-29T21:00:00-07:00</updated>
        <id>urn:uuid:1030017a-6302-5f07-9b58-74defffe7906</id>
        <author><name>fluffy</name></author>
        <content type="html">
<![CDATA[
<p>So, for the last couple of days I&rsquo;ve been playing with some of the <a href="http://indieweb.org">IndieWeb</a> concepts, in particular <a href="https://indieweb.org/Webmention">Webmention</a>. Spurred on by a <a href="https://queer.party/@fluffy/100800119621478938">helpful thread with Kevin Marks</a>, I took some time to actually do a <a href="https://github.com/fluffy-critter/Publ/tree/feature/128-webmention">rough implementation of outgoing Webmentions</a>, and also did some of the work to set up the <a href="http://microformats.org/wiki/h-card"><code>h-card</code></a> and <a href="http://microformats.org/wiki/h-entry"><code>h-entry</code></a> microformats on <a href="http://beesbuzz.biz">my main site</a>.</p><p>As far as I can tell, it works great, but I&rsquo;m also not going to actually merge this to master or push it to production. Read on to see why!</p>

<p>When I started Publ, it was with the very specific goal of providing the publishing mechanism for a content store. Given content files and templates, format them into reasonable web-friendly HTML and Atom and whatever else the templates do, in a basically-stateless manner, and do a great job of providing high-quality image renditions and generated CSS and so on, while also supporting things like legacy URL mapping and automatic redirection and so on.</p><p>Basically, be like a static publishing system, but dynamic.</p><p>I want Publ to be the publishing and formatting part of an open, dynamic, independent web. I do truly believe in the IndieWeb mission, and absolutely want to see it become successful! However, I feel like Publ&rsquo;s role is best served as one of many interlocking parts to make this work.</p><p>Supporting Webmention correctly means having the following:</p>
<ul>
<li>Automatically send out Webmention pings based on content changing</li>
<li>Automatically receive and handle Webmention pings as they come in</li>
<li>Provide structured metadata about the page content so that pings get credibly formatted on the receipient&rsquo;s end</li>
</ul>
<p>It also has a few other fun implications, like:</p>
<ul>
<li>Have a canonical URL for the content, generated by the publishing system itself, regardless of how the incoming traffic is routed to it</li>
<li>Send updates as often as things change, but no more often than that</li>
<li>Keep track of updates being sent (rather than just spamming everyone else with spurious updates)</li>
<li>Generally, be stateful</li>
</ul>
<p>And being stateful is a thing that flies in the face of the overall Publ design.</p><p>(So is the canonical URL thing, for reasons not worth getting into here, but briefly, things like staging/local/debug instances vs. the final production endpoint with any number of domain name normalizations and selections of protocol and so on. It&rsquo;s messy and not something that&rsquo;s easy to configure, and is impossible to detect in a way that&rsquo;s consistent with what the outside world sees.)</p><p>The way I see it, this stuff is better left to external tools. Publ is for managing and formatting content. There are plenty of other tools that can be integrated <em>into Publ templates</em> to provide IndieWeb functionality in the way that seems most fitting to the person running the site.</p><p>For receiving WebMentions you can use <a href="https://webmention.io">webmention.io</a> or <a href="http://brid.gy">brid.gy</a> or <a href="http://webmention.herokuapp.com">this Disqus-like webmention endpoint thingamajig that&rsquo;s currently in early alpha</a>. For sending WebMentions you can use <a href="https://telegraph.p3k.io">Telegraph</a> or <a href="https://github.com/vrypan/webmention-tools">webmention-tools</a> or <a href="https://github.com/bear/ronkyuu">ronkyuu</a> or any number of other tools for sending mentions out. All of the configuration for the inbound webmentions, and for your semantic markup on your templates and so on, belongs in <em>your templates</em>, for what you think makes the most sense for <em>your setup</em>. There is no reason for it to actually be integrated into Publ.</p><p>A similar story exists for <a href="https://www.w3.org/TR/websub/">WebSub</a>. Publ doesn&rsquo;t know &ndash; nor should it have to know &ndash; what templates correspond to RSS or Atom feeds. It doesn&rsquo;t know (or want to know) which of those feeds are affected by which category posts. It shouldn&rsquo;t have to be configured with any mappings for which categories trigger which templates&#39; updates, or which hub(s) those updates should be published to.</p><p>These are all better served by external tools that you, the publisher, configures to work the way you want them to.</p><p>So my proposal for supporting this stuff:</p>
<ul>
<li>Have a cron job that checks your feeds to see if they&rsquo;ve updated</li>
<li>When they do, run the appropriate tools to do the job of sending out notifications</li>
</ul>
<p>To this end, I might start a separate project that lets you set up these mappings yourself, to be run as a sort of controller thing. It wouldn&rsquo;t be at all integrated into Publ; indeed, it would work with any CMS that exports a feed or whatever. It would be configured with the following:</p>
<ul>
<li>One or more feeds to check</li>
<li>Various plugins/actions to perform on those feeds</li>
</ul>
<p>For example, a site&rsquo;s master feed would have a WebMention task which would go through every entry in the feed, and does the following:</p>
<ol>
<li>Fetch every referenced item</li>
<li>If the item has changed, parse it for all <code>&lt;a href&gt;</code> elements and send WebMentions</li>
</ol>
<p>And they could also have a WebSub task which would simply:</p>
<ol>
<li>See if the feed has changed</li>
<li>If so, send a WebSub notification to the hub of your choice</li>
</ol>
<p>These tools can be <em>simple</em> and <em>elegant</em> and work universally across all of your sites, not just Publ ones! Got a Wordpress site? This will work with it! Got a Tumblr site? This will work with it! Got a YouTube channel? <em>This will work with it.</em></p><p>And in the Publ case this also settles the canonical URL issue because it&rsquo;s based on what the external tool sees, which is what the rest of the Internet should see &ndash; not based on whatever whimsical, fragile, momentary state might be the case due to it running on <code>localhost:5000</code> or your private firewalled staging/preflight instance or whatever.</p><p>And this also gets along perfectly with another notion I had going into this &ndash; having services to syndicate content into a Publ site by reformatting an external Atom feed into an entry, for example. Want to automatically post all your Flickr items to a gallery on your Publ site? Use their <a href="https://www.flickr.com/services/feeds/">Atom API</a>. And the very same kind of simple tool can, for example, re-post your itch.io devlogs or your Tumblr reblogs or your YouTube videos or <em>whatever</em>.</p><p>I am entirely a fan of small tools doing simple things, and composing tools together. The world of CMSes already has too many <a href="https://amzn.to/2pKzIoK">Swiss army knives</a>. Let&rsquo;s keep our tools simple, doing a few things well, and have them work together with other tools.</p><p>I will absolutely have Publ support Webmention and WebSub and so on, in <em>the best way possible</em> &ndash; by doing nothing, and not getting in the way of other tools that can do it better.</p><p>Publ is a puzzle piece, not a complete solution.</p>

]]>
        </content>
    </entry>
    
    <entry>
        <title>So much for Dreamhost</title>
        <link href="http://publ.beesbuzz.biz/blog/358-So-much-for-Dreamhost" rel="alternate" type="text/html" />
        <published>2018-05-25T21:42:32-07:00</published>
        <updated>2018-05-25T21:42:32-07:00</updated>
        <id>urn:uuid:1c5aad01-e4f5-4c6c-8322-941734f47fe6</id>
        <author><name>fluffy</name></author>
        <content type="html">
<![CDATA[
<p>One of the overarching reasons I decided to build Publ the way I did was in order to take advantage of Dreamhost&rsquo;s support for Passenger WSGI. I was expecting that to be the primary means of hosting my main site (which is way too big for a Heroku instance) and given how smoothly things were working with this site on Dreamhost I figured it wouldn&rsquo;t be a big deal.</p><p>However, there was a <em>huge</em> monkey wrench thrown into things when I switched my site&rsquo;s configuration over to Passenger; despite all of my configuration being exactly the same between publ.beesbuzz.biz and beesbuzz.biz, the rendition cache on beesbuzz.biz was getting its permissions set wrong, and there was some rather weird behavior with how it was making the temporary files to begin with.</p><p>In investigating this I attempted to upgrade my packages on publ.beesbuzz.biz, and all h*ck broke loose.</p>

<p>Basically, Dreamhost, being shared hosting, is in the business of overselling capacity. They used to do a very good job of managing their capacity. But then things like WordPress happened, and more sites got bigger and more complex and started taking way more memory, and for whatever reason Dreamhost decided that they would shift towards <em>only</em> supporting sites built in WordPress (or basic static hosting), and then they started getting increasingly more aggressive about their &ldquo;procwatch&rdquo; process-killer, and somewhere along the line it reached a tipping point where now you can&rsquo;t even run <code>pipenv install</code> without tripping their process monitoring.</p><p>I must have just been at the knife&rsquo;s edge of that with publ.beesbuzz.biz, because spinning up a second Publ app was too much for it to handle.</p><p>So, for now, <del>I&rsquo;ve rolled beesbuzz.biz back to my old MovableType-based site</del>, I have made the Heroku instance of publ.beesbuzz.biz the official one (if you are reading this then great, DNS has propagated!), and I am going to look into deploying Publ on my <a href="https://www.linode.com/?r=3387618616c77ee52a3a617c0218697a9c36bc9b">LiNode</a> VPS, which it turns out has <em>way</em> more capacity than I&rsquo;m using (thanks to them having given me incremental upgrades over the 6.5 years I&rsquo;ve been with them) and which should be just fine for this purpose.</p><p><mark>UPDATE</mark>: I have now deployed the new beesbuzz.biz on my LiNode VPS and it went off without a hitch, although DNS is probably going to take a while to propagate. Configuration is a bit fiddly though, and I&rsquo;d really like this to be easy for non-server-experts to do!</p><p>In the long run I&rsquo;m going to move my stuff away from Dreamhost, because beesbuzz.biz was my last major site running there and at this point I&rsquo;m basically paying $7/month for mediocre DNS service.</p><p>So, while setting things up on <a href="https://www.linode.com/?r=3387618616c77ee52a3a617c0218697a9c36bc9b">LiNode</a> is going to be more difficult, that is what I&rsquo;ll be going with for now (mostly because my LiNode plan just renewed like a month ago so I have two more years prepaid anyway).</p><p>In the longer term I&rsquo;m going to look at other webhosts; <a href="https://www.webfaction.com">WebFaction</a> looks pretty good, for example, and they come highly-recommended in the Python developer community. And their pricing is quite competitive!</p><p>Anyway, getting Flask running on gunicorn with an Apache reverse proxy was fairly straightforward. It&rsquo;s not the simplest thing to get going but at least I have a <a href="http://beesbuzz.biz">working site</a> (modulo DNS caching, anyway). Hopefully I can get my SSL sorted out soon too.</p>

]]>
        </content>
    </entry>
    

    
</feed>