Dropbox Synced Blog

Updating a Gobble blog is now much faster due to the addition of the fsnotify library. The library watches a blog’s “posts” directory and, when anything changes, causes Gobble to refresh its post and comment cache. New posts, edits and deletions now occur instantly. The old 10 minute wait for the timer to expire has gone.

In related news, the content of Simian Zombie now gets synced to the server by Dropbox. The old workflow looked like this:

  • Write a post;
  • Commit to Git;
  • Push to BitBucket;
  • Connect to server;
  • Pull from BitBucket;
  • Restart Gobble to force a refresh.

The new workflow looks like this, thanks to fsnotify and Dropbox:

  • Write a post.

Much nicer. I can even edit posts on my phone without having to use SSH and Vim.

I had a few false starts. The initial idea was to use BitTorrent Sync, not Dropbox, as I thought it would be easier to set up. Unfortunately, the documentation for CLI-only installs is half-baked and, after an hour or so of tinkering, I switched to Dropbox instead. Dropbox had its own share of issues, the most annoying of which was a segfault at startup in the current version. Switching to the latest beta fixed that.


Blogging Engines

I’ve been looking for a replacement for BitBlogger. It’s a neat little blogging system, but it has two problems:

  • AppHarbor applications get shut down after 10 minutes of inactivity;
  • It’s written in C#.

The first issue means that my BitBlogger site usually takes far too long to respond. BitBlogger is designed to use the cache exclusively to store all of its content. BitBucket notifies it of any data changes, at which point it sucks the latest version of the blogpost repository into the cache. This works well if the cache doesn’t get wiped, but every time the app gets killed the cache goes too. The application has to rebuild the cache by reloading everything from BitBucket when it gets restarted, which takes time.

I designed BitBlogger in this way to avoid spending a fortune on AppHarbor’s data storage plans, but I didn’t know about the shut down policy until later.

As for the second issue, using C# means I have to maintain a Windows virtual machine, an installation of VMWare Fusion and a copy of Visual Studio. That’s far too much overhead for something that could be written in a few hundred lines of Go and deployed on any cheap Linux server.

With hindsight, having a blog that is stored in Mercurial and gets deployed on each commit isn’t as useful as I’d hoped. There’s no way to write a post on an iPhone, for example. Something I’ve been considering lately is using DropBox for storage instead, and it seems that a few other people have had the same idea:

My favourite implementation so far is Scriptogram. Getting a blog set up is completely painless. Creating a post is as easy as writing a Markdown file in a specific DropBox folder, and syncing them just involves clicking a button on the Scriptogram website.

Scriptogram was so frictionless that I seriously considered moving this blog - I even wrote a WordPress to Scriptogram converter - until I realised that Scriptogram doesn’t have a comment system. I could add Disqus to the theme files, but I find that the comments are the best part of this blog and I don’t want to outsource their storage. It looks like we’re keeping WordPress.


Blog Upgrade - Fantastico to SimpleScripts

Finally got fed up of Fantastico’s diabolically bad release schedule. For some reason known only to the maintainers - if indeed Fantastico is still being updated - the latest version of WordPress available through Fantastico is 2.5.6. The latest stable version of WordPress is 2.7.1, and it has been out for months.

I’ve been putting off the switch because both automated installers change the default install. Swapping between them doesn’t sound too complicated, but I’m too lazy to put the effort in, particularly when I’m using slow web-based database tools. However, Simply have recently released a few scripts to automatically swap from Fantastico to their own platform.


The script doesn’t appear to work properly.


It screwed up the URL, so neither Fantastico nor SimplyScripts could work with the blog any more.

Fortunately I’d made a backup of the files and database before I started, so I:

  • Exported the blog content using WordPress’ “Export” function;
  • Deleted the existing database and files;
  • Created a new install using SimplyScripts;
  • Imported the content using WordPress;
  • Uploaded the wp-content/plugins, wp-content/themes and wp-content/uploads directories via FTP.

The blog is back and working again, and upgraded to the latest WordPress release. The only data I seem to have lost are the list of links (still got them in the DB backup) and the list of other users (99% of whom were spambot accounts anyway).

Lessons learned:

  • Backup before you start;
  • Fantastico is rubbish.