Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Cosmos task list #12086

Open
smitpatel opened this Issue May 21, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@smitpatel
Copy link
Contributor

smitpatel commented May 21, 2018

Note: This issue is to track smaller task items for EFCore.Cosmos.Sql provider. Use #8443 for discussions/questions.


2.2 Preview 1

  • Basic model building
  • Discriminator value by default
  • Enough metadata support for DDL (database can be created, deleted)
  • Query root converted to select expression
  • Translate WHERE
  • Query execution
  • SaveChanges
  • Need to figure out how to build our package using this infrastructure
  • Navigation rewrite handling of owned types needs to be different (no new query roots) #13000

2.2 Preview 2

  • Binding to JSON objects vs. value buffer (necessary for client-evaluating expressions)

2.2 Preview 3

  • Don't map PK to the id property by default, instead map it to a shadow AK and generate a GUID
  • Implement async query execution
  • Figure out sync pipeline for DDL/DML (underlying API is async) #13160
  • ExecutionStrategy support
  • Switch to REST API
  • Preserve unmapped values (in the JSON) for updates
  • Materialize owned entity references and collections
  • Seeding (requires specifying 'id')
  • ToCollection API to map entities to collections explicitly

3.0 Preview 2

  • Switch from REST API to the new SDK, use custom user-agent
  • Set partition key to null by default
  • Remove ToContainer for owned types
  • Add ToProperty to configure the store property name. Empty value deactivates persistence.
  • Create 'id' value from PK values if not set (#13633)
    • Add the discriminator of the root type of it's not part of the key
    • Escape the separator in the values
    • Ensure that we don't generate temporary values for the primary key

3.0 Preview 3

  • Handle value converters
  • Add type mapping
  • Fluent API to configure the store property name for embedded entities

3.0 Preview 4

  • Fluent API to configure discriminator and use it in the convention (allow to remove discriminators for types not sharing a collection)
  • API to configure document collection facets (for partition keys, RU, size)
  • Use the same CosmosClient instance per context configuration
  • Diagnostic events including statistics (query cost, activity id)
  • Basic scalar collection mapping (#14762)
  • IsCosmos ModelBuilder extension method
  • Don't persist key value for the nested entities
  • Preserve unmapped properties for owned collections (#13578)
  • Handle projected owned entities in tracking queries (#13579)
  • Instead of value buffers use a JSON wrapper
  • FromSql support
  • Cache the generated SQL query and evaluate parameter values lazily
  • Deal with missing property values (#13131)
  • Handle partition key in queries and add configuration API
  • Use value comparers for client-eval (Join)

RTM

  • Support Column property attribute
  • Perf tests (#14546)
  • Doc comments
  • Samples and documentation (#12892)
  • NotNull annotations and checks
  • Review Internal namespace
  • Product version

Next steps

  • Provide access to unmapped properties (JSON or property bag) / JSON from root entry / JSON entity properties. Allow to plugin a custom JSON serializer by replacing a service.
  • Concurrency only works with ETags, we need to constrain the API that already exists in core level
  • Update/insert batching with Microsoft.Azure.CosmosDB.BulkExecutor or a sproc
  • Multiple query data consistency using consistency level and session token headers
  • Optimize Find by using 'id'
  • Built-in functions and operators mappings (#13168)
  • Bind more expressions to JObject instead of materializing (group by key selector, etc.)
  • Optimize query SQL (#13159)
  • IN operator optimization (#12635)
  • Translate SelectMany
  • Translate GroupBy
  • API to set default collection facets on model (includes discriminator property)
  • Query types
  • Configure TTL per document
  • Support splitting big entities into several items (2MB limit)
  • User defined functions
  • Support incremental updates (#13559). Allow to specify custom sprocs
  • Support hash and range indexes https://docs.microsoft.com/en-us/azure/cosmos-db/index-types
  • Support unique keys https://docs.microsoft.com/en-us/azure/cosmos-db/unique-keys
  • Spatial types (uses GeoJSON which supports point, polygon and linestring cc @bricelam) and functions and spatial indexes
  • Expose page size and continuation token for paging

Open issues

  • Mapping conditions to determine the entity type besides discriminator
  • Should we add helpers for Cosmos DB's change feed?
  • How should we handle queries that require feed options to execute across partitions?
  • How to handle cross-collection joins: (a) disallow; (b) evaluate in order specified or estimate cardinality (annotation in the model?) and evaluate that one first, get the keys, send to the next query; (c) n+1
  • Should we have CLI options to create/drop database?

@smitpatel smitpatel self-assigned this May 21, 2018

@ajcvickers ajcvickers added this to the 2.2.0 milestone May 21, 2018

@AndriySvyryd AndriySvyryd self-assigned this Aug 14, 2018

@smitpatel smitpatel added query-design and removed query-design labels Sep 1, 2018

@ajcvickers ajcvickers modified the milestones: 2.2.0-preview2, 2.2.0 Sep 11, 2018

@psibernetic

This comment has been minimized.

Copy link

psibernetic commented Sep 15, 2018

Probably don't call my tables Unicorn. 🦄 😄
image

@divega

This comment has been minimized.

Copy link
Member

divega commented Sep 19, 2018

@psibernetic Yes, we are planning to change that after preview. One possible solution is to name it after the derived DbContext type.

@psibernetic

This comment has been minimized.

Copy link

psibernetic commented Sep 19, 2018

Sounds like a great solution, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.