SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
How One BillionSalesforce recordsCan Be Replicated with Minimal API Usage 
Baruch Oxman 
R&D Manager, Implisit 
@implisithq, @baruchoxman
Baruch Oxman 
R&D Manager
In this session… 
•Implisit -Intro & Motivation 
•Salesforce APIs Usage & Limits -Overview 
•Efficient use of Salesforce APIs 
•Scale and limitations 
•Other pitfalls and tips
Implisit –The End of CRM Data Entry 
•Implisit uses Data-Mining and Machine Learning to keep Salesforce updated: 
–Updating emails and calendar events to Salesforce automatically 
–Creating and updating Accounts, Opportunities, Contacts, Leads 
–Keeping team informed on all client communications 
•Using text analysis: 
–Creating meaningful business insights 
–Improving forecasting and sales pipeline management 
•Requires Salesforce data replication for offline processing
Data Replication Goals 
•Minimize your API usage 
–Avoid reaching the API limit 
–API limits are shared between all API-connected apps –other apps can be blocked 
•Minimize sync cycle time 
–Don’t makeour customers wait for too long
Salesforce API Limits 
•Daily API limits for Salesforce Editions: 
–Unlimited/Performance: # of users x 5,000, up to 1,000,000 
–Enterprise/Professional: # of users x 1,000 
–Developer: 15,000 
–Sandbox: 5,000,000 
•In-parallel API calls limit (25 –production, 5 –dev) 
Source & more info: https://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm
Performance Stats 
•Keeping over one billionSalesforce records replicated in-sync 
–27 Salesforce object types are replicated (e.g. Accounts, Contacts) 
•Initial sync 
–600-1000 API calls in total 
•Updates sync 
–200-400 API calls in total 
–Performed every few hours
•Bulk (Async) API 
–Large amounts of records in a single request (fewer API calls) 
–Slow, requires polling for results 
–Implements internal retries 
–Does not support some objects (e.g. OpportunityHistory) 
Salesforce API Types 
•REST API 
–Fast, synchronous queries 
–Up to 2,000 records per request 
–Each request –single API call 
–Simple usage 
https://developer.salesforce.com/blogs/tech-pubs/2011/10/salesforce-apis-what-they-are-when-to-use-them.html
Are you ready to replicate ?
Replication method 
Initial Fetching 
Changes Fetching
Replication method –Initial fetching 
•Using Bulk API as much as possible 
•Fetch all records for each relevant object type 
–Lots of data 
–Only non-deleted records 
•Paginate by CreatedDate 
•Example: 
–1stquery: “…ORDER BY CreatedDateLIMIT 100000” 
–Subsequent: “…WHERE CreatedDate> 2014-08-31T02:29:29Z ORDER BY CreatedDateLIMIT 100000”
Replication method –Changes fetching 
•Fetch only records that changed since the previous fetch time 
–Less data –only changes 
–Take care of updates and deletions 
•Using SystemModstampas indicator for changes in record 
•Same pagination logic as in initial fetching 
•Example: 
–1stquery: “…WHERE SystemModstamp> 2014-07-31T02:29:29Z AND ORDER BY CreatedDateLIMIT 100000” 
–Subsequent:“…WHERE SystemModstamp> 2014-07-31T02:29:29Z AND CreatedDate> 2014-08-31T02:29:29Z ORDER BY CreatedDateLIMIT 100000” 
•Bulk changes fetching VS getUpdated()
Deleted items 
•Motivation: 
–Required to maintain consistent sync 
•Two implementation options 
–Use getDeleted()call in SOAP API (our choice) 
–Use queryAll(isDeleted= True)call in REST API 
•Potentially more API calls 
•Some objects can become “undeleted” !
Getting all fields 
•No “SELECT *” support 
•Get all fields for table using “describe” 
–Optionally, filter the fields (skip custom fields, etc…) 
–Non-visible fields (due to security restrictions) 
•Use the field names in the query 
•Limitation: query length cannot exceed 20,000 characters* 
* http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select.htm
User Access Restrictions 
•Full access rights are strongly encouraged 
–Full view of all objects 
–Limited access rights → slower queries 
•Reference Fields –special case 
–Tasks / Events -WhoId, WhatId 
–Attachment -ParentId 
–Reference fields make access checks in Salesforce even slower 
–Limited to 100,000 different values per query 
–Solution: query in smaller chunks
Error handling 
•Nothing is fail-safe 
•Different APIs produce different errors 
•Examples: 
–Query too long (too many fields) 
–Scale limitations 
–Communication errors 
–Salesforce maintenance windows 
•Add support for anything you encounter 
–“Rare” becomes “frequent” once you scale 
•ABR (Always Be Retrying) 
•Remember to clean up upon errors 
–Close open bulk jobs
Unavailable Salesforce objects 
•Some orgs make some of the objects unavailable 
–Using security restriction 
–For example, Lead or Opportunity 
•Check using describeSObjectsfor each object, before fetching 
•Safely skip when not supported
Summary 
•Implisit -Intro & Motivation 
•Salesforce APIs Overview 
•Efficient use of API 
•Scale and limitations 
•Other pitfalls and tips
Additional Resources: 
•API Call Basics 
•Salesforce App Limits Cheat Sheet 
•Understanding Execution Governors and Limits 
•Query & Search Optimization Cheat Sheet 
•Bulk Query Details
How One Billion Salesforce records Can Be Replicated with Minimal API Usage
How One Billion Salesforce records Can Be Replicated with Minimal API Usage

Weitere ähnliche Inhalte

Was ist angesagt?

APIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaAPIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaMarjukka Niinioja
 
Monolith to microservices - our journey
Monolith to microservices - our journeyMonolith to microservices - our journey
Monolith to microservices - our journeyGiles Williams
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsColdFusionConference
 
Difference between sage erp 300 standard and sage erp 300 advanced
Difference between sage erp 300 standard and sage erp 300 advancedDifference between sage erp 300 standard and sage erp 300 advanced
Difference between sage erp 300 standard and sage erp 300 advancedStuart Braud
 
XML Publisher (www.aboutoracleapps.com)
XML Publisher (www.aboutoracleapps.com)XML Publisher (www.aboutoracleapps.com)
XML Publisher (www.aboutoracleapps.com)Chris Martin
 
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...SPTechCon
 
SITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSA
SITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSASITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSA
SITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSAsitist
 
Exchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug JohnsonExchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug JohnsonAcumatica Cloud ERP
 
Site templates, site life cycle management and Modern SharePoint
Site templates, site life cycle management and Modern SharePointSite templates, site life cycle management and Modern SharePoint
Site templates, site life cycle management and Modern SharePointAlbert-Jan Schot
 
SEO - Trending search
SEO - Trending searchSEO - Trending search
SEO - Trending searchAshish Namdeo
 
Bpm company code camp - configuration or coding with pega
Bpm company   code camp - configuration or coding with pegaBpm company   code camp - configuration or coding with pega
Bpm company code camp - configuration or coding with pegaCodecamp Romania
 
Sage 300 ERP: Environment setup and configuration
Sage 300 ERP: Environment setup and configurationSage 300 ERP: Environment setup and configuration
Sage 300 ERP: Environment setup and configurationSage 300 ERP CS
 
Sage 300 ERP: Advanced virtulization optimization
Sage 300 ERP: Advanced virtulization optimizationSage 300 ERP: Advanced virtulization optimization
Sage 300 ERP: Advanced virtulization optimizationSage 300 ERP CS
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server DatabasesColdFusionConference
 
Installing SharePoint 2013 – Step by Step presented by Alan Richards
Installing SharePoint 2013 – Step by Step presented by Alan RichardsInstalling SharePoint 2013 – Step by Step presented by Alan Richards
Installing SharePoint 2013 – Step by Step presented by Alan RichardsEuropean SharePoint Conference
 
Office Online Server 2016 - a must for on-premises installation for SharePoin...
Office Online Server 2016 - a must for on-premises installation for SharePoin...Office Online Server 2016 - a must for on-premises installation for SharePoin...
Office Online Server 2016 - a must for on-premises installation for SharePoin...SPC Adriatics
 
Real-time SQL Access to Your Salesforce.com Data Using Progress Data Direct
Real-time SQL Access to Your Salesforce.com Data Using Progress Data DirectReal-time SQL Access to Your Salesforce.com Data Using Progress Data Direct
Real-time SQL Access to Your Salesforce.com Data Using Progress Data DirectSalesforce Developers
 

Was ist angesagt? (20)

APIfying an ERP - ongoing saga
APIfying an ERP - ongoing sagaAPIfying an ERP - ongoing saga
APIfying an ERP - ongoing saga
 
Monolith to microservices - our journey
Monolith to microservices - our journeyMonolith to microservices - our journey
Monolith to microservices - our journey
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Difference between sage erp 300 standard and sage erp 300 advanced
Difference between sage erp 300 standard and sage erp 300 advancedDifference between sage erp 300 standard and sage erp 300 advanced
Difference between sage erp 300 standard and sage erp 300 advanced
 
XML Publisher (www.aboutoracleapps.com)
XML Publisher (www.aboutoracleapps.com)XML Publisher (www.aboutoracleapps.com)
XML Publisher (www.aboutoracleapps.com)
 
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
Part I: SharePoint 2013 Administration by Todd Klindt and Shane Young - SPTec...
 
SITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSA
SITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSASITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSA
SITIST 2017 Dev - Alexa Custom Skill Development with SAP HANA XSA
 
Scale net apps in aws
Scale net apps in awsScale net apps in aws
Scale net apps in aws
 
Exchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug JohnsonExchange Integration in 5.0, by Doug Johnson
Exchange Integration in 5.0, by Doug Johnson
 
Site templates, site life cycle management and Modern SharePoint
Site templates, site life cycle management and Modern SharePointSite templates, site life cycle management and Modern SharePoint
Site templates, site life cycle management and Modern SharePoint
 
SEO - Trending search
SEO - Trending searchSEO - Trending search
SEO - Trending search
 
Bpm company code camp - configuration or coding with pega
Bpm company   code camp - configuration or coding with pegaBpm company   code camp - configuration or coding with pega
Bpm company code camp - configuration or coding with pega
 
Sage 300 ERP: Environment setup and configuration
Sage 300 ERP: Environment setup and configurationSage 300 ERP: Environment setup and configuration
Sage 300 ERP: Environment setup and configuration
 
Applications Manager Technical Overview
Applications Manager Technical OverviewApplications Manager Technical Overview
Applications Manager Technical Overview
 
Sage 300 ERP: Advanced virtulization optimization
Sage 300 ERP: Advanced virtulization optimizationSage 300 ERP: Advanced virtulization optimization
Sage 300 ERP: Advanced virtulization optimization
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
 
Installing SharePoint 2013 – Step by Step presented by Alan Richards
Installing SharePoint 2013 – Step by Step presented by Alan RichardsInstalling SharePoint 2013 – Step by Step presented by Alan Richards
Installing SharePoint 2013 – Step by Step presented by Alan Richards
 
Office Online Server 2016 - a must for on-premises installation for SharePoin...
Office Online Server 2016 - a must for on-premises installation for SharePoin...Office Online Server 2016 - a must for on-premises installation for SharePoin...
Office Online Server 2016 - a must for on-premises installation for SharePoin...
 
Real-time SQL Access to Your Salesforce.com Data Using Progress Data Direct
Real-time SQL Access to Your Salesforce.com Data Using Progress Data DirectReal-time SQL Access to Your Salesforce.com Data Using Progress Data Direct
Real-time SQL Access to Your Salesforce.com Data Using Progress Data Direct
 

Ähnlich wie How One Billion Salesforce records Can Be Replicated with Minimal API Usage

SharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 PerformanceSharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 PerformanceBrian Culver
 
Creating a RESTful api without losing too much sleep
Creating a RESTful api without losing too much sleepCreating a RESTful api without losing too much sleep
Creating a RESTful api without losing too much sleepMike Anderson
 
Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)Patrick Savalle
 
SharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceSharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceBrian Culver
 
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...Flink Forward
 
How Serverless Changes DevOps
How Serverless Changes DevOpsHow Serverless Changes DevOps
How Serverless Changes DevOpsRichard Donkin
 
REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25Jon Petter Hjulstad
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity PlanningMongoDB
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayAmazon Web Services
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applicationsTalbott Crowell
 
Drupal performance
Drupal performanceDrupal performance
Drupal performanceGabi Lee
 
Business-friendly library for inter-service communication
Business-friendly library for inter-service communicationBusiness-friendly library for inter-service communication
Business-friendly library for inter-service communicationPivorak MeetUp
 
Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)Petter Skodvin-Hvammen
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...European SharePoint Conference
 
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...ssuserd3a367
 
Salesforce1 API Overview
Salesforce1 API OverviewSalesforce1 API Overview
Salesforce1 API OverviewSamuel De Rycke
 
(BDT307) Zero Infrastructure, Real-Time Data Collection, and Analytics
(BDT307) Zero Infrastructure, Real-Time Data Collection, and Analytics(BDT307) Zero Infrastructure, Real-Time Data Collection, and Analytics
(BDT307) Zero Infrastructure, Real-Time Data Collection, and AnalyticsAmazon Web Services
 

Ähnlich wie How One Billion Salesforce records Can Be Replicated with Minimal API Usage (20)

SharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 PerformanceSharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 Performance
 
Creating a RESTful api without losing too much sleep
Creating a RESTful api without losing too much sleepCreating a RESTful api without losing too much sleep
Creating a RESTful api without losing too much sleep
 
REST APIs
REST APIsREST APIs
REST APIs
 
Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)
 
SharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceSharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 Performance
 
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
 
How Serverless Changes DevOps
How Serverless Changes DevOpsHow Serverless Changes DevOps
How Serverless Changes DevOps
 
SharePoint 2013 - What's New
SharePoint 2013 - What's NewSharePoint 2013 - What's New
SharePoint 2013 - What's New
 
REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25REST - Why, When and How? at AMIS25
REST - Why, When and How? at AMIS25
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity Planning
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API Gateway
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
 
Solr 101
Solr 101Solr 101
Solr 101
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Business-friendly library for inter-service communication
Business-friendly library for inter-service communicationBusiness-friendly library for inter-service communication
Business-friendly library for inter-service communication
 
Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)Share point 2013 enterprise search (public)
Share point 2013 enterprise search (public)
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
 
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
Building Scalable Big Data Infrastructure Using Open Source Software Presenta...
 
Salesforce1 API Overview
Salesforce1 API OverviewSalesforce1 API Overview
Salesforce1 API Overview
 
(BDT307) Zero Infrastructure, Real-Time Data Collection, and Analytics
(BDT307) Zero Infrastructure, Real-Time Data Collection, and Analytics(BDT307) Zero Infrastructure, Real-Time Data Collection, and Analytics
(BDT307) Zero Infrastructure, Real-Time Data Collection, and Analytics
 

Kürzlich hochgeladen

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 

Kürzlich hochgeladen (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 

How One Billion Salesforce records Can Be Replicated with Minimal API Usage

  • 1. How One BillionSalesforce recordsCan Be Replicated with Minimal API Usage Baruch Oxman R&D Manager, Implisit @implisithq, @baruchoxman
  • 3. In this session… •Implisit -Intro & Motivation •Salesforce APIs Usage & Limits -Overview •Efficient use of Salesforce APIs •Scale and limitations •Other pitfalls and tips
  • 4. Implisit –The End of CRM Data Entry •Implisit uses Data-Mining and Machine Learning to keep Salesforce updated: –Updating emails and calendar events to Salesforce automatically –Creating and updating Accounts, Opportunities, Contacts, Leads –Keeping team informed on all client communications •Using text analysis: –Creating meaningful business insights –Improving forecasting and sales pipeline management •Requires Salesforce data replication for offline processing
  • 5. Data Replication Goals •Minimize your API usage –Avoid reaching the API limit –API limits are shared between all API-connected apps –other apps can be blocked •Minimize sync cycle time –Don’t makeour customers wait for too long
  • 6. Salesforce API Limits •Daily API limits for Salesforce Editions: –Unlimited/Performance: # of users x 5,000, up to 1,000,000 –Enterprise/Professional: # of users x 1,000 –Developer: 15,000 –Sandbox: 5,000,000 •In-parallel API calls limit (25 –production, 5 –dev) Source & more info: https://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm
  • 7. Performance Stats •Keeping over one billionSalesforce records replicated in-sync –27 Salesforce object types are replicated (e.g. Accounts, Contacts) •Initial sync –600-1000 API calls in total •Updates sync –200-400 API calls in total –Performed every few hours
  • 8.
  • 9. •Bulk (Async) API –Large amounts of records in a single request (fewer API calls) –Slow, requires polling for results –Implements internal retries –Does not support some objects (e.g. OpportunityHistory) Salesforce API Types •REST API –Fast, synchronous queries –Up to 2,000 records per request –Each request –single API call –Simple usage https://developer.salesforce.com/blogs/tech-pubs/2011/10/salesforce-apis-what-they-are-when-to-use-them.html
  • 10. Are you ready to replicate ?
  • 11. Replication method Initial Fetching Changes Fetching
  • 12. Replication method –Initial fetching •Using Bulk API as much as possible •Fetch all records for each relevant object type –Lots of data –Only non-deleted records •Paginate by CreatedDate •Example: –1stquery: “…ORDER BY CreatedDateLIMIT 100000” –Subsequent: “…WHERE CreatedDate> 2014-08-31T02:29:29Z ORDER BY CreatedDateLIMIT 100000”
  • 13. Replication method –Changes fetching •Fetch only records that changed since the previous fetch time –Less data –only changes –Take care of updates and deletions •Using SystemModstampas indicator for changes in record •Same pagination logic as in initial fetching •Example: –1stquery: “…WHERE SystemModstamp> 2014-07-31T02:29:29Z AND ORDER BY CreatedDateLIMIT 100000” –Subsequent:“…WHERE SystemModstamp> 2014-07-31T02:29:29Z AND CreatedDate> 2014-08-31T02:29:29Z ORDER BY CreatedDateLIMIT 100000” •Bulk changes fetching VS getUpdated()
  • 14. Deleted items •Motivation: –Required to maintain consistent sync •Two implementation options –Use getDeleted()call in SOAP API (our choice) –Use queryAll(isDeleted= True)call in REST API •Potentially more API calls •Some objects can become “undeleted” !
  • 15. Getting all fields •No “SELECT *” support •Get all fields for table using “describe” –Optionally, filter the fields (skip custom fields, etc…) –Non-visible fields (due to security restrictions) •Use the field names in the query •Limitation: query length cannot exceed 20,000 characters* * http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select.htm
  • 16. User Access Restrictions •Full access rights are strongly encouraged –Full view of all objects –Limited access rights → slower queries •Reference Fields –special case –Tasks / Events -WhoId, WhatId –Attachment -ParentId –Reference fields make access checks in Salesforce even slower –Limited to 100,000 different values per query –Solution: query in smaller chunks
  • 17. Error handling •Nothing is fail-safe •Different APIs produce different errors •Examples: –Query too long (too many fields) –Scale limitations –Communication errors –Salesforce maintenance windows •Add support for anything you encounter –“Rare” becomes “frequent” once you scale •ABR (Always Be Retrying) •Remember to clean up upon errors –Close open bulk jobs
  • 18. Unavailable Salesforce objects •Some orgs make some of the objects unavailable –Using security restriction –For example, Lead or Opportunity •Check using describeSObjectsfor each object, before fetching •Safely skip when not supported
  • 19. Summary •Implisit -Intro & Motivation •Salesforce APIs Overview •Efficient use of API •Scale and limitations •Other pitfalls and tips
  • 20. Additional Resources: •API Call Basics •Salesforce App Limits Cheat Sheet •Understanding Execution Governors and Limits •Query & Search Optimization Cheat Sheet •Bulk Query Details