Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multi-Tenant Magic: Under the Covers of the data Architecture Craig Weissman Chief Software Architect

Similar presentations

Presentation on theme: "Multi-Tenant Magic: Under the Covers of the data Architecture Craig Weissman Chief Software Architect"— Presentation transcript:

1 Multi-Tenant Magic: Under the Covers of the data Architecture Craig Weissman Chief Software Architect

2 Safe Harbor Statement Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward- looking statements including but not limited to statements concerning the potential market for our existing service offerings and future offerings. All of our forward looking statements involve risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions proves incorrect, our results could differ materially from the results expressed or implied by the forward-looking statements we make. The risks and uncertainties referred to above include - but are not limited to - risks associated with possible fluctuations in our operating results and cash flows, rate of growth and anticipated revenue run rate, errors, interruptions or delays in our service or our Web hosting, our new business model, our history of operating losses, the possibility that we will not remain profitable, breach of our security measures, the emerging market in which we operate, our relatively limited operating history, our ability to hire, retain and motivate our employees and manage our growth, competition, our ability to continue to release and gain customer acceptance of new and improved versions of our service, customer and partner acceptance of the AppExchange, successful customer deployment and utilization of our services, unanticipated changes in our effective tax rate, fluctuations in the number of shares outstanding, the price of such shares, foreign currency exchange rates and interest rates. Further information on these and other factors that could affect our financial results is included in the reports on Forms 10- K, 10-Q and 8-K and in other filings we make with the Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of our website at, inc. assumes no obligation and does not intend to update these forward- looking statements, except as required by law.

3 True Multi-Tenancy is our Religion Time Technology Advances Business Model Changes Major Architectural Shift Agenda Our Religion Virtual Database App Model

4 Single tenant applications: lots of waste App Db App Db App Db App Db

5 Multi-tenancy benefits are self-evident But isolation is much easier said than done… App Db

6 Our religion: Not all multi-tenant designs are created equal App Db App Db Cant we create a separate stack for just this one customer? I promise its just this one…

7 Introducing the metadata-driven, multi-tenant, Internet application platform Poly- Morphic Application

8 Key Architectural Principles Stateless AppServers Database system of record No DDL All tables partitioned by OrgId Smart PKs, Polymorphic FKs Creative de-normalization and pivoting Use every RDBMS feature/trick

9 Metadata, data, and pivot table structures store data corresponding to virtual data structures

10 The Objects table stores metadata about custom objects (tables)

11 The Fields table stores metadata about custom fields (columns)

12 The Data heap table stores all structured data corresponding to custom objects

13 A single slot can store various types of data that originate from different objects

14 The Indexes pivot table manages tenant- specific selective indexes

15 The UniqueFields pivot table facilitates uniqueness for custom fields

16 The Relationships pivot table facilitates referential integrity and optimizes joins

17 All data & metadata structures are partitioned to improve performance and manageability Tables hash partitioned by OrgId Separate conn pools point to physical hosts App tier is also dynamically partitioned by OrgId Distributed metadata cache w/transactional invalidation

18 Application Framework: a whole lot for free Native Declarative features Bulk Processing The Recycle Bin Full Text Search Smart Bulk DML Web Services APIs

19 Force.coms native Application Framework provides declarative development, no coding

20 Validation rules and simple formulas: Business analysts can code these

21 Not so simple: Rollup-summary fields provide for easy cross-object summaries

22 Force.coms bulk processing optimizations reduce overhead for data loads

23 Data definition processing is optimized to avoid performance hits or concurrency limits Examples: Sort all records by primary key before attempting DML Operate on tables in deterministic order Slot reallocation for field datatype change Deferred calculation for new rollup-summary field Background processing of mass changes

24 The Recycle Bin: Smart Undeletes Restore Individual object instances (records) Related object instances (parent/child records) Entire fields and objects (dropped columns and tables)

25 Force.coms full-text search engine Asynchronously maintains indexes for all text fields MRU caches contain recently updated objects Optimizes ranking of search result records based on current user, modification history, and weighting preferences

26 Multi-tenant Query Optimization Principles Consistent SQL generation across the application Deep awareness of pivot table structure –Flex schema does impose a cost Tenant, user, object, fields statistics are crucial No runaway queries allowed Deep integration with the sharing model

27 Force.coms query optimizer writes optimal queries for internal data access operations Multi-tenant optimizer statistics

28 The optimizer considers pre-query selectivity measurements when writing a query Pre-Query Selectivity Measurements … use of index related to filter.High … ordered hash join; drive using Data table.LowHigh … use of index related to filter.HighLow … nested loops join; drive using view of rows that the user can see.Low Write final database access query, forcing … FilterUser

29 Apex: Force.coms procedural frontier

30 Apex code is stored as metadata, interpreted at runtime, and cached for scalability

31 Apex is deeply integrated with platform features Bulk DML and messaging Asynchronous processing (Futures) XmlStream / HTTP (RESTful) services classes Declarative exposure as new Web Services

32 governs Apex code execution Limits on: CPU Memory # of DML statements # calculations # web service calls … and more

33 Unit tests must accompany Apex code Required 75% code coverage Profiling is built into the platform Run during application install All tests are run before each platform release by us

34 is a proven multi-tenant application platform that performs and scales Page Response Time (ms) Quarterly Transactions (billions) Fiscal Year

35 Concluding Remarks PaaS is a major architectural shifts PaaS is Application focused, high level of abstraction is the most mature, proven PaaS offering available today Optimized for fast, secure, and reliable multi-tenant application development and deployment

Download ppt "Multi-Tenant Magic: Under the Covers of the data Architecture Craig Weissman Chief Software Architect"

Similar presentations

Ads by Google