- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在制作一个将订阅作为 Multi-Tenancy 应用程序出售的 web 应用程序。我使用的技术是导轨。
但是,它不仅仅是使用当前应用程序的孤立租户。
每个租户创建产品并将其发布到他们的个人应用实例上。每个租户都有自己的用户群。
有问题的规范是租户可以将其产品分享给其他租户,以便他们可以转售。
解释 :
FruitShop sells apple oranges and tomatoes.
VegetableShop sells radish and pepper bell.Fruitshop share tomatoes to other shops.
VegetableShop decide to get tomatoes from the available list of shared items and add it to its inventory.
Now a customer browsing vegetableshop will see radish, pepper bell and Tomatoes.
As you can guess, a
select products where tenant_id='vegetableshop_ID'
will not work.
tenant_to_product
建立多对多的关系将具有
tenant_id
的表,
product_id
,
price_id
甚至发布开始和结束日期。产品将是一个“半租户表”,其中租户 ID 被租户创建者 ID 替换,以了解谁是原始所有者。
select tenant_to_products.*
where tenant_to_products.tenant_ID='current tenant'
AND (tenant_to_products.product match publication constraints)
for each tenant_to_product do
# it will trigger a lot of DB call
Display tenant_to_product.product with tenant_to_product.price
最佳答案
正如您已经解决的那样,您将需要对产品机制进行更复杂的订阅。听起来您走在正确的轨道上。
尽可能地抽象信息。例如,不要将表称为“tenant_to_product”,而是将其称为“tenant_relationships”,并将产品 ID 作为该表中的一列。
然后,当租户想要提供服务时,您只需在“服务 ID”表中添加一列,而无需添加整个额外表。
为了提高性能,您可以拥有一个只读数据库服务器,其租户关系会稍微延迟更新。 Azure 或类似的云服务将使这很容易启动。但是,除非您的用户数量超过 100 万,否则可能不需要这样做。
我建议你考虑:
关于multi-tenant - Multi-Tenancy 与租户共享数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21915876/
2 个不同的租户(租户 A 中的订阅 A 和租户 B 中的订阅 B) 我们在 Azure 云中有一个订阅,并且我们已经设置了 Azure Keyvault。我们可以在那里创建 key 并使用其中一个
如何在代码中配置 Windows Azure Active Directory 租户? 我希望能够允许用户访问我的 Multi-Tenancy SaaS 应用程序、注册我的服务并为其配置 Azure
我阅读了有关 headless 应用程序如何通过 Azure 进行身份验证的各种文章。我对术语有点困惑。在此sample code ,它说它需要一个 Azure AD 租户帐户。 我的理解是Azure
背景:我正在使用 Django 开发我的第一个 Multi-Tenancy 应用程序。我已经成功按照 https://github.com/tomturner/django-tenants 给出的教程
我正在尝试让 Microsoft 验证我的应用。第一步是成为微软合作伙伴,但我不知道如何登录? 当我尝试创建 Azure AD 租户时,我被告知我没有权限(即使我拥有该帐户)。 我无法使用用于登录 A
我开始学习 Microsoft Azure,但我陷入困境谁能详细告诉我 Microsoft 帐户、租户和订阅之间有什么区别? 最佳答案 当您说“Microsoft 帐户”时,这通常指个人 Micros
摘要:如何动态获取Microsoft用户的Tenant ID? 详细信息:我正在编写一个 Multi-Tenancy 应用程序(C# 和 .NET Core),我想使用它来创建订阅和 register
我正在尝试在澳大利亚区域创建 Azure B2C 租户,但在区域下拉列表中找不到澳大利亚。文档显示 Azure B2C 租户在所有位置都可用。我错过了什么吗? 最佳答案 基于Data residenc
我正在尝试在澳大利亚区域创建 Azure B2C 租户,但在区域下拉列表中找不到澳大利亚。文档显示 Azure B2C 租户在所有位置都可用。我错过了什么吗? 最佳答案 基于Data residenc
我正在尝试 ad-b2c,天哪,即使第一步结果也非常令人沮丧。无论如何,这是我的问题: 我的现有订阅有一个默认目录,该目录有自己的 mydefaultdirectory.onmicrosoft.com
我正在开发一个 ASP.NET MVC 应用程序,它必须访问 Office365 API。我使用了描述here为了获得仅应用程序的访问 token 。 现在,运行应用程序后,我进入 AAD 同意流程以
假设我购买了位于 Azure AD 租户 1(与资源林同义)中的 Multi-Tenancy 应用程序(HR 软件)。 我还购买了 Azure 租户 2 中另一家公司拥有的健康应用程序。 我不拥有租户
这是我的场景:新用户使用 Azure B2C 工作流程注册我们的 Web 应用程序。用户可以使用不同的身份提供商(Google、Microsoft、Amazon)进行注册。用户需要访问数据库。我想将他
我正在尝试删除我的 Azure AD 租户,但它显示: Directory has one or more applications. 我按照此处的步骤操作 https://support.micro
我有两个 B2C 租户。一种用于生产环境,另一种用于临时环境。我想将所有用户从生产租户迁移到暂存租户。我想定期这样做,用真实数据对临时环境进行测试。我知道我可以读取一个租户的所有用户并将其写入另一个租
Microsoft 的 UI 显示所有初始检查均已通过,他们可以删除此 Azure Active Directory 租户。随后出现消息称 Microsoft 实际上无法删除租户。我还能做些什么来真正
我正在尝试删除我的 Azure AD 租户,但它显示: Directory has one or more applications. 我按照此处的步骤操作 https://support.micro
我有两个 B2C 租户。一种用于生产环境,另一种用于临时环境。我想将所有用户从生产租户迁移到暂存租户。我想定期这样做,用真实数据对临时环境进行测试。我知道我可以读取一个租户的所有用户并将其写入另一个租
Microsoft 的 UI 显示所有初始检查均已通过,他们可以删除此 Azure Active Directory 租户。随后出现消息称 Microsoft 实际上无法删除租户。我还能做些什么来真正
有没有办法阻止用户登录到他们自己的 AAD 租户?例如,允许登录 contoso.onmicrosoft.com 但不允许登录 fabrikam.onmicrosoft.com。 我的客户有一个高度受
我是一名优秀的程序员,十分优秀!