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

New feature idea: Using ABP on Azure CosmosDB with the MongoDB API #2465

Closed
rlavaud opened this issue Dec 25, 2019 · 7 comments
Closed

New feature idea: Using ABP on Azure CosmosDB with the MongoDB API #2465

rlavaud opened this issue Dec 25, 2019 · 7 comments

Comments

@rlavaud
Copy link

rlavaud commented Dec 25, 2019

Hi all
I have been learning a lot about ABP via this forum and I started using it in an application idea that I have. One thing I want to do is being able to use Cosmos DB on azure which is compatible with the MongoDB api. Technically speaking you can use the mongodb module provided out of the box and it should work but the devil is in the details.
Here is where I run into issues:

  1. Cosmos DB really wants you to share a collection for multiple document type (to save money and be efficient)
  2. Cosmos DB has a concept of partition key for each collection. Using the partition key in a where clause will result in fact cheap queries but not having a partition key will result in full DB scan and is very expensive. Each logical partition can have a max of 10 gigs worth of data, it's a very important consideration during the design phase

Here is my feature idea
1 Create a new module Volo.Abp.CosmosDB which inherits from Volo.Abp.MongoDB
2 Add two new interfaces ITypedEntity and IPartitionedEntity
ITypedEntity will add a fields named Type
IPartitionedEntity will add a field named PartitionKey

ITypedEntity will hold a type name like 'User' or 'Order' etc to identify the type of entity pulled in the collection which multiple document type

IPartitionedEntity will have a value for the partition key to satisfy Cosmos DB

The new module would have a new ICosmosDBRepository which inherits from IMongoDBRepository to leverage existing mongo DB code as much as possible.

Is this a good idea or is this better left to each individual application to implement.

@maliming
Copy link
Member

Related: #386

@hikalkan hikalkan added this to the backlog milestone Dec 26, 2019
@hikalkan
Copy link
Member

hikalkan commented Dec 26, 2019

Thank you @rlavaud for your feature and implementation suggestions. I agree on your idea in general and added it to backlog.

Package name would be Volo.Abp.MongoDB.CosmosDB to reflect the dependency better.

@pramodbobde
Copy link

Hello @hikalkan sorry I can not see Volo.Abp.MongoDB.CosmosDB package

@maliming
Copy link
Member

hi @pramodbobde We haven't started yet.

@pramodbobde
Copy link

pramodbobde commented Aug 18, 2020

Now, Abp.io support CosmosDB or not? because I tried many ways to consume cosmmosDB but its my bad.
@maliming @hikalkan please guide

@maliming
Copy link
Member

maliming commented Aug 19, 2020

It's still in the roadmap.

#2532 CosmosDB integration with EF Core and MongoDB API

@hikalkan
Copy link
Member

@hikalkan hikalkan removed this from the backlog milestone Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants