Skip to content

Requirements AzureData

Colby Williams edited this page Mar 9, 2018 · 3 revisions

Offline Persistence

Phase 1: Simple Data Persistence

  • Offline persistence is enabled by default (for all resources)
  • User has option to disable offline persistence (for all resources)
  • Data is written remotely before caching locally
  • Only READING is supported while device is offline, WRITE throws a (useful) error
  • Add fromCache to response object when returning data from cache (device offline)

Phase 2: Offline Write

  • Add WRITE support when offline
  • Automatically push any local changes as soon as device comes back online

Phase 3

  • User has option to disable offline persistence for collections only (documents would respect parent collection option persistence)

Phase 4

  • Add Time-To-Live (TTL) functionality to improve GET performance for non-volatile data

Initial Notes

  • Cosmos DB DocumentDB/SQL API Coverage
  • Well-defined auth model (TokenProvider)
  • Support multiple Collections (thus multiple tokens)
  • Offline caching
  • Querying resources
    • Support for "raw" SQL queries (validation?)
    • Query type and custom syntax language for chaining together conditions
  • Save tokens to Keychain (AzureCore)
  • Validate Resource IDs
    • Resource IDs must not exceed 255 characters
  • Instantiate using both database name (auto adding .document.azure) or full URL for instances using custom domains
    • Configure override that takes database name
    • Configure override that takes database URL
  • Date format options & defaults
  • API for direct access to resources (database name, collection name, etc.) & extensions on instances
  • Document type to use as a superclass of custom model objects
  • DictionaryDocument type to support subscript syntax
  • Overrides for partition keys
  • Paging support for List
  • Optimistic concurrency
    • If-None-Match on GET
    • If-Match on PUT and DELETE
    • If-Modified-Since on GET (ignored when If-None-Match is specified)
  • Offline support
    • Cache everything by default
      • Disk (maybe memory in the future)
      • API for:
        • Opt per document/collection
        • Purge
      • Cache size limit/expiration
        • Options
    • Syncing/Concurrency Options
      • Latest wins (silent)
      • Mine wins (silent)
      • Manual (callback)
    • Get cached docs
    • Queue changes
    • Flag for transparent sync (agressive, 10 seconds, etc.)
  • Document user/master token differences (e.g. create DB, read vs write, etc.)
  • For Phase 2/future:
    • Start identifying libs for compatability support
    • Caching (HTTP cache + disk?)
    • Transaction support?
    • Realtime DB (websocket-based connection to support real time push/pull a la Firebase)
Clone this wiki locally