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

What's in a Mobile Database?

What's in a Mobile Database?

Samuel E. Giddins

March 03, 2015
Tweet

More Decks by Samuel E. Giddins

Other Decks in Technology

Transcript

  1. ▸ Running on a device ▸ Can’t update database code

    on a whim ▸ Little RAM ▸ Relatively few CPU cores ▸ Multiple processes ▸ Long-running use of data
  2. ▸ Querying ▸ Reading values ▸ Maintainable API ▸ Safe

    Migrations ▸ Static + Dynamic Schemas
  3. void *mmap( void *addr, size_t length, int prot, int flags,

    int fd, off_t offset ); This function is magical.
  4. Blur the line between in-memory and on-disk to get the

    best of both worlds. Take advantage of optimizations in the kernel and let it do the hard work for you.
  5. WELL-DEFINED THREADING MODEL ▸ What can be passed between threads?

    ▸ How easily can I isolate things that can’t be?
  6. Built with speed & safety in mind: ▸ No reader

    lock ▸ Allow concurrent reading & writing ▸ Let the user know when they violate the threading contract
  7. ▸ First-class model objects ▸ Support for persisted + in

    memory objects ▸ No invisible web of classes
  8. ▸ Lazily create objects in memory ▸ Access & set

    values directly in the DB ▸ Optimized query engine
  9. ▸ What do I need a reference to? ▸ Platform

    coherence ▸ Isolate DB interaction ▸ Make it impossible to mess up
  10. ⾠ This might not be the approach for everyone. Take

    a look at the goals, and see if they align with your own.
  11. My company, Realm, is working towards building a database that

    hits these bullet points. I’m not here to sell you on Realm. But building something that mirrors those goals is why we exist.