I'm CCing this to our list of developers, because I think it's an interesting discussion to pull other folks into if they have comments. Inbox is more and more a community effort too.
The Inbox API isn't designed to be a "replacement" for IMAP and current mail standards, in the sense that it actually removes many features of IMAP. These are specific features that we feel offer marginal flexibility at the cost of incredible complexity. MIME structures is an example of this. Another is the plethora of ways to declare character encodings via RFC-2822 style messages. With the Inbox API, there is only a single `body` object and it's always unicode.
I also agree that HTTP/JSON isn't the most elegant or glorious protocol. But the reality is that today's developers and browsers+libraries know how to work with it, so if our goal is to help developers, then it's the right thing to use. Similarly, the removal of session state (e.g. `SELECT`ing folders) from the protocol, and adding predictable URIs also matches the way developers think about modern APIs.
We're also really excited about the
Delta Sync Endpoint, which converts a users' mailbox from a standard file-based representation into a transactional log of events. You need something like this to have multi-client sync, and it's opening up new ways of building super lightweight apps that can still connect and process mail data. With this API plus our websockets-based Ping endpoint, we could essentially build a new streaming sync service. But that's a ways off.
In actuality, much of the Inbox API's surface-level design can easily be swapped out for another protocol or datatype. See the
kellogs.py module for details on our current serialization formats. Right now more focused on providing a great product that has roots in a large open-source codebase, and would rather leave the protocol arguments to the IETF and other folks. If someday people want to migrate towars IMAPv5, JMAP, or "SMPLY" then it would be easy to add on top of Inbox.
But there's still a lot of catching up to do in the world of email before we invent something brand new. Developers need working code, not more RFCs to read.
--Michael