Slide1 l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 35

Multi-Tenant Magic: Under the Covers of the Force.com data Architecture PowerPoint PPT Presentation


  • 144 Views
  • Uploaded on
  • Presentation posted in: General

Multi-Tenant Magic: Under the Covers of the Force.com data Architecture. Craig Weissman Chief Software Architect salesforce.com. Safe Harbor Statement.

Download Presentation

Multi-Tenant Magic: Under the Covers of the Force.com data Architecture

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Slide1 l.jpg

Multi-Tenant Magic:

Under the Covers of the Force.com

data Architecture

Craig Weissman

Chief Software Architect

salesforce.com


Slide2 l.jpg

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 www.salesforce.com/investor. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.


True multi tenancy is our religion l.jpg

True Multi-Tenancy is our Religion

Time

Technology

Advances

Major

Architectural

Shift

Agenda

  • Our Religion

  • Virtual Database

  • App Model

Business

Model

Changes


Single tenant applications lots of waste l.jpg

Single tenant applications: lots of waste

App

App

Db

Db

App

App

Db

Db


Multi tenancy benefits are self evident but isolation is much easier said than done l.jpg

App

Db

Multi-tenancy benefits are self-evidentBut isolation is much easier said than done…


Our religion not all multi tenant designs are created equal l.jpg

App

Db

Our religion: Not all “multi-tenant” designs are created equal

“Can’t we create a

separate stack for just this

one customer? I promise

it’s just this one…”

App

Db


Introducing the force com metadata driven multi tenant internet application platform l.jpg

Introducing the Force.com metadata-driven, multi-tenant, Internet application platform

Poly-

Morphic

Application


Key architectural principles l.jpg

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


Metadata data and pivot table structures store data corresponding to virtual data structures l.jpg

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


The objects table stores metadata about custom objects tables l.jpg

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


The fields table stores metadata about custom fields columns l.jpg

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


The data heap table stores all structured data corresponding to custom objects l.jpg

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


A single slot can store various types of data that originate from different objects l.jpg

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


The indexes pivot table manages tenant specific selective indexes l.jpg

The Indexes pivot table manages tenant-specific selective indexes


The uniquefields pivot table facilitates uniqueness for custom fields l.jpg

The UniqueFields pivot table facilitates uniqueness for custom fields


The relationships pivot table facilitates referential integrity and optimizes joins l.jpg

The Relationships pivot table facilitates referential integrity and optimizes joins


All data metadata structures are partitioned to improve performance and manageability l.jpg

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


Application framework a whole lot for free l.jpg

Application Framework: a whole lot for free

  • Native Declarative features

  • Bulk Processing

  • The Recycle Bin

  • Full Text Search

  • Smart Bulk DML

  • Web Services APIs


Force com s native application framework provides declarative development no coding l.jpg

Force.com’s native Application Framework provides declarative development, no coding


Validation rules and simple formulas business analysts can code these l.jpg

Validation rules and simple formulas:Business analysts can “code” these


Not so simple rollup summary fields provide for easy cross object summaries l.jpg

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


Force com s bulk processing optimizations reduce overhead for data loads l.jpg

Force.com’s bulk processing optimizations reduce overhead for data loads


Data definition processing is optimized to avoid performance hits or concurrency limits l.jpg

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


The recycle bin smart undeletes l.jpg

The Recycle Bin: Smart Undeletes

  • Individual object instances (records)‏

  • Related object instances (parent/child records)‏

  • Entire fields and objects(dropped columns and tables)‏

Restore


Force com s full text search engine l.jpg

Force.com’s 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


Multi tenant query optimization principles l.jpg

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


Force com s query optimizer writes optimal queries for internal data access operations l.jpg

Force.com’s query optimizer writes optimal queries for internal data access operations

Multi-tenant optimizer statistics


The optimizer considers pre query selectivity measurements when writing a query l.jpg

Pre-Query Selectivity Measurements

Write final database access query, forcing …

User

Filter

Low

Low

… nested loops join; drive using view of rows that the user can see.

Low

High

… use of index related to filter.

High

Low

… ordered hash join; drive using Data table.

High

High

… use of index related to filter.

The optimizer considers pre-query selectivity measurements when writing a query


Apex force com s procedural frontier l.jpg

Apex: Force.com’s procedural frontier


Apex code is stored as metadata interpreted at runtime and cached for scalability l.jpg

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


Apex is deeply integrated with platform features l.jpg

Apex is deeply integrated with platform features

  • Bulk DML

  • Email and messaging

  • Asynchronous processing (Futures)

  • XmlStream / HTTP (RESTful) services classes

  • Declarative exposure as new Web Services


Force com governs apex code execution l.jpg

Force.com governs Apex code execution

Limits on:

  • CPU

  • Memory

  • # of DML statements

  • # calculations

  • # web service calls

  • … and more


Unit tests must accompany apex code l.jpg

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


Force com is a proven multi tenant application platform that performs and scales l.jpg

Force.com is a proven multi-tenant application platform that performs and scales

Quarterly Transactions(billions)‏

Page Response Time(ms)‏

2005

2006

2007

Fiscal Year


Concluding remarks l.jpg

Concluding Remarks

  • PaaS is a major architectural shifts

  • PaaS is Application focused, high level of abstraction

  • Force.com is the most mature, proven PaaS offering available today

  • Optimized for fast, secure, and reliable multi-tenant application development and deployment


  • Login