Support better multi-tenancy with @tenant transformer
See original GitHub issueIs your feature request related to a problem? Please describe. Multi-tenancy (MT) implementation support using Amplify is very limited. The only MT strategy that is possible is to have a tenantId column in tables. With 100+ tenants, table sizes might explode. Making lookups slow and deleting a tenant data complicated.
A better alternative is to have tenant specific tables using prefixing: tenantid1_posts, tenantid_2_posts … . This can possibly be achieved with a @tenant transformer with something like:
type Blog @model {
id: ID!
name: String!
posts: [Post] @connection(name: "BlogPosts")
}
type Post @model @tenant {
id: ID!
title: String!
blog: Blog @connection(name: "BlogPosts")
tenantid: String
}
such as when a tenantid is provided, the entry will be created in a separate tenantid prefixed table/collection.
About MT strategies https://d0.awsstatic.com/whitepapers/Multi_Tenant_SaaS_Storage_Strategies.pdf
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Understanding Multitenancy and Concurrent Development
This paper explores some of the technical challenges around implementing AEM in a multi-tenant environment, but many of these recommendations ...
Read more >Multi-Tenant Commercial Electrical Systems - Property ...
Once power is on the property via CenterPoint transformer, it is distributed to the various tenant spaces and common areas via service wireway...
Read more >VELTAIR: towards high-performance multi-tenant deep ...
In this work, we systematically analyze the opportunities and challenges of providing multi-tenant deep learning services on the general-purpose ...
Read more >Tenancy models to consider for a multitenant solution
This article describes the considerations you need to give to different models of multitenancy.
Read more >Introduction | laravel-multitenancy - Spatie
The package can determine which tenant should be the current tenant for the request. It also allows you to define what should happen...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mdegrees We are looking at more multi-tenancy support this year, however rather than look at a specific implementation could you uplevel a bit and go into detail around your use cases and scenarios? This would allow us to look at if there is a point feature causing problems here or a larger design that is cross cutting categories which needs implementation. Thanks.
No I don’t have an example of updating records handy, but you should be able to do this using Lambda and the DynamoDB document client.