| An HTTP-based IMAP replacement makes me want to put a bullet in my brain. IMAP is actually really good for the most part. It just has a few legacy warts (like EXPUNGE notifications being index based instead of UID-based), but a lot of the newer extensions fix these problems. The CONDSTORE and QRESYNC extensions drastically simplify re-synchronizing the client and server and have been around for quite a few years at this point. Honestly, if I was to design a brand new protocol for mail, it would be very close to what IMAP is today and just make a number of the newer extensions mandatory (UIDPLUS, LITERAL+ with Google's caveat for APPEND, NAMESPACE, SPECIAL-USE, SASL-IR, CONDSTORE, QRESYNC, perhaps a few others). I'd also include IDLE, but not as a distinct command - rather just have it always-on (at least as long as a folder is selected). The #1 issue most developers have with IMAP is that every server implements a different subset of extensions. This isn't an IMAP-specific problem, however, it's just what happens to any protocol that gets as much adoption as IMAP and lives as long as IMAP has lived. There will always be new extensions for any protocol to improve upon it in various ways just like no framework API is ever complete. Forcing all mail clients to go through HTTP for mail access is just retarded. It's depressing that so many people love the idea of using HTTP for everything. Honestly, wtf? |
HTTP is just one potential transport for JMAP, the spec itself is:
* heavily based on IMAP concepts, borrowing particularly from CONDSTORE and QRESYNC but also taking the better bits from Card/CalDAV around opaque syncToken rather than forcing a sequential modseq, because that's harder to cope with distributed systems on the server with exact ordering * designed a lot more around server side sort/search, because UID ordering sucks in various ways - try moving some messages into your INBOX and noticing that iOS mail displays them in APPEND order rather than date order. * connectionless / stateless as far as possible, because connections drop in the IMAP world, particularly in mobile, and the cost of a new SELECT is high, even with QRESYNC. It still has to create a COW view of the message space because it has to keep message numbers that don't track EXPUNGEs just in case the client wants to run a pipelined command. * it's a regular datastructure rather than the abomination which is IMAP. Things like system flags starting with a \ which makes them not an atom, yet sent like an atom without quoting.
In general, IMAP has many things which are done implicitly rather than explicitly, which add cost that you can't avoid paying at both ends, even if you don't want it. Oh yeah, and it's really quite chatty. We're 280ms away from our server, so we really notice the chattyness. Go watch the video at http://jmap.io (recorded in Australia against a server in New York) and tell me you could do that via IMAP.
JMAP is a batch protocol that happens to be easy to implement over HTTP.