Salesforce平臺支持多租戶Multi tenant的核心設計思路

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

多租戶支持是全部雲服務提供商都須要着力實現的一種技術,用於雲基礎設施上在成本可控和保證安全性的前提下進行IT資源分享。編程

多租戶支持面臨的四大挑戰:安全

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

如何保證共享數據庫內不一樣租戶間的數據隔離,通俗的說,一個租戶不該該看到其餘租戶的數據。架構

  1. 當一個租戶對其擁有的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?app

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

系統基層實現發生變更,好比代碼版本升級,或者新的補丁進來時,不該該破壞每一個租戶私有的對象。設計

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

隨着系統租戶數量的增長,整個系統的響應時間不該該急劇降低。code

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)。這樣一來,模型的元數據做爲輸入,交給運行時引擎加工,生成運行時使用的模型和數據,三者各司其職,有嚴格的區分,實現了一種高度動態的內核。blog

注:本文的英文文字和圖片來自Salesforce官網:https://developer.salesforce.com/page/Multi_Tenant_Architecture接口

中文文字爲本文做者原創內容。

要獲取更多Jerry的原創文章,請關注公衆號"汪子熙":

相關文章
相關標籤/搜索