Monday, July 9, 2012

Mozilla and Thunderbird

Let me start by saying that I have been contributing to Thunderbird for nearly 5 years. I don't have any secret knowledge; what I know that isn't public is generally had just by talking to people in private messages on IRC. All points I make in here are my own thoughts and beliefs, and do not necessarily reflect the rest of Mozilla.

To say that the recent announcement on Thunderbird's future threw people in a tizzy would be an understatement. After all, we have nothing less than apocalyptic proclamations of the death of Thunderbird. I believe that such proclamations are as exaggerated as Samuel Clemens's death notices (apologies for making a joke that is probably inscrutable to non-en-US people).

The truth is, Thunderbird has not been a priority for Mozilla since before I started working on it. There really isn't any coordination in mozilla-central to make sure that any planned "featurectomies" don't impact Thunderbird—we typically get the same notice that add-on authors get, despite being arguably the largest binary user of the codebase outside of mozilla-central. Given also that the Fennec and B2G codebases were subsequently merged into mozilla-central (one of the arguments I heard about the Fennec merge was that "it's too difficult to maintain the project outside of mozilla-central") and that comm-central remains separate, it should be quickly clear how much apathy for Thunderbird existed prior to this announcement.

As a consequence, the community has historically played a major role in the upkeep of Thunderbird. The massive de-RDF project was driven by a lawyer-in-training. I myself have made significant changes to the address book, NNTP, testing, and MIME codes. Our QA efforts are driven in large part by a non-paid contributor. More than half of the top-ten contributors are non-employees, according to hg churn. So the end of purely-Thunderbird-focused paid developers is by no means the end of the project.

There's a lot of invective about the decision, so let me attempt to rationalize why it was made. Mozilla's primary goal is to promote the Open Web, which means in large part, that Mozilla needs to ensure that it remains relevant in markets to prevent the creation of walled gardens. I believe that Mozilla has judged that it needs to focus on the mobile market, which is where the walled gardens are starting to crop up again. In the desktop world, Mozilla has a strong browser and a strong email client, and maintaining that position is good enough. In the mobile world, Mozilla has virtually no presence right now. Hence all of the effort being put into Firefox Mobile and B2G right now.

Now, many of the decisions as to the future of the project are uncertain; unfortunately, the email laying all of this out was prematurely leaked. But it is clear that Thunderbird suffers from massive technical debt: when I was pondering parts that the Gaia email app might be able to leverage, I first considered the IMAP protocol implementation and then ran out of things to suggest. Well, maybe lightning or the chat backends (for calendaring and IM, respectively), but it's clear that most of the mammoth codebase is completely unsuitable for reincorporation into another project. To this end, I think the most useful thing that could happen in Thunderbird falls under the "maintenance" banner anyways: a replacement of these crappy components with more solid implementations that are less reliant on maybe-obsolete Gecko features and that could be shared with the Gaia email app. As a bit of a shameless plug, I have been working on a replacement MIME parser with an explicit eye towards letting Gaia's app use it. Such work would be more useful than whining about the decision, in any case.

11 comments:

Stephan Sokolow said...

Glad to hear it. It always annoyed me that there was all this focus on adding features I didn't care about (eg. IM integration, app tabs, etc.) and yet the RSS support has been barely functional for years, GMail integration is buggy, etc.

I've actually been seriously considering writing my own webmail dashboard to handle Google-free mail, RSS, TODO, and widgets to coincide with a move off GMail, but I can never seem to find the time.

Maybe with more focus on maintenance and refactoring, the Thunderbird codebase will become friendly enough for me to contribute fixes instead.

gerv said...

Joshua: where can we read about the Gaia email app, and its architecture?

What the world could really do with is a IMAP mail client all in JS. This could be used by ISPs to provide webmail, by people self-hosting and wanting web access to their existing IMAP account, as part of a B2G mail app (with a different UI)... all of these things require basically the same moving parts.

Is that what we are doing with the Gaia email app?

Paul [sabret00the] said...

I've got to admit, I don't understand why an Email App was made for Gaia which didn't incorporate Thunderbird code or vice versa. That's totally illogical and defeats the purpose of the Mozilla Platform. On top of that, Mozilla does lack relevance in the mobile space, but if there's more than a single point of entry to Mozilla land, everyone benefits and that's a huge thing that hasn't happened (Thunderbird for Android). The problem seems to be that the platform is broken. I've blogged out it, everyone has probably read it and I stand by that. There needs be more abstraction between the platform and the products and more shared resources. If Thunderbird for Android doesn't happen soon, then Mozilla will once again be forced to play catch up.

Joshua Cranmer said...

gerv: See this link: https://wiki.mozilla.org/Gaia/Email. My understanding is that the the app will be pure JS.

Paul: The Gaia app wants to be pure JS, whereas Thunderbird is presently almost pure C++ (at least as far as the backend is concerned). Given that UI is not portable in practice, it means the intersection of what Thunderbird has that Gaia could use is almost completely empty. Even if it weren't empty, enough of our could is sufficiently old and crufty that there is remarkably little that I would want to share.

That said, I want to be able to share the Gaia code in the long run with Thunderbird.

ael said...

"Mozilla's primary goal is to promote the Open Web, which means in large part, that Mozilla needs to ensure that it remains relevant in markets to prevent the creation of walled gardens"

I would see Thunderbird as having an important role to play here. The existence of desktop clients is what stops users from being forced into the cloud for email (and usually from one of a small number of large companies, if you desire a reasonably polished web interface).

Making it possible to sustain this in the future by combining it seamlessly with access to one's email from both mobile devices (Gaia) and access via the web (e.g. while travelling) would be a worthy goal.

I hope very much this announcement doesn't stop that from being pursued. The assumption that "everybody" "wants" (or should want) to move to webapps shouldn't lead to a steady degrading of user control over their data.

Paul Morris said...

I would speculate that Mozilla will eventually also offer a version of the Gaia HTML5 email app for use on the desktop, available for free from the Mozilla Marketplace. It would be a great flagship HTML5 app, demonstrating the viability of offline storage and offline use, etc.

They would then have a new single cross-platform email-app codebase for the desktop, their mobile Firefox OS, and presumably other mobile platforms too (Android, iOS). You could use the same Mozilla email app on your computer and on your phone (and eventually tablet). As an HTML5 app it would easily tie into all their work on identity, social, contacts, sync, etc. that they’ve got cooking.

As gerv said the code could also be used by ISPs (and self-hosters) to provide webmail.

This approach also basically lines up with their earlier Raindrop labs project, which was web-based, and the Kilimanjaro integration project.

In the process they will get to start over rather than having to keep working with Thunderbird's older codebase.

ael said...

Paul Morris: While I hope you are right, it will take a very long time for the Gaia app to reach anything close to feature parity with Thunderbird. And in the interim, things do not stand still.

It would be nice to be reassured that this is a transition that is actively managed (if there is to be one as you suggest) so as to make it painless for the user. Making people worry (intentionally or not) whether they can rely on a crucial piece of software to grow with their needs in the future or not is already a cost.

Paul [sabret00the] said...

@Joshua: Let's be honest here, B2G is a very ambitious project. It's entering a very competitive market where huge companies are failing with resources beyond the imagination of most mere mortals. It's trying to do this by attempting to be what ChromeOS is trying and failing to be. On top of that, the hardware partners that Mozilla has at this point are minnows in comparison to what is the current trend in handsets. The goal of B2G is admirable, but it should've always had a firm eye on improving the platform code and modernising that, instead it's pretty much it's own secluded entity. That's a failure by Mozilla as a whole. There are some fundamental problems in which the Mozilla Platform is so completely product tied and that's why we had the recent uproar concerning the future of XUL Runner. Even looking at Fennec, there should've been more effort to the code more abstract and thus give the likes of Thunderbird a change to piggy-back the work done there. Perhaps if the abstraction of code had been a priority with the switch to the new release cycle we wouldn't have these problems. I went into further detail about this a while back[1]. As things currently stand, and with the current approach, things like Thunderbird will be left by the wayside and while we'd all like something more open than Android, it's growth isn't slowing but rather hastening. At which point, doesn't it simply become a question of where do we go from here? I asked in a blog post ten months ago if "Is it possible to arrive at any other conclusion than Thunderbird is doomed?" and sadly the answer is an emphatic NO. This product driven code-base is backing Mozilla into a corner quite contrary to the platform drive code-base that should invite companies, organisations and developers to develop their apps on the Mozilla Platform. That is how you grow you resources. You don't just hope they'll turn up of their own accord on a whim.

[1] http://s00techified.wordpress.com/2011/11/15/soo-is-it-time-for-a-more-modular-approach-to-browsing/

Paul Morris said...

ael: Those are good points. I'm just trying to figure out how email/messaging might fit into the future Mozilla is charting for itself. Since it's not Thunderbird, maybe it will be an html5+JS open web app (call it html5bird?). That seems like the next best possibility to me, especially with the emphasis on "the web is the platform." But you're right, getting from here to there would have its costs.

Joshua Cranmer said...

@sabert00the: I am not going to comment on the wisdom of B2G. It's not my decision, and I have nothing personally invested in its outcome.

kairo said...

Joshua, once again, I find your words absolutely spot-on.
I have said for a while that while I think the UI and overall make-up of Thunderbird and SeaMonkey mail/news makes them the best messaging clients out there, I have learned to despise the core mail/news code by the experiences I had with it and people working on it, and I'd cheer for it being tossed into the trashbin (which of course needs replacements first).
I strongly believe that basically only a rewrite of its internals can make the Mozilla mail/news software have a future. The Gaia email app may be the best starter for that, actually.

And Thunderbird should very well be able to bridge the gap with community development and Mozilla infrastructure and maintenance.SeaMonkey is doing well with even less Mozilla involvement.