天天看點

Salesforce平台支援多租戶Multi tenant的核心設計思路

Multitenancy is the fundamental technology that clouds use to share IT resources cost-efficiently and securely.

Salesforce平台支援多租戶Multi tenant的核心設計思路

多租戶支援是所有雲服務提供商都需要着力實作的一種技術,用于雲基礎設施上在成本可控和保證安全性的前提下進行IT資源分享。

多租戶支援面臨的四大挑戰:

how to keep tenant-specific data secure in a shared database so that one tenant can’t see another tenant’s data?

如何保證共享資料庫内不同租戶間的資料隔離,通俗的說,一個租戶不應該看到其他租戶的資料。

當一個租戶對其擁有的schema對象或者應用程式設計接口進行調整時,不應影響到其他租戶的功能和整個系統的可用性。

How can one tenant customize various schema objects and an application’s user interface in real time without affecting the functionality or availability of the system for all other tenants?

How can the system’s code base be patched or upgraded without breaking tenant-specific schemas?

系統基層實作發生變動,比如代碼版本更新,或者新的更新檔進來時,不應該破壞每個租戶私有的對象。

And how will the system’s response time scale as tens of thousands of tenants use the service?

随着系統租戶數量的增加,整個系統的響應時間不應該急劇下降。

Salesforce平台支援多租戶Multi tenant的核心設計思路

Force.com’s core technology uses a runtime engine that materializes all application data from metadata—data about the data itself. In Force.com’s well-defined metadata-driven architecture, there is a clear separation of the compiled runtime database engine (kernel), tenant data, and the metadata that describes each application. These distinct boundaries make it possible to independently update the system kernel and tenant-specific applications and schemas, with virtually no risk of one affecting the others.

Salesforce應對這些挑戰的設計是,采取了一種運作時引擎的思路,所有的應用資料都通過中繼資料生成,即所謂中繼資料驅動的架構(metadata driven architecture)。這樣一來,模型的中繼資料作為輸入,交給運作時引擎加工,生成運作時使用的模型和資料,三者各司其職,有嚴格的區分,實作了一種高度動态的核心。

Salesforce平台支援多租戶Multi tenant的核心設計思路
Salesforce平台支援多租戶Multi tenant的核心設計思路

注:本文的英文文字和圖檔來自Salesforce官網:

https://developer.salesforce.com/page/Multi_Tenant_Architecture

中文文字為本文作者原創内

繼續閱讀