34
Moving Sharing To a Parallel Architecture How We Made Sharing Operations Really Fast Seth White, Salesforce.com, Platform R&D @sethjwhite

Moving Sharing to a Parallel Architecture

Embed Size (px)

Citation preview

Page 1: Moving Sharing to a Parallel Architecture

Moving Sharing To a Parallel ArchitectureHow We Made Sharing Operations Really Fast

Seth White, Salesforce.com, Platform R&D@sethjwhite

Page 2: Moving Sharing to a Parallel Architecture

Safe harborSafe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Moving Sharing to a Parallel Architecture

Kapil EaswarPlatform R&D@keaswar_sfdc

Page 4: Moving Sharing to a Parallel Architecture

AgendaOverview of record-level accessThe “big data” challengeParallel sharingPerformance resultsDemo

Page 5: Moving Sharing to a Parallel Architecture

Sharing TablesSharing tables control record-level access

Account TableAcct ID Owner Acct Name

A1 Carol AcmeA2 Hailey General Inc.

Account Sharing TableAcct ID User/Group Row Cause

A1 Carol OwnerA1 Bob ManualA1 East RuleA2 Hailey Owner

Page 6: Moving Sharing to a Parallel Architecture

Sharing OperationsActions that update sharing tables

▪ Changing record owner▪ Changing user’s role▪ Adding/deleting/updating a sharing rule▪ Changing organization-wide defaults

Page 7: Moving Sharing to a Parallel Architecture

Sharing FeaturesThings that make sharing operations complex

▪ Role hierarchy▪ Implicit sharing

• Access to account implies access to opportunity• Access to opportunity implies access to account

▪ Portal sharing

Sharing operations are complex joins

Page 8: Moving Sharing to a Parallel Architecture

The Sharing ChallengeData size doubles every year

▪ Shared records• Jan 2012 – 6.2 billion• Apr 2013 – 13.5 billion

▪ Sharing records• Apr 2013

– Total – 43 billion– Largest org – 728 million

Page 9: Moving Sharing to a Parallel Architecture

Customers Are Getting Bigger100 million accounts2 million portal users100,000 users5000 roles1,000,000,000+ records

Page 10: Moving Sharing to a Parallel Architecture

What to do?

Page 11: Moving Sharing to a Parallel Architecture

What to Do?Make operations asynchronous

▪ MQ framework▪ Great for reliability

Make use of parallelism▪ …lots of parallelism▪ Individual objects are largely independent

Page 12: Moving Sharing to a Parallel Architecture

Account Parallelism Example

Account TableAcct ID Owner Acct Name

A1 Carol AcmeA2 Hailey General Inc.

Account Sharing TableAcct ID User/Group Row Cause

A1 Carol OwnerA1 Bob ManualA1 East RuleA2 Hailey Owner

Accounts are independent…

…so we can process them in parallel.

Page 13: Moving Sharing to a Parallel Architecture

Message QueueMany features becoming asynchronous

▪ Reaching 160,000,000 messages per day▪ 450 different types of messages▪ Volume doubled between releases

Messages stored in Oracle▪ HA/DR

Message processing is adaptive

Page 14: Moving Sharing to a Parallel Architecture

The Way We Were

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

PODRequest Is Received

Page 15: Moving Sharing to a Parallel Architecture

The Way We Were

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

PODRequest Is ReceivedDo Processing

Page 16: Moving Sharing to a Parallel Architecture

The Way We Were

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

PODRequest Is ReceivedDo Processing Respo

nse Is sent

Page 17: Moving Sharing to a Parallel Architecture

The Way We Were

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Request Is ReceivedDo Processing Respo

nse Is sent

Not Using the Cluster

Page 18: Moving Sharing to a Parallel Architecture

Parallel Sharing Lifecycle

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Request Is Received

Page 19: Moving Sharing to a Parallel Architecture

Parallel Sharing Lifecycle

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Enqueue seed message

Page 20: Moving Sharing to a Parallel Architecture

Parallel Sharing Lifecycle

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Response Is Sent

Page 21: Moving Sharing to a Parallel Architecture

Parallel Sharing Lifecycle

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Dequeue seed message

Page 22: Moving Sharing to a Parallel Architecture

Parallel Sharing Lifecycle

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

EnqueueParallelJobs

Page 23: Moving Sharing to a Parallel Architecture

OracleRAC

Parallel Sharing Lifecycle

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Process Batch 1

Page 24: Moving Sharing to a Parallel Architecture

Parallel Sharing Lifecycle

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Process Batch 2

Page 25: Moving Sharing to a Parallel Architecture

Parallel Sharing Lifecycle

OracleRAC

Queue

app7

app8

app1

app2

app3

app4

app5

app6

POD

Process Batch 3

Page 26: Moving Sharing to a Parallel Architecture

Performance Results

Sequential Parallel GainAccount 389 85 4.5xOpportunity 343 71 4.8xCustom Object 100 24 4.1x

Create Sharing Rule

all times are in seconds

Production Settings

Page 27: Moving Sharing to a Parallel Architecture

Overall Performance

4-5x faster

(in production environments)

Page 28: Moving Sharing to a Parallel Architecture

Performance Results

Sequential Parallel GainAccount 389 31 12.5xOpportunity 343 23 14.9xCustom Object 100 10 10x

Create Sharing Rule

all times are in seconds

Laboratory Settings

Page 29: Moving Sharing to a Parallel Architecture

Overall Performance

10-15x faster

(in laboratory environments)

Page 30: Moving Sharing to a Parallel Architecture

Release ScheduleSummer ’13

▪ Pilot▪ GA

Winter ’14▪ Pilot▪ GA

Page 31: Moving Sharing to a Parallel Architecture

DemoMonitoring Parallel Sharing

Page 32: Moving Sharing to a Parallel Architecture

ConclusionsContinuing platform investmentMoving to a parallel/asynchronous architectureMore sharing optimizations comingPath forward for scalability

Page 33: Moving Sharing to a Parallel Architecture

Seth White

Platform R&D, Salesforce.com

Kapil Easwar

Platform R&D,Salesforce.com

Page 34: Moving Sharing to a Parallel Architecture