Summary:
I will describe each point in more detail below.
I would like to put this up for discussion. I have not discussed this with the rest of the council yet, but rather I start the discussion here, to make it public, so that everyone can follow the discussion.
Ultimately, this will be a team effort. The TB Council, even with employees, will not be able to do this alone. I hope that Thunderbird can fund a number of developers on this, but I would like this to be an open-source project in the sense that everybody can participate. Please see this also as a call for help. If you are an experienced JavaScript developer who already wrote applications and libraries in JavaScript, please step forward and write us that you want to help.
I've been working on Thunderbird since 18 years, and I care about
it a lot. More importantly, I care about communicating with my
friends in a way that's private and not controlled by any single
entity, but decentralized and running and stored on my own
computer. In other words, we need a desktop (or smartphone) email
client. Not just today, but also 30 years from now, if the world
didn't collapse until then.
This is important for the freedom of the individual, of
communication, and of computing. There are not many contenders
left that defend the freedom of communication, because most have
an interest to bind users to their own services. If I want to
communicate with teenagers today, or even my mother, the best way
is WhatsApp or SnapChat, closed systems. In order to make a
different in this world, Thunderbird needs to be a viable option,
not just next year, and not only for the existing userbase, but
for the whole world, all age groups and all usage patterns. The
current Thunderbird codebase has served well - 25 million users
are amazing - but will not be able to defend freedom for all of
us. Given the current technical challenges we face, this is the
perfect time for a fresh start.
Firefox has discontinued the Firefox XUL extensions, killing tens
of thousands of small projects this way. This is a massive cut
that goes to the base of Firefox. They did that, because these
extensions use XUL and XPCOM, and this is preventing Firefox
developer from making more drastic changes in the internal
architecture. They are gradually moving to using some Rust
components, which means the XPCOM base is no longer viable. At the
same time, they also want to gradually decrease reliance on XUL in
favor of HTML, and remove parts of the XUL implementation that
they no longer need to run Firefox. That's why they remove XUL
extensions. Thunderbird heavily relies on XUL, all its UI is
written in XUL. Some parts of XUL - esp. some features of the tree
widget - were back then written only for Thunderbird. We can
expect breakage in this area, as Mozilla has clearly stated that
they will no longer care about breaking Thunderbird. In fact, I
think this problem is part of the motivating force behind Mozilla
asking us to be independent.
Thunderbird is based entirely on XPCOM (backend module API) and XUL (user interface). If you take out XPCOM and XUL from Thunderbird, you have effectively rewritten it. This change is as dramatic as the change from Netscape 4.5 to Mozilla was, when it was rewritten with XUL and XPCOM. 90% of the code was new. We are faced with a similar problem.
Of course, the changes in Gecko are gradual, but eventually, the technology will go away, so the overall work is there nonetheless.
Given that XPCOM is the very technology that creates the API between the modules, is hard to replace step by step. I think we would spent as much time integrating the new modules with the old code as we would take writing the module in the first place, which means the overall effort increases at least 2-fold by trying to do it step by step.
Having worked on Thunderbird since 18 years, I do not deem it
feasible to modernize it component by component. I estimate it
would be 4 times faster to start with a clean slate and start from
0.
JavaScript, if used diligently and with good design, is a very efficient language. Both in execution time, but more importantly for developers. Personally, I wrote apps in many languages, including C++, Java and JavaScript. Of those, JavaScript is by far the most productive - I am personally 4-10 times as productive as with C++.
Today, we have node.js, Electrolysis, Cordova and other platforms that are already ready-made to create desktop applications using HTML5 and JavaScript. There are already other applications that have been written this way, and there is existing knowledge and libraries on how to do this.
There are some known shortcomings of Thunderbird, as it is implemented and designed today. Some are on the feature level, for example the address book is not flexible enough to capture even 3 email addresses for one person, it cannot link 2 persons (e.g. a couple), and so on. A modern re-write would consider today's user requirements.
Deeper goes the problem of virtual folders. Thunderbird has them implemented as a bolt-on, which essentially keeps a copy of the mails, as far as I understand, and they are slow and inflexible. A new Thunderbird implementation could take an approach of where folders are a view that is computed in real time (like views in databases). This matches what GMail does with the AllMails folder and tags as properties, and then tags also form a virtual folder. There are important implications that this has: I can have a unified inbox, one inbox per folder, and I can have the emails sorted into specific project folders on arrival, all without overhead. The same incoming email appears in all 3 folders in the same second, and is marked read at the same time. I no longer have to move emails, but they are filtered.
Even deeper are design shortcomings of Thunderbird. It
establishes a rough border between user interface and backend
modules for IMAP etc., but is not very consistent in enforcing the
independence of the 2 layers.
Right now, large parts of the logic are written as part of the frontend code, which is one of the big reasons why Thunderbird code is so difficult to understand and modify. It also makes it practically impossible to write alternative frontend. Instead, the architecture should be flexible enough to allow this, by strictly separating logic from UI using design patterns.
Some backend modules call the frontend, to update changes.
Instead, we should use a classic observer/subscriber design
pattern, where the frontend subscribes to changes in the backend,
and updates itself. That allows more flexibility for the frontend.
All lists should be observable, which is a simple but very
powerful way to decouple logic from UI. See Linq in C#, and
https://wiki.mozilla.org/Jetpack/Collections , which takes it a
step further. This could be the technical basis for very flexible
virtual folders that update immediately and are fast. But it would
be used whenever there is a list.
We retain the overall UI and most features and qualities like
performance, even if we do not copy all little details.
Disclaimer: Given that the technological basis - particularly HTML - is completely different, there will be some things that work differently in some ways. Hopefully, many will be better. We will have some technical limitations. Some will be just different, because the underlying implementation is completely different. The goal is not to copy bug for bug, but to make existing users immediately recognize this as Thunderbird, and feel at home, even if some details are different.
We must pay attention to also keep technical qualities that many
of our users rely on. An obvious one is that the new
implementation must be able to quickly scroll through a list of up
to 100000 messages. There is no such HTML widget that allows that,
we would have to create one, but I think it's feasible, I already
have ideas how to do that. We also need to preserve privacy and
security qualities that Thunderbird has, or even improve on it.
In addition to replicating the current Thunderbird UI, we should also experiment with new forms of UI, in parallel. For example, we should create a UI that's suitable for the new generation of users that never used a desktop email client before. These people do not feel at home with Thunderbird today, and we should create something for them.
A lot of the new userbase is on mobile platforms and on tablets. That new UI should be "responsive" (automatically adapting to different screen sized) so that it runs well on tablets and smart phones as well. With Cordova and similar toolkits, we have a technological basis to quickly make a mobile app out it so that it installs like any other app. It would be a replacement for the system "email" app.
The goal for the new UI are 1 billion users.
During the time while the new rewrite is implemented, a smaller part of the staff will maintain Thunderbird, as they have done in the last 2 years. We keep up with Gecko changes, and fix smaller bugs. But we will not do major refactoring or big new features on the old codebase.
This gives users a continuously updates Thunderbird. Particularly important are security updates for security holes found in Gecko, which Thunderbird inherits. They might be exposed in HTML emails, RSS feeds or other places where Thunderbird shows HTML and renders images.
The majority of the team should concentrate on the rewrite. This is also why this decision is important to make now, because Thunderbird has now resources to hire a number of developers, and we need to decide on which efforts we spend the precious little money we have through the generous donations of our existing users.
I would estimate that we need a team of 10 full time developers, for 3 years. We need 2 persons for the framework, 3 for backend modules, 4 for frontend UI, and 1 for theming.
In the first year, we are laying the foundation, getting the
framework sorted out, building infrastructure etc..
After 1 year, I would expect a first demo that can read and write email, but with a very minimal feature set and many rough edges. A few enthusiastic first alpha users might be able to use it for their email needs, and some developers can use it for their daily needs.
In the second year, we would concentrate on building the
important features that are needed for most users.
After 2 years, we should have an email client that's appealing to most normal users. Even some power users might like it, because we have advanced features that no other client has, but they will miss some features.
In the third year, we concentrate on feature parity to the old Thunderbird. We add any features that Thunderbird currently has and are appreciated by the existing userbase. We also add functionality that allows larger deployments, as a significant part of userbase are enterprises.
Any features that are used by significantly less than 1% of the
userbase will not be implemented, in favor of other features that
are desperately needed today.
After 3 years, 95% of the existing Thunderbird userbase should find the features they need in the new implementation. There will be some changes and adoptions necessary, but there should be a way to do what they need. That's what I call "feature parity".
Keep improving
Summary:
- Our base goes away. Gecko will change dramatically in the future, and dropping many features that Firefox does not need anymore, but that Thunderbird relies on.
- Our codebase is now roughly 20 years old. It heavily and intrinsically relies on those very Gecko technologies that are now being faded out, more or less aggressively.
- JavaScript and HTML5 have evolved dramatically. Entire applications in JS are now realistic, and have been done. There are several existing JS libraries we might leverage. JavaScript is an efficient language, which allows fast development. A rewrite in JavaScript makes sense now.
- We will learn from shortcomings of existing Thunderbird, and solve them, for example a more flexible address book, and cleanly supporting virtual folders without overhead.
- The goal of the rewrite is to be close to the existing Thunderbird, in UI and features, as a drop-in replacement for end users, without baffling them. They should immediately recognize the replacement as the Thunderbird they love. It will install and run as normal desktop application, like Thunderbird does today. It keeps user data local and private.
- We can also make a new, fresh desktop UI, as alternative to the traditional one, for new users. The technology also gives us the option to run it as mobile app.
- While we implement the new version of Thunderbird, the old codebase based on Gecko will be maintained until the rewrite is ready to replace the old one.
- I expect this effort to take roughly 3 years: 1 year until some dogfood (usable by some developers and enthusiasts). 2 years until a basic feature set is there. 3 years until we can replace Thunderbird.
Ben Bucksch schrieb:
Matt Harris wrote on 24.03.2017 18:27:
/I think all this relies on a powerful replacement for the XUL treeview. Do we have one now?
/
Indeed, this is needed.
I've once found a "fast-list" or similar on github, that goes in that direction. But no, we don't have it now. As mentioned, I have a plan how to do it, but I haven't realized it yet. That's one of the things we'd need to create as part of the framework.
That problem is inherent, because the XUL <tree> widget was originally written specifically for Thunderbird. Firefox didn't need it. And it might also go away now, if Firefox doesn't need it anymore.
FWIW, I think a lot of the web would profit from a widget like that - so if we can implement something like it as e.g. a web component, I think there may be some interest in taking this as a base for a web standard with an in-browser widget in the future - IMHO, this is one of the biggest pieces HTML is lacking to become a really useful UI language nowadays.
KaiRo
I think we'll support IMAP from the start. I already have a partial, read-only implementation of IMAP and POP3 in JavaScript. Of course it's just a start, but it shows it's feasible.
Summary:
- Our base goes away. Gecko will change dramatically in the future, and dropping many features that Firefox does not need anymore, but that Thunderbird relies on.
- Our codebase is now roughly 20 years old. It heavily and intrinsically relies on those very Gecko technologies that are now being faded out, more or less aggressively.
- JavaScript and HTML5 have evolved dramatically. Entire applications in JS are now realistic, and have been done. There are several existing JS libraries we might leverage. JavaScript is an efficient language, which allows fast development. A rewrite in JavaScript makes sense now.
- We will learn from shortcomings of existing Thunderbird, and solve them, for example a more flexible address book, and cleanly supporting virtual folders without overhead.
- The goal of the rewrite is to be close to the existing Thunderbird, in UI and features, as a drop-in replacement for end users, without baffling them. They should immediately recognize the replacement as the Thunderbird they love. It will install and run as normal desktop application, like Thunderbird does today. It keeps user data local and private.
- We can also make a new, fresh desktop UI, as alternative to the traditional one, for new users. The technology also gives us the option to run it as mobile app.
- While we implement the new version of Thunderbird, the old codebase based on Gecko will be maintained until the rewrite is ready to replace the old one.
- I expect this effort to take roughly 3 years: 1 year until some dogfood (usable by some developers and enthusiasts). 2 years until a basic feature set is there. 3 years until we can replace Thunderbird.
I will describe each point in more detail below.
-- Joshua Cranmer Thunderbird and DXR developer Source code archæologist
Why is POP and not IMAP in the MVP? I'd say if you are going to do one, IMAP is the modern mail access protocol.
I've made the exact same suggestion and always felt it makes more sense,
but being that ianap, I couldn't/can't articulate a strong argument.
But modularizing it just makes sense. This can use the same exact
process used now for thrashing out bugs - early releas, beta, and
Release channels. Then it is just on users to make sure they keep their
profile backed up in case something trashes it.
It might actually end up being more work - even significantly more work
- but the risk is vastly reduced, even eliminated.
On Mon Apr 03 2017 12:03:22 GMT-0400 (Eastern Standard Time), Gervase Markham <ge...@mozilla.org> wrote:Why is POP and not IMAP in the MVP? I'd say if you are going to do one, IMAP is the modern mail access protocol.
Actually, I suggest that IMAP is no longer the 'modern' one.
I suggest JMAP support be made a mandatory criteria.
With the 'contacts/caldav' project which has been run last year at the
New Zealand University it was obvious using a technology kit like React
gives a great boost for productivity and structuring the solution. But
already that small project -- compared what a next-TB will be -- showed
also there are many possibilities for "dialects" with the various parts.
So before starting the next-TB project it would make sense to have a
common understanding for the technology base.
Paul suggested a few points for the technology stack and more, he
pointed to an important issues: legal aspects. For React there could be
a patent problem, see here:
> https://github.com/facebook/react/blob/master/PATENTS
And also Paul's contribution to a Drupal discussion about React usage
is worth to read:
> http://buytaert.net/comment/120741#comment-120741
React is used with the DevTools and it would be interesting to hear from
the DevTools how they live with that patent issue. Thunderbird where
ever it finds it's new home should be save from the start with new
technologies and 3rd-party contributions.
This is only one example why a serious analysis is necessary and
stringent standards are an absolute must.
FWIW, any that will be a natural fallout of any well-designed rewrite.
Of course we wouldn't write a monolithic, take-all-or-nothing webapp,
but we'd write components. And these could be used by the old
Thunderbird. I'm all for that.
The important difference is:
* the new modules need to be designed for the future, not the past. This
is why past attempts failed: Thunderbird APIs between modules are often
unfit.
* the integration into the old Thunderbird probably takes more time than
writing the component in the first place. By making the backport an
explicit, separate step, you'd see that cost clearly. More importantly,
you can separate the tasks to different teams. And you limit the risk:
If the backport fails, you still have the new implementation.
Ben
Joshua Cranmer 🐧 wrote on 03.04.2017 18:08:
We've talked about rewriting Thunderbird for, oh, a decade or more now. We've had agreement on the direction these rewrites should take for at least 3 or 4 years (rkent was really one of the last hold-outs for using JS). But we've not really made any measurable progress on rewriting Thunderbird.
And you know why? Because nobody started. If we had started "a decade or more" ago, we would be done since 5 years, would not be fighting Gecko regressions today, and would be adding the features that the users today are screaming for.
Inaction is our biggest risk. The task is big, but doable. It's been done before.
We do have a fallback. Thunderbird based on Gecko would continue to be supported on the current level.
The 2 projects would run in parallel and independent of each other, they share the project umbrella and the goal. The teams would be separate. The Thunderbird-based-on-Gecko team would be free to pick any JS/HTML implementations created for the new client and backport them to the old client. I'm pretty sure we'd finally get the new AB this way.
The gradual rewrite is what has failed. That's not just a possibility. We tried and failed. As you said above, we wanted to do it since a long time, and never succeeded. Thinking that we'll suddenly succeed now, with less resources, is merely wishful thinking. And if that fails, Thunderbird is dead for good, because XUL is going away eventually.
As indicated there (citing the next link), people are still (as of the
beginning of the year) still waiting on opinions from OSI and FSF about
the React license.
https://discuss.reactjs.org/t/legal-department-did-not-allow-use-of-react/3309
What's especially confusing about React's licensing situation is that is
has been under three license -- Apache, then a really bad version of
BSD+PATENTS, then a not quite so bad so bad version of BSD+PATENTS (but
still problematical).
--Paul Fernhout (pdfernhout.net)
"The biggest challenge of the 21st century is the irony of technologies
of abundance in the hands of those still thinking in terms of scarcity."
Your point on risk management makes a lot of sense. That's why I
suggested a possibility of having a new Thunderbird that could run
alongside the existing one and share the same files while offering a
different UI. That is the simplest risk-management strategy I can think
of for one developer with web technology experience to take.
To address this risk in another way (one requiring coordinating multiple
developers with current Thunderbird codebase knowledge), consider an
option I mentioned but mostly discounted as as not fun. We could modify
Thunderbird-as-it-is to work as a backend to serve content to a web
browser. Essentially, we add a simple embedded web server to Thunderbird
written in C/C++ which supports an API (maybe all JSON, maybe even
JMAP?) to fetch and store email-related content, where the existing
backend still handles retrieving messages from servers and writing local
files. The existing full Thunderbird UI would continue to work in
parallel with this web server and be maintained in parallel. The goal
then would be to get the entire Firefox-based UI replaced first. After
we have a workable UI, then we could throw away the embedded Firefox UI
while still keeping the backend. After that, then we could talk about
redoing the Thunderbird backend if desired (maybe in Node.js, Java,
Python, Rust, C/C++ again, or whatever). And all along, there would just
be one system.
Anyway, this other approach would be a lot more work and coordination,
and would require making riskier changes to the existing Thunderbird
codebase (including because the existing UI code might not play nice
with some other UI given shared state, so that might take extra work to
resolve). As an individual, I would never consider doing such a thing
myself. But it is possibly the most incremental thing we could do as a
group.
Also, maybe someone more conversant than I with the range of existing
Firefox/Mozilla technologies might be able to point to embedded server
code we could leverage? Maybe related to past work for FirefoxOS?
https://hacks.mozilla.org/2015/02/embedding-an-http-web-server-in-firefox-os/
Obviously, at some point the effort involved in making such changes
incrementally might exceed the from effort needed to rewrite from
scratch. So, its a tradeoff about risk mitigation at potentially a big
extra labor cost. I don't know enough about the Thunderbird codebase to
decide about that tradeoff -- other than that from what little I've seen
and learned the existing Thunderbird-specific codebase seems hard to
understand and maintain (even the backend) because of the entanglement
with Firefox code and a complex Firefox-related build process. But,
perhaps that impression is incorrect? Or even if it is correct, given
Thunderbird-as-is will likely be maintained for another year or two,
maybe the extra work of adding in a server part won't be too much?
--Paul Fernhout (pdfernhout.net)
"The biggest challenge of the 21st century is the irony of technologies
of abundance in the hands of those still thinking in terms of scarcity."
On 2017-04-03 8:58 PM, Joshua Cranmer 🐧 wrote:
> The problem is that you're suggesting... well, basically inaction (on a
> feature level) while you go off and work on a separate project,
> hopefully to force it down everyone's throats when it's done. And
> arguing that it will be so wonderful and timely that there's not going
> to be any problems forcing people to switch (I am aware that this is
> probably a gross caricature of what you're proposing). *That* is what
> concerns me: that you're going to hit a roadbump, and everything is
> going to go wrong, and there is going to be no Plan B.
>
> The biggest risk is that one snag derails the entire project. Suppose,
> for example, that you have problems with unacceptable performance on
> message display, and that this resists all attempts to bring it to the
> performance level of existing Thunderbird code for years. (This is not
> unrealistic: this is exactly what happened to ical.js). What do you do?
> This is the sort of risk that concerns me deeply, and the best way to
> mitigate is to minimize the criticality of delivering any one individual
> feature. Proposing a complete rewrite and not seeking gradual uplifiting
> is exactly the opposite of that strategy.
_______________________________________________
There are many email clients written in JavaScript, and many of them
work wonderfully. So, it's definitely technically feasible. However,
they are not a replacement for Thunderbird, because they are based on
custom servers, and they do not even try to have the features that
Thunderbird has. That's not because it's impossible - they have other
difficult features, like PGP or telephone integration -, but because it
was not their goal. They just had a different user group in mind.
I meant a full email client, to replace Thunderbird. The Thunderbird
project has never seriously tried that.
I specifically excluded attempts to gradually rewrite, by replacing
certain components of the old Thunderbird. That was my whole point. We
have tried that, indeed, and it hasn't gotten us anywhere. If it had
worked, we would be finished by now, with a renewed Thunderbird. After
"a decade", we're very far from done. We simply don't have another 5 years.
> There have been at least two projects with the clear intention of
> rewriting major portions of Thunderbird that produced concrete results
> yet have failed to come to fruition (Ensemble and JSMime)
I know your work around JSMime, and I appreciate and respect your work.
> what concerns me: that you're going to hit a roadbump, and everything
> is going to go wrong, and there is going to be no Plan B.
There is a plan B. I am not proposing to stop Thunderbird based on
Gecko. It will continue until the replacement is ready. Everybody has
the option to switch at the moment they feel the replacement is better
for them than the old Thunderbird. That will be a different moment for
different people.
At the end, we will make a specific effort to migrate the features that
the remaining users need.
Also, Thunderbird-on-Gecko can backport the new developments. I also
described that. That's another risk mitigation.
That means there *are* 2 plans. There is a Plan B.
If you gradually rewrite, *then* you don't have a plan B. The
integration of new components into old codebase is hard. If the rewrite
fails, or does not finish in time (same thing), you are dead.
> force [the replacement] down everyone's throats
I don't think that's a fair argument. You also force your rewritten
components "down the throat of everyone" (to use your own language),
even in the old client. What, if I don't like the replacement part or
how it works? Same thing.
> for example, that you have problems with unacceptable performance on
> message display, and that this resists all attempts to bring it to the
> performance level of existing Thunderbird code for years.
Please don't pretend that Thunderbird is perfect. Here, my Thunderbird
keeps freezing for 3-5 seconds every 15-30 seconds. I have one of the
fastest desktop machiens you can buy. It's like that since years, but
it's getting worse. Do you any idea how disruptive this is? I've filed
bugs about this, posted all information and symptoms I have there,
without any action. This makes me want to trash Thunderbird. And that's
saying something, because I've put a lot of my time into it.
> What do you do?
Fix it. There are enough email clients built in JS to prove that it's
possible.
> This is the sort of risk that concerns me deeply, and the best way to
> mitigate is to minimize the criticality of delivering any one
> individual feature.
You're welcome to backport individual features of the new implementation
to the old Thunderbird.
> Proposing a complete rewrite and not seeking gradual uplifiting is
> exactly the opposite of that strategy.
No, it's not. It's just 2 efforts running in parallel: Creating the new
app, with a clean code design, and backporting the new components to old
Thunderbird. And that can be done in separate teams. You do effectively
still do a gradual rewrite of the old Thunderbird.
You just a) share the load and b) don't compromise the new design with
old APIs and c) if the integration with old Thunderbird does not work
out, you still have a working result: the new version.
I am so insistent, because I'm convinced that the gradual rewrite will
not finish in time. It will be late by years, if it ever finishes at
all. If project history is any indication, I think it will outright
fail. So, what I propose is in fact risk mitigation.
(The other reason is that the Thunderbird code design is 20 years old
and just not fit for today, and a gradual rewrite would keep the overall
design.)
All our attempts of something new have always failed, because we held on
too much on old code and old thinking. The task itself is doable. It's
just extremely hard within the constraints of the old thing.
> 3. I am not proposing to maintain the current APIs.
How did that work out for JsMime? See what I mean?
Ben
If you gradually rewrite, *then* you don't have a plan B. The integration of new components into old codebase is hard. If the rewrite fails, or does not finish in time (same thing), you are dead.
This is the sort of risk that concerns me deeply, and the best way to mitigate is to minimize the criticality of delivering any one individual feature.
You're welcome to backport individual features of the new implementation to the old Thunderbird.
3. I am not proposing to maintain the current APIs.
How did that work out for JsMime? See what I mean?
I'm not holding anyone hostage. Why this martial terminology?
> If the rewrite succeeds, great we can use it. But if it doesn't
> succeed, well, at least users get new features in some fashion anyways.
That's exactly what I said.
> With what manpower? Thunderbird has a critical problem: it's short of
> manpower, and it's been short of it for half a decade.
And a gradual rewrite is at least 5x more work than a rewrite with a
clean slate, because of thee extra burden of the old architecture,
design, integration etc.. That in combination with the size of the
effort and the limited resources is why I know it will fail.
OTOH, we have data on how long it takes to implement a new email client
in JS, because it's been done before multiple times. Several teams did
it with 3-5 developers in about 2 years. We might even be able to reuse
existing JS components. We add on top the features that Thunderbird
needs - that's just extra work, nothing conceptually different -, and
we're done. The hard part is the architecture, and that's proven to
work, by others.
> Everything else is just a multiplier on the burden that this manpower
> shortage represents.
How did you develop JSMime? You first developed it as a standalone
component, then integrated it in Thunderbird, didn't you? What I propose
here would be doing the same thing. How is that a multiplier?
(skipping all the personal attacks on me)
Summary:
- While we implement the new version of Thunderbird, the old codebase based on Gecko will be maintained until the rewrite is ready to replace the old one.
On 5.4.2017 03:09, Ben Bucksch wrote:
How did you develop JSMime? You first developed it as a standalone component, then integrated it in Thunderbird, didn't you? What I propose here would be doing the same thing. How is that a multiplier?
Implementing different features as components with modern design is all good. What's not so good is that you seem to say actually integrating those components into Thunderbird for real usage is a secondary priority. It needs to be *the* priority, because that's the only way you could get enough real world feedback.
And you keep telling developing "a new email client in JS" in a short time can be done, and have been done before. Well, there's a reason people still prefer Thunderbird. You can develop something, but what that something is...
Magnus Melin wrote on 4/5/17 9:14 AM:
On 5.4.2017 03:09, Ben Bucksch wrote:
How did you develop JSMime? You first developed it as a standalone component, then integrated it in Thunderbird, didn't you? What I propose here would be doing the same thing. How is that a multiplier?
Implementing different features as components with modern design is all good. What's not so good is that you seem to say actually integrating those components into Thunderbird for real usage is a secondary priority. It needs to be *the* priority, because that's the only way you could get enough real world feedback.
I want to build a new desktop email client, based on web tech with a modern code design, which imitates Thunderbird and eventually has feature parity.
Your point on risk management makes a lot of sense. That's why I suggested a possibility of having a new Thunderbird that could run alongside the existing one and share the same files while offering a different UI.
For my part, I have one non-negotiable requirement: we should be able to
ship CardDAV support to our users by 2018. Beyond that, I think there
should be means to implement new features in TB in a more rapid basis
"if prudent" (and I'm leaving it vague on what exact criteria that entails).
To that end, here are some suggestions to the proposal:
1. Delete the requirement that feature development in Thunderbird is
unfunded. It's okay to leave it vague which features would be
implemented sooner--the only two that really come to my mind are CardDAV
and EAI. Beyond that, I don't think that there are many features which
are urgent to implement (e.g., JMAP would be nice, but no one's really
clamoring for it).
2. Make it clear that being able to transfer features to Thunderbird is
a priority. i.e., you'd rather a 100% complete address book and 50%
complete IMAP than 80% of both. This also means that whatever platform
support library you have would include support for
xpcshell/xpconnect/whatever else is being used by Gecko as a base layer.
I realize this is something you're likely to disagree with, but I
suspect the disagreement is more over perception than fundamental
semantics. I believe that it would be fairly easy to replace the address
book, import, mime, and compose code; that replacing the search and
protocol implementations are probably doable (with SMTP being easiest
and IMAP hardest); that replacing the database is challenging, but
possible if you look to only implement a well-defined new DB API that
coexists with the old one but doesn't eliminate it; and that replacing
the account implementations and associated frontend bits (e.g.,
nsMsgDBView) is probably so difficult it's not worth attempting.
Accordingly, to me, there seems to me to be little reason not to throw
some people at porting over the first few bits rapidly.
3. This may be controversial, but I suspect it's less controversial than
it seems. Paid support, if necessary, would be available to do the
porting of bits to Thunderbird. I'm sure we disagree on where the line
should be drawn, but I'm not proposing that everything would be
considered a viable candidate (i.e., I'm fine with you objecting to
having to port nsMsgDBView-replacement), and I suspect you're open to
letting mostly standalone stuff get done (e.g., the address book). So
I'm happy if we can both agree that a line should be drawn, it should be
drawn somewhere in the middle, and we can agree to defer the discussion
of where it should be drawn until an actual relevant case comes up. The
question of who is paid to do so is also something that I'm fine with a
fuzzy answer.
Beyond that, I think the crux of the issue is in the manner of a pitch.
Most users aren't going to notice backend changes at all unless it
impacts them, but front-end changes tend to engender a lot of
complaints. I've mentioned several times the Servo model, and if that's
essentially what you're proposing, I don't have problems with it. That
model (to me, at least) is that you use an entirely different product to
develop all of the backend pieces which you can then reintegrate into
Thunderbird as they become feasible replacements--and in terms of pitch,
you don't describe it as being the replacement for Thunderbird. It's
also clear that, unlike Firefox, the UI of Thunderbird cannot be easily
decoupled from its backend, and as to how to deal with that... I have no
opinion; I'm a backend guy through-and-through.
I would also suggest an effective mandate that developers on the new
project should be sensitive to disruption to Thunderbird UI (if the
intent is to replace the UI of Thunderbird with new UI). As well, they
should also have explicit mandates to have better testing infrastructure
and documentation than Thunderbird has traditionally maintained,
including performance tests (as a rough baseline, the question should be
"how well do we perform on a 1M message folder?"--and yes, I'm aware
that Thunderbird doesn't look good on that regard right now). I also
think that the testing infrastructure should be shared with TB as much
as practicable--e.g., sharing the same datasets for performance tests.
How does that sound?
--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist
_______________________________________________
Yes, Joshua's opening makes the point:
There's been a lot of discussion about this proposal, and I think some people have modified their opinions or clarified them in ways that aren't necessarily collected in one place. I think we can come to a better agreement if we go back and start our positions more clearly.
For my part, I have one non-negotiable requirement: we should be able to ship CardDAV support to our users by 2018. Beyond that, I think there should be means to implement new features in TB in a more rapid basis "if prudent" (and I'm leaving it vague on what exact criteria that entails).
For me his arguments sounds more than GOOD, I'm looking forward to see more of this and a team is formed for a start!
How does that sound?
Most add-ons today rely on infrastructure that Mozilla has expressed
interest in killing, namely XPCOM, XUL, and XPConnect. The sad truth is
that Thunderbird has no real resources to maintain these technologies
itself: XUL is deeply baked into the display engine, and XPConnect
relies on a very fickle JS engine API and has serious design flaws baked
into it (XPCOM is essentially a giant hashtable, with some mild C/C++
reflection and a few assorted helper ADTs--it basically requires so
little maintenance that large portions of it effectively haven't been
touched for a decade). It's not really in our hands to decide whether
these extensions can be reused, although we do have some measure of
control over how painful it would be transition them to a new system.
--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist
_______________________________________________
every estimation for feature implementation I've seen from Mozilla has been wildly optimistic
I would rather convince others on a rational level, or if I'm missing some aspects or ideas, improve my proposal to accommodate valid needs that I've overlooked.
Let's talk about the proposal then. For my part, I have one non-negotiable requirement: we should be able to ship CardDAV support to our users by 2018. Beyond that, I think there should be means to implement new features in TB in a more rapid basis "if prudent"
1. Delete the requirement that feature development in Thunderbird is unfunded. It's okay to leave it vague which features would be implemented sooner--the only two that really come to my mind are CardDAV and EAI. Beyond that, I don't think that there are many features which are urgent to implement (e.g., JMAP would be nice, but no one's really clamoring for it).
I've mentioned several times the Servo model, and if that's essentially what you're proposing, I don't have problems with it. That model (to me, at least) is that you use an entirely different product to develop all of the backend pieces which you can then reintegrate into Thunderbird as they become feasible replacements
2. Make it clear that being able to transfer features to Thunderbird is a priority. i.e., you'd rather a 100% complete address book and 50% complete IMAP than 80% of both.
This also means that whatever platform support library you have would include support for xpcshell/xpconnect/whatever else is being used by Gecko as a base layer.
I believe that it would be fairly easy to replace the address book, import, mime, and compose code
replacing the account implementations and associated frontend bits (e.g., nsMsgDBView) is probably so difficult it's not worth attempting. Accordingly, to me, there seems to me to be little reason not to throw some people at porting over the first few bits rapidly.
3. Paid support, if necessary, would be available to do the porting of bits to Thunderbird.
Beyond that, I think the crux of the issue is in the manner of a pitch. Most users aren't going to notice backend changes at all unless it impacts them, but front-end changes tend to engender a lot of complaints.
--and in terms of pitch, you don't describe it as being the replacement for Thunderbird.
So, another possibility is for this group to pick an existing FLOSS mail system (Nylas N1, Mailpile, KMail, Mutt, Claws Mail, Zimbra, or whatever especially it used web technologies) and make that into a new blessed "Thunderbird" either as a fork or by joining that community.
We should definitely look at existing projects and existing state of the art.
However, I think we all agree we want the Thunderbird replacement
to be a desktop client (plus other platforms like mobile), and
based on web technologies, most importantly written in JavaScript.
So, all webapps are not helpful. Solutions that try to combine a
server and client are fragile and hard to develop in, because you
need to create the client/server protocol for everything.
We are also very clear that we want to take our users with us,
and therefore want to keep a UI that is reasonably similar to
current Thunderbird, at least as transitional option.
Let me quickly go through the list:
Not applicable:
Interesting are:
So, none of the existing projects are directly applicable, but some have libraries or code that we might be able to use. Even if not, we might be able to get ideas or interesting solutions there.
Ben
I agree that basic implementations of "everything" comes first. Beyond
that, well, it's best to explain with a hypothetical. Suppose we decided
that LDAP and QRESYNC support were both necessary final features but not
earlier mandatory features, and suppose that LDAP were the last feature
not found in the new address book. I'm saying that we should prioritize
finishing the LDAP implementation (via FFI to OpenLDAP, say) over
implementing QRESYNC. Outside of that specific kind of situation, there
isn't much difference in various approaches, and it's hard to say that
sort of situation will even come up in the first place. So I'm not going
to push very hard on this.
>
>> This also means that whatever platform support library you have would
>> include support for xpcshell/xpconnect/whatever else is being used by
>> Gecko as a base layer.
>
> I don't understand. XPCOM is slated to be killed in Gecko in the long
> term, it's one of the technologies we need to get away from.
> Thunderbird on Android is not going to use XPCOM, nor a compat layer
> emulating XPCOM, but a pure JS module system.
>
> If things are backported from the new implementation into old
> Thunderbird, TB can use it on the pure JS level. Or build a small
> XPCOM wrapper in JS, if absolutely necessary.
The problem with JS is that it doesn't have much in the way of the
standard library. A TCP socket, for example, is handled very differently
in node.js, in Chromium extensions, in XPCOM, in the B2G bindings, etc.
At some point, you need a library that presents a common API for all the
platforms to its different users, much the same way that (say) Rust's
libstd bridges over i686-linux-gnu, i686-windows-msvc, etc. My point is
that a) the JS environment of Thunderbird (which I'm referring to as
xpcshell/xpconnect/whatever) is included as one of the platforms in this
list and b) it should show up as such in, e.g., a tbpl-like matrix view.
It is extremely hazy-feely on how this backend works in Thunderbird. (In
particular, how to handle ES6 modules versus require.js, etc. is not
something I can recommend a solution to at this moment).
The original proposal gave the impression that Thunderbird development
was to be unfunded, and certainly much of my wording was meant to focus
on overturning that viewpoint. It matters much less to me who is being
paid to do what as long as we agree that those acts deserve paid
developers. Which means we're in total agreement here.
>> --and in terms of pitch, you don't describe it as being the
>> replacement for Thunderbird.
>
> How would you describe it?
If I had a good example, I would have given it. I'm concerned that being
upfront with replacing Thunderbird will prime people to bring out the
pitchforks, but lying obviously helps nobody. So starting out with
descriptors like "next-generation" or "experimental" or "incubator" that
are somewhat evasive but not really dishonest probably work better.
- Nylon N1
- Desktop app written in JS, but married with a server components.
- UI applicable
- Need to look at this
You can look at Nylas N1, with its exciting mix of hot technologies
(Node on Electron, React) which tend to attract volunteers, and see that
the vast majority of commits are from paid developers
(https://github.com/nylas/nylas-mail/graphs/contributors top 4 are Nylas
staff). So I think that we can agree that the hope that there are armies
of qualified, volunteer programmers just waiting to work on Thunderbird
or related projects is so 20th Century (and unlikely). While we have
some amazing volunteers that have kept the project alive, yet email is
serious business and it is not reasonable to believe we will have a
serious product done mostly by volunteers (and I say that as someone
actively recruiting about 10 volunteer students to work on aspects of this).
The problem is, I have had a very, very hard time getting anyone to
seriously discuss the question of how to fund this. I have been
disappointed that my suggestions to the Council to devote some resources
to financial development are not received well. Elsewhere, I have
suggested a coop model but got very little traction with that. Yes we
have donations, really more than we expected, but keeping the existing
product alive for 2-3 years is going to take most of those resources.
We cannot compete technologically if we do not have a business model
that can compete with models such as the Postbox paid user, or the Nylas
paid server services. What is the plan here?
:rkent
GPL code :( Primarily the work of 2 people. I wonder if we would ever consider switching to GPL?
So, you're saying we should prioritize existing features (LDAP) over new
features (QRESYNC) that Thunderbird-Gecko does not have? Yes, I
generally agree on that. More specifically, the fact That Thunderbird
currently has that feature makes that feature rise considerably in the
feature list. I wouldn't make this an absolute, though. I think that
some way to sync the address book with mobile phones is more important
than LDAP, these days.
Things like prioritization are decisions that are best made numerically.
You count number of users who use the feature in current Thunderbird, or
you let people vote what they want and why, or things like that.
Essentially, you make sure you really know what people need, and why.
And then, on top of that, existing features get certain bonus points
over new features, to make sure we cover the old Thunderbird feature set.
>>
>>> This also means that whatever platform support library you have
>>> would include support for xpcshell/xpconnect/whatever else is being
>>> used by Gecko as a base layer.
> The problem with JS is that it doesn't have much in the way of the
> standard library. A TCP socket, for example, is handled very
> differently in node.js, in Chromium extensions, in XPCOM, in the B2G
> bindings, etc. At some point, you need a library that presents a
> common API for all the platforms to its different users
Ah, I see what you mean. Yes, I agree. For example, for my IMAP and POP3
implementations in JS (written by me for a XUL extension), I first wrote
a small Socket.js that abstracts the XPCOM API. It's not very big, and
it's simpler than the XPCOM API. When I port things to node.js, I have
to re-implement this Socket.js. But the IMAP and POP3 implementations
have no dependency on XPCOM and should hopefully then work after
porting. I'm expecting a day of work for this. In fact, that's the one
of the things I wanted to do this week or next week, if I can find the
time, so we'll see.
Luckily, JS covers a lot already. I've identified the following parts
that are not well standardized:
* Module system (I've spent the day yesterday to convert JSM to
npm-style require())
* Interprocess communication
* File system access (in node.js: require("fs"))
* TCP Sockets
FS and Sockets are rather easy, because relatively easy to abstract.
Module system is harder, but require() is reasonable.
The biggest problem in practice is the communication between UI and
backend (IPC). That can be vastly different, and can break the neck of
the project. Concretely, this is why I abandoned my port from XUL
extension to Jetpack. Luckily, that appears to be easy in Electron, with
the shared |global| object. I have yet to really test it in practice,
but it appears to work really nicely.
> the JS environment of Thunderbird is included as one of the platforms
> in this list
Yes, XULRunner vs. Electron vs. Cordova is the "platform" for TB-Next,
indeed.
I am hoping to keep it reasonably platform-abstracted, without too much
of a compat layer. Nothing like NSPR again, please! Luckily, JS gives us
most of what we need (basic types, etc.)
I will use the latest and greatest JS version, though. I really want to
use "=>" functions, and |class| if possible.
Too bad modules are not there yet.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
> (In particular, how to handle ES6 modules versus require.js, etc. is
> not something I can recommend a solution to at this moment).
hihi! ditto! I was just asking myself the very same question this week.
Comforting to hear that you're facing the same dilemma. I've picked
require() for now, and it seems to work reasonably well (once I figured
out how to initialize "app-module-path").
> The original proposal gave the impression that Thunderbird development
> was to be unfunded, and certainly much of my wording was meant to
> focus on overturning that viewpoint.
Sorry, I worded it too drastically. I mean we should maintain status quo
for Thunderbird based on Gecko.
The danger to Thunderbird-on-Gecko is not this project, but increasing
breakage caused by Gecko, which will soon have unsustainable levels.
That's why I propose this project as solution.
> Which means we're in total agreement here.
:-)
> So starting out with descriptors like "next-generation" or
> "experimental" or "incubator" ... probably work better.
OK. I'll go with "next-generation".
Greetings to Jean Luc Picard! :)
Ben
Personally, I'm strongly averse to the GPL, particularly for code that I
want to make available to other people, for two reasons. First, as you
implied, GPL code limits the ability of other worthy, but non-GPL
projects, to use it (even if open-source). Second, the GPL actually
comes with some surprisingly onerous compliance requirements with
implications for how you build and deploy software, and I don't think
the philosophical goals of the GPL merit all that legal compulsion.
--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist
_______________________________________________
We are also very clear that we want to take our users with us, and therefore want to keep a UI that is reasonably similar to current Thunderbird, at least as transitional option.
> https://en.wikipedia.org/wiki/Mozilla_Public_License
On 4/11/17 6:09 AM, R Kent James wrote:
I wonder if we would ever consider switching to GPL?
Good question, the MPL really hasn't served Thunderbird very well, with Postbox being the prime example, resulting in zero win for the base project. This would not be possible with GPL.
You could also consider a dual licensing of GPL + commercial licensing for proprietary software. (Like MySQL, Stanford CoreNLP etc.)
-Magnus
Depends on the perspective and your goals for your code. Being license
compatible to core code makes it possible to include it in core. In parts or
as a whole. If inclusion of some sort is the goal, the license needs to be
compatible.
> LibreOffice <https://www.libreoffice.org/> seems to be working, why not copy
> their licensing model?
They are actually using the MPLv2, like Thunderbird.
As I see it the problem with MPL is that you don't have to provide your whole
derivative work as open source. Only the actual changes, which makes porting a
feature extremely impractical as the changes can rely on other code which you
don't have to provide.
On 12.4.2017 02:06, Óvári wrote:
Why did R Kent James demand CardBook
<https://addons.mozilla.org/thunderbird/addon/cardbook/> be licensed under MPL
then? Zero win for CardBook...
Depends on the perspective and your goals for your code. Being license compatible to core code makes it possible to include it in core. In parts or as a whole. If inclusion of some sort is the goal, the license needs to be compatible.
LibreOffice <https://www.libreoffice.org/> seems to be working, why not copy
their licensing model?
They are actually using the MPLv2, like Thunderbird.
As I see it the problem with MPL is that you don't have to provide your whole derivative work as open source. Only the actual changes, which makes porting a feature extremely impractical as the changes can rely on other code which you don't have to provide.
Subject:Re: Proposal to start a new implementation of Thunderbird based on web technologies
From:Gervase Markham <ge...@mozilla.org>
To:The Wanderer; Tb-planning
Sent: Wednesday, 12/04/2017 16:16:49 16:16 GMT ST +0100 [Week 15]
On 12/04/17 15:04, The Wanderer wrote: > Will this rewrite take those people into account, and either provide > options for such UI variations, or make sure that it remains feasible to > hack the UI locally (by whatever means) to achieve that result? Oh, goodness, no. One massive advantage of producing a new product is that you don't have to carry over all the UI configuration baggage of the old one! This should certainly not be a goal; if it happens to become possible in some way, fine, the people who want it can make the effort to make it happen. Gerv
With respect, Phil, this sort of advocacy is precisely the sort of thing
I am suggesting is not helpful at this juncture.
It would be marginally less unhelpful if you were, by contributing to
the discussion, agreeing to commit coding resources under your control
to the Thunderbird++ project. Are you?
Gerv
Summary:
- Our base goes away. Gecko will change dramatically in the future, and dropping many features that Firefox does not need anymore, but that Thunderbird relies on.
- Our codebase is now roughly 20 years old. It heavily and intrinsically relies on those very Gecko technologies that are now being faded out, more or less aggressively.
- JavaScript and HTML5 have evolved dramatically. Entire applications in JS are now realistic, and have been done. There are several existing JS libraries we might leverage. JavaScript is an efficient language, which allows fast development. A rewrite in JavaScript makes sense now.
- We will learn from shortcomings of existing Thunderbird, and solve them, for example a more flexible address book, and cleanly supporting virtual folders without overhead.
- The goal of the rewrite is to be close to the existing Thunderbird, in UI and features, as a drop-in replacement for end users, without baffling them. They should immediately recognize the replacement as the Thunderbird they love. It will install and run as normal desktop application, like Thunderbird does today. It keeps user data local and private.
- We can also make a new, fresh desktop UI, as alternative to the traditional one, for new users. The technology also gives us the option to run it as mobile app.
- While we implement the new version of Thunderbird, the old codebase based on Gecko will be maintained until the rewrite is ready to replace the old one.
- I expect this effort to take roughly 3 years: 1 year until some dogfood (usable by some developers and enthusiasts). 2 years until a basic feature set is there. 3 years until we can replace Thunderbird.
I will describe each point in more detail below.
Based on the discussion, I'd like to amend or correct my proposal in the following points:
Ben
On 13/04/17 14:36, Phillip Hallam-Baker wrote:
> If you are committed to really open source then MIT or BSD are by far
> the best options.
<snip>
With respect, Phil, this sort of advocacy is precisely the sort of thing
I am suggesting is not helpful at this juncture.
It would be marginally less unhelpful if you were, by contributing to
the discussion, agreeing to commit coding resources under your control
to the Thunderbird++ project. Are you?
Gerv
Nobody pushed for GPL3.
> Since my code is under MIT License, my resources are available
> regardless. Though I would have to know which language to target first
> if I was going to write the back end of the code synthesizer. I have
> done C#, C, FORTRAN and Occam. Never targeted Javascript though.
The next TB is going to be written in JavaScript, that much is for sure.
Ben
Paul, this is an excellent analogy for the situation Thunderbird finds
itself in.
So far, we've been keeping up with Gecko with volunteer work only. Now
we have Jörg K hired to keep up to date with Gecko, and nonetheless the
situation is already so dire that he can't manage. He is facing new
breakage every day, and not enough time to fix it all properly.
And the hardest blow is still to come, after Gecko 57, when Firefox XUL
extensions are killed. The Firefox teams are already scratching to make
breaking changes. The worst is yet to come.
So, I think that analogy is very much true. And unfortunately, the
reaction of the Thunderbird community is the same as in that analogy,
trying to hold on to status quo.
Right now, the biggest risk for Thunderbird is to not move fast enough.
Getting going is not longer sufficient. We need to run now, race.
They do not need to publicly make the code available (or make it available to upstream), they only have to make it available to anyone they give the binaries to, i.e. their customers.
(This is drifting offtopic, if not already there. Also, I apologize for length.) On 2017-04-13 at 11:21, Tanstaafl wrote:On Wed Apr 12 2017 11:50:11 GMT-0400 (Eastern Standard Time), The Wanderer <wand...@fastmail.fm> wrote:So far as I recall, there are only two main things I still want from the Thunderbird 2 UI which I've been unable to regain:<snip> I've thought of a third one: the message header pane. AFAIK it's still not possible to set things up so you get the same information in the same space as was the case with TB2, and although the tweaks from http://kb.mozillazine.org/Thunderbird_3.1_-_New_Features_and_Changes#Gaining_Vertical_Space and ones based on but not identical to the ones from http://kb.mozillazine.org/Make_Thunderbird_3.1_look_like_Thunderbird_2 come close enough that I can live with the result, they're not perfect.
(I should perhaps clarify slightly: I don't insist that the quick-filter widget be a text box in the old style. I would have no problem if it behaved exactly like the collection of widgets that appear in the toolbar, albeit with less horizontal space between them than the toolbar provides, and if those widgets could only be moved as a unit - as long as that unit could be moved around like any other widget, rather than being fixed in a separate toolbar.)
Note: it was explained on one of the other lists (tb-planning? dev?) that it is entirely possible for Thunderbird to add WebExtension APIs independently of what the Firefox devs add for Firefox....and the underlying structural reasons why that decision was made are such that, much though I dislike it, I'm not sure it would be possible (much less practical) to make a different decision on the Thunderbird side with its significantly less available manpower.
The next TB is going to be written in JavaScript, that much is for sure.