使用 Namespaces API,您只需为每个租户指定唯一的命名空间字符串,即可轻松在租户之间对数据进行分区。您只需使用命名空间管理器为每个租户全局设置命名空间(而不是针对特定请求明确设置命名空间)。默认情况下,支持命名空间的 API 始终使用此当前命名空间。
Namespaces API 与 Google Workspace 集成,这样您就可以将 Google Workspace 网域用作当前命名空间。由于 Google Workspace 可让您将应用部署到您拥有的任何网域,因此您可以轻松为与 Google Workspace 账号关联的所有网域设置独一无二的命名空间。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-06。"],[[["The Namespaces API in Google App Engine allows for data compartmentalization through a namespace manager, which is incorporated into specific namespace-enabled APIs, primarily for first-generation runtimes."],["Multitenancy, a software architecture where a single application instance serves multiple client organizations, is a key use case for the Namespaces API, enabling simplified administration, a customized user experience, and better scalability."],["Using the Namespaces API, you can partition data across tenants by assigning a unique namespace string to each, which is set globally via the namespace manager and used by namespace-enabled APIs by default."],["The Namespaces API integrates with Google Workspace, allowing the use of Google Workspace domains as current namespaces, and the supported APIs with this include Datastore, Memcache, Task Queue, and Search."],["The Namespaces API has other uses beyond multitenancy, such as compartmentalizing user information, separating admin and app data, and creating separate data stores for testing and production."]]],[]]