Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MIT N1 Preview

Evan Morikawa
September 28, 2015

MIT N1 Preview

A preview of N1, the open source extensible email client.

Evan Morikawa

September 28, 2015
Tweet

More Decks by Evan Morikawa

Other Decks in Technology

Transcript

  1. ~200B Emails / day (Radicati Group April 2014) ~45B WhatsApp

    + FB (TechCrunch. Jan 2015) ~30B WeChat (Speculative. Equivalent DAU to WhatsApp) ~40B iMessage (Tim Cook 2014) ~0.5B Tweets (Twitter 2015) ~0.7B Snapchat (Verge 2014) ~0.01B Slack (FacstCompany, Feb 2015)
  2. Nylas API Platform • REST APIs for email, contacts, and

    calendar • Gmail, Exchange, iCloud, Yahoo, and hundreds more. • Powers email integration in CRMs, mobile apps, etc. Making email easy.
  3. N1 Mail Client • Clean, minimal foundation with “must-have” features

    • Robust APIs for dealing with threads, messages, etc. • Cross-platform: Mac, Windows, Linux • Easy to extend with modern technologies Making email easy. Nylas API Platform
  4. Why Electron? • Mac, Windows, Linux support • Great APIs

    for desktop integration • Support for C/C++ code via native modules • Atom = open-source sample code and tooling • Large numbers of developers know JavaScript, HTML, CSS, can write extensions easily!
  5. Challenges 1. NodeJS is single-threaded 
 2. Windows live in

    separate processes
 3. Platform-specific styling an exercise to the reader
  6. Party on the Main Thread • BrowserWindows render and run

    JavaScript on the same thread. • All work is created equal. Great for a web server, not so great for a desktop app. • (Web Workers don’t get NodeJS integration)
  7. Party on the Main Thread • Animations • Transitions •

    Scrolling • User interaction • Applying mailbox changes • Running spellcheck • Downloading attachments • Running mail rules
  8. Windows are process-isolated • No shared memory between windows •

    Messaging between windows requires hops through the parent application process • Major conceptual barrier to multi-window app development
  9. Multi-window Flux Architecture Application Process Task Store ActionBridge QueueTask: Send

    Draft QueueTask: Send Draft ActionBridge DraftStore JSON via IPC
  10. 1. JavaScript is single-threaded 
 
 2. Windows live in

    separate processes
 
 3. Platform-specific styling an exercise to the reader Move CPU-intensive tasks to a worker window Bridge Flux stores and actions across windows Fine-tune CSS to match platform standards