1. Kyle Mahan

    have to admit, the more I think about solutions to fragmentation, indexing, caching, etc. the more appealing a DB looks :P photo.jpgTantek‘s storage format is pretty inspirational though, durable, inspectable, and space-efficient… and his site renders crazy fast compared to most other home-rolled CMSes

  2. xtof

    @Fred,

    J’essaye de retrouver la main sur ce vieux blog WordPress abandonné sur lequel j’étais parvenu non sans peine à implémenter webmention.

    Pour ton information, je n’ai pas activé plugin IndieWeb, mais juste le plugin Webmention.

    En attendant le prochain indiewebcamp Paris, puis-je te recommander calmement de monter calmement sur l’échelle l’indiemark et passe tout d’abord au moins les niveaux 1 et 2. (Je n’y suis pas encore parvenu.) Tout prêt à t’aider sur microformats2 et l’implémentation IndieAuth.

    indiewebify-dumeny

    Source indiewebify.me

    Reparlons-en de vive voix quand tu veux avec des experts. Si tu es vraiment pressé, pose directement tes questions sur l’irc : canal #indieweb sur freenode.

    Impatient d’imaginer nos prochains échanges avec webmention ! Bon dimanche.

    Bon weekend.

  3. Kyle Mahan

    Made two minor speed improvements to the software that runs this site last night.

    First, I started resizing foreign avatars when mirroring them to the local server. So now reply contexts and sparklines don’t have to load the person’s full resolution picture. This is also nicer when viewing through a feed reader like photo.jpgBarnaby Walters‘s Shrewdness where my CSS is obviously not available.

    The larger improvement came from using the nginx header X-Accel-Redirect when sending images associated with posts. This allows images to serve directly from nginx and without passing through Python, even though they are not in the static folder (and can even be protected by access controls).

    In the following two configurations to nginx, internal means that these URLs are not accessible unless there is an internal redirect to them. alias means that resources at https://kylewm.com/internal_data/{some/path} will be served from /home/kmahan/redwind/redwind/_data/{some/path}

    location /internal_data {
        internal;
        alias /home/kmahan/redwind/redwind/_data;
        expires 30d;
    }
    
    location /internal_resized {
        internal;
        alias /home/kmahan/redwind/redwind/_resized;
        expires 30d;
    }
    

    The change in my blog code was pretty trivial. Instead of calling Flask’s send_from_directory to proxy all those bytes through Python, I instead send back an empty response with X-Accel-Redirect header.

    resp = make_response('')
    resp.headers['X-Accel-Redirect'] = '/internal' + sourcepath
    del resp.headers['Content-Type']
    return resp
    

    Removing the Content-Type header means that nginx will decide what content type to send.

    Thanks main_image.jpgMatt Spitz for the super helpful post on the subject!