Force.com Platform

Created by: Roy Gilad
March 2012
Database As A Service

Create any table

Add any field
Build any relationship
Security & sharing

Automatic tuning
Automatic backups
Automatic upgrades
Logic As A Service
Declarative Logic
History Tracking
Rollup Summary Fields
Workflow Rules

Formula-Based Logic
Formula Fields
Validation Rules

Procedural Logic
Apex Triggers
Apex Classes

Apex Web Services
Logic As A Service
Workflow
End-to-end approval processes
Immediate & time-based workflow
Email notifications
Automated task creation
Automated field updates
Reminders
Flexible routing options

Send outbound SOAP messages
Force.com’s native Application
Framework provides declarative
development, no coding
Validation rules and simple formulas:
Business analysts can “code” these
Not so simple: Rollup-summary fields
provide for easy cross-object summaries
User Interface as a Service

Profile /
Record Type
/ Page
Layout
mapping
controls UI
behavior

UI generated
automatically,
no technical
skills required

UI generated
by developer
/ technologist

Full
control of UI
behavior
Limited
control over
look and
feel, but all
UIs are
consistent

Page Layout

Point and click to
add Custom
Buttons and
Embedded
Mashups

Visualforce
Single tenant applications: lots of waste



App

Db










 App
Db





App


Db














 App
Db








Multi-tenancy

App




Db

 



How it’s built?
Force.com: metadata-driven, multi-tenant,
Internet application platform

PolyMorphic
Application
Metadata, data, and pivot table
structures store data corresponding to
virtual data structures
The Objects table stores metadata
about custom objects (tables)
The Fields table stores metadata about
custom fields (columns)
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
The Indexes pivot table manages
tenant-specific selective indexes
The UniqueFields pivot table facilitates
uniqueness for custom fields
The Relationships pivot table facilitates
referential integrity and optimizes joins
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
Force.com’s bulk processing
optimizations reduce overhead for data
loads
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


Restore

Individual object instances
(records)



Related object instances
(parent/child records)



Entire fields and objects
(dropped columns and
tables)
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
• 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
Multi-tenant
optimizer
statistics
Apex code is stored as metadata,
interpreted at runtime, and cached for
scalability
Features
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
Limits on:
 CPU

 Memory
 # of DML statements
 # calculations
 # web service calls
 … and more
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
thank you
www.conduit.com

© Copyright 2012

What is force.com?

  • 1.
    Force.com Platform Created by:Roy Gilad March 2012
  • 4.
    Database As AService Create any table Add any field Build any relationship Security & sharing Automatic tuning Automatic backups Automatic upgrades
  • 5.
    Logic As AService Declarative Logic History Tracking Rollup Summary Fields Workflow Rules Formula-Based Logic Formula Fields Validation Rules Procedural Logic Apex Triggers Apex Classes Apex Web Services
  • 6.
    Logic As AService Workflow End-to-end approval processes Immediate & time-based workflow Email notifications Automated task creation Automated field updates Reminders Flexible routing options Send outbound SOAP messages
  • 7.
    Force.com’s native Application Frameworkprovides declarative development, no coding
  • 8.
    Validation rules andsimple formulas: Business analysts can “code” these
  • 9.
    Not so simple:Rollup-summary fields provide for easy cross-object summaries
  • 10.
    User Interface asa Service Profile / Record Type / Page Layout mapping controls UI behavior UI generated automatically, no technical skills required UI generated by developer / technologist Full control of UI behavior Limited control over look and feel, but all UIs are consistent Page Layout Point and click to add Custom Buttons and Embedded Mashups Visualforce
  • 11.
    Single tenant applications:lots of waste   App  Db           App Db     App   Db               App Db       
  • 12.
  • 13.
  • 14.
    Force.com: metadata-driven, multi-tenant, Internetapplication platform PolyMorphic Application
  • 15.
    Metadata, data, andpivot table structures store data corresponding to virtual data structures
  • 16.
    The Objects tablestores metadata about custom objects (tables)
  • 17.
    The Fields tablestores metadata about custom fields (columns)
  • 18.
    The Data heaptable stores all structured data corresponding to custom objects
  • 19.
    A single slotcan store various types of data that originate from different objects
  • 20.
    The Indexes pivottable manages tenant-specific selective indexes
  • 21.
    The UniqueFields pivottable facilitates uniqueness for custom fields
  • 22.
    The Relationships pivottable facilitates referential integrity and optimizes joins
  • 23.
    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
  • 24.
    Force.com’s bulk processing optimizationsreduce overhead for data loads
  • 25.
    Data definition processingis 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
  • 26.
    The Recycle Bin:Smart Undeletes  Restore Individual object instances (records)  Related object instances (parent/child records)  Entire fields and objects (dropped columns and tables)
  • 27.
    Force.com’s full-text searchengine • 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
  • 28.
    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
  • 29.
    Force.com’s query optimizerwrites optimal queries for internal data access operations Multi-tenant optimizer statistics
  • 30.
    Apex code isstored as metadata, interpreted at runtime, and cached for scalability
  • 31.
  • 32.
    Apex is deeplyintegrated with platform features • Bulk DML • Email and messaging • Asynchronous processing (Futures) • XmlStream / HTTP (RESTful) services classes • Declarative exposure as new Web Services
  • 33.
    Force.com governs Apexcode execution Limits on:  CPU  Memory  # of DML statements  # calculations  # web service calls  … and more
  • 34.
    Unit tests mustaccompany 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
  • 35.