If geeks love it, we’re on it

Building an open source bridge

Building an open source bridge

Wordpress and Vanilla Glue plugin

This site and a few others we own have some very unique features when it comes to the commenting section. When you’re reading an article, like this one, it appears to have normal WordPress comments. When you’re in the forum, it appears to have a normal discussion. The magic is that they’re perfectly synched without the use of iframes (embedding a web page within a web page, which is how Facebook, Disqus et. al. make their systems work).

The other bit of magic, visible only to our members and writers, is the invisible single sign-on. You’d never know you were leaving Vanilla and going to WordPress on our sites. Your identity follows you perfectly and seamlessly. And, guest comments show up in Vanilla, which Vanilla does not natively support in any way.

All this happens with Glue, a pair of plugins (one for WordPress, one for Vanilla) I started writing more than two years ago. But, I’m not here to tell you about Glue’s magic. I’m here to tell you about Glue’s warts, because they’re much more interesting.

Lumps in the Glue

The first thing you’d notice about Glue is that the README contains more warnings and situations where you should not use Glue than it does actual information about Glue. That’s because Glue is an asshole.

When you’re making software work in ways it wasn’t meant to work, there are a lot of tradeoffs. When that software is open source and outside your control, it cares not for how many late nights you spent getting everything just so. Every new release could be fine, or it could ruin everything. Connecting two open source products doubles your fun—there can never be a final, stable release that you let ride off into the sunset. Committing to a hack like this—one that sits at the foundational level of your sites—commits you to re-hacking it for time immemorial.

Such a commitment isn’t for the faint of heart. My solution is to cheat (a little). In this case, I actually work for one of the open source platforms (Vanilla) so if there’s some benign extra bit of code I can insert to make Glue work again, it’s only a few keystrokes away from being in the next release. Think it’s silly to check if we have a valid UserID here? Well, that’s because you’re not using Glue! That said, the issues are surprisingly few.

The lack of major changes necessary is because of how fault-tolerant Glue was made to be. Connecting systems is a frequent goal of hacky little projects like mine, and I see one glaring error in many of them: they try to change how one of the products works. Here’s a prime example: Yes, Glue syncs your users. However, it doesn’t do this by making WordPress read Vanilla’s users, or vice versa. Anything like that is fraught with peril that will absolutely break by the next major release of either project. Instead, Glue passively copies new Vanilla users to WordPress, and just tells WordPress to not let anyone register. This way, both systems carry on their merry way, never the wiser that the other even exists. The less code you write, the less there is to break.

No matter how slick I make Glue to use for folks where it is installed, it will be very painful to administrate. If you don’t see live-editing a database to fix your admin permissions as a trivial activity, you’re gonna have a bad time. This is the ultimate cost-benefit tradeoff every developer faces: the time involved to simplify Glue’s installation vastly outweighs its use to me. I only had to install it on my sites once, and I may never need to do it again. Fixing the half hour (or more) painful installation into a graceful three minute installation could easily take an entire week. And so, my poor little open source project will never get much love or attention because the entrance barrier is so high.

The ambassador

But, the barrier wasn’t too high for a brave few. This year, a couple folks contributed back some patches for Glue. Somewhere out there, someone has rolled the dice and made their sites dependent on my little plugins. It’s a weird feeling to know something you built yourself is out there doing work in environments you’ve never seen before. But, it’s a very gratifying feeling when someone cares enough about your project to help you make it better.

Glue is the ever-evolving solution to my thorniest website problem, the unsung hero holding my websites together. And it’s my tiny personal ambassador to the world of open source.

Comments

  1. Straight_Man
    Straight_Man Thanks for the summary, Lincoln.
  2. Shadowdare
    Shadowdare I also thank you for the summary, Lincoln. Glue is great! I've used it on a couple of websites and the community loves the forum features and the writers love WordPress for nice article management. I'm still wondering, though, what are the bad points of using the official iFrame method for comments?
  3. Linc
    Linc
    I'm still wondering, though, what are the bad points of using the official iFrame method for comments?
    iFrames can have negative search engine effects, increase load time because you're rendering a second web page, and are the ultimate non-semanitc HTML.
  4. PirateNinja
    PirateNinja It's a nice feeling to share something useful with the world. Mergin Vanilla and Wordpress at any level seems like it would be a pretty large pita. On that note...
    because Glue is an asshole.
    Thanks for sharing some insight in to your open source asshole.
  5. ardichoke
    ardichoke
    your open source asshole.
    Do they make a cream for that?
  6. CyrixInstead
    CyrixInstead Great article, I hope your project gains some traction.

    I had Wordpress and bbPress integrated on a site once upon a time and it was horrible. If the makers of WP struggle to make it play nice with their own forum software (OK bbPress was WP's ginger-haired cousin), then full credit to your for your endeavor.
  7. Linc
    Linc @CyrixInstead I've long maintained that Vanilla plays nicer with WordPress than bbPress, with or without Glue. It comes with a lot of tools out-of-the-box and a special plugin for WordPress that integrate them nicely.

    Re: gaining traction - don't say that, the idea of people relying on my hackery terrifies me! :p
  8. CyrixInstead
    CyrixInstead Well if it's useful then why not? I may well use it next time I have to build a site running forums. I hope the tech support for it is useful ;)
  9. Nate_LapT Tried glue back when you did the initial launch. Almost had my system working. Then something put me at a standstill and I gave up. Mostly for being a lazy admin and life had more important things.

    We're migrating our site in the near future and will be attempting a site overhaul so I'm planning to give glue another shot and see if it works out.

    Thanks
    -Nathan

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!