Boxcars and Cabooses: When One More XHR Is Too Much
-
Upload
peter-chittum -
Category
Technology
-
view
424 -
download
2
Transcript of Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses When one more XHR is too much
Peter Chittum Developer Evangelist @pchittum github.com/pchittum
Safe Harbor Safe 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.
The Goal
Suggest design principles
Try Salesforce platform
Lots of Salesforce projects looking for developers
Salesforce Background
Business and Enterprise Application Platform Company
Sales Service
Marketing
Community Apps
Analytics
Bulk
REST
Metadata
SOAP
Tooling
Streaming
INTE
GR
ATIO
N L
AYER
Point & Click Integration
Tools
Page Builder
DECLARATIVE DEVELOPMENT
GLOBAL ENTERPRISE CLOUD INFRASTRUCTURE
PLATFORM SERVICES
APP MANAGEMENT & DEPLOYMENT
Workflow Engine
UI Framework
Sharing & Permissions
Global Search
Reports & Dashboards
Files & Content
Authentication
Collaboration Event Log Framework
Translation Workbench
App Builder
Process Builder
Schema Builder
Multi-Tenant Network & Firewall
Auto Updates
Backup & Geodiversity
Security Trust
IDE CLI Agile Accelerator
Store Builder
Dev Console
Sandbox
Metadata
Heroku DX node.js
PROGRAMMATIC DEVELOPMENT
Database Smart Containers
Heroku Add-ons
Heroku Button
Ruby
Identity
Global Data Centers
Data Storage
Single code base
Python Java APEX PHP
Offline Salesforce1 Mobile
Container Geolocation Push
Notifications SDK Mobile Identity
MOBILE SERVICES
Community Builder
Page Builder
Everything You Need to Build Apps Full spectrum of capabilities from enterprise control to elastic flexibility
Agile and elastic platform that developers love
Smarter infrastructure lets you build apps that scale
Open and extensible
Modern language support and ecosystem of 150+ add-ons
Connected to Force.com
Sync customer apps with business processes
Build Customer-Facing Apps with Heroku
HR Help Desk
Employee Intranet
Recruiting & Onboarding
Performance & Coaching
IT Help Desk / Self-Service Community
Legacy Applications Consolidation
Enterprise Knowledge
Identity Mgmt
Custom Web / Mobile Applications
Business Agility Layer (e.g. Claims, Underwriting, …)
Asset & Facilities Management
Financial Shared Services
M&A Enablement
Early Warning Management
Product Ideas & Innovation
Pre-Production Testing
Warrant Coverage Decisioning
Procurement
Vendor Management
Transportation
Logistics
Contract Management
Budget Management
Contract Management
Pricing
Billing Management
Audit Management
Force.com - Employee Facing Apps
Apps
HR Product
Supply Chain IT Financ
e Ops
Multi Tenant
>150k customers 40 Prod POD’s 40 Prod DB’s
Core Force.com Characteristics
Single Code Base
Single Schema
3 Upgrades Per Year
Secure
Durable and Scalable
Customizable
Easy enough for a Business Analyst
Flexible enough for a Coder
Pre-Built Apps AppExchange is the #1 Business App Marketplace
Customized for Salesforce
Trusted and Secure
Reviewed by Peers
Over 2,800 apps 3 million installs
Overall site peak day
• >3.5 Billion transactions
• 200 milliseconds average
• 60% of transactions via API
requests
Typically production instance
• >8,000 Customer Orgs
• 30 App Servers and 8 DB Servers
Salesforce’s Daily Performance
Friday: 3,173,762,799 Transactions
3 Releases Per Year API backward compatibility ensures ease of deployment
47 Major Releases 100’s of Small Releases Yearly
All Integrations and Customizations Auto-Upgraded
6B Lines of
Apex Code
1B API Calls Per Day,
32 versions
12M Visualforce
Pages
15M Custom
Database Tables
1 Version
The Composite App
The Client Problem
Problem: Old Custom UI Technology Server-side generated, page based HTML
HTML <div>...</div>
New UI: Component-based Client-rendered
JSON component:{...}
<div>...</div>
Aura and Lightning Component Framework
Lightning Component Framework
Lightning Component Design Principles
• Component author namespacing
• Automatic component-based CSS namespacing
• Everything is a component
• Allow for programmatic or point-and-click UI composition
• Enable Salesforce, customers, and partners to build composite UIs
• Works on any form factor
Many Components Many Server Trips
XMLHttpRequest
XMLHttpRequest
XMLHttpRequest
Actions: Interact with the Server
• Apex Method Surfaced to Lightning Components • @AuraEnabled annotation
Boxcarring: Many Actions, One XHR
Action S
ervice
Caboose: Postpone High Volume Actions
Action S
ervice • Defer High-Volume Actions • Action.setCaboose()
Action Service: Server Side API Apex: Code on Force.com
Action Service Client API
Demo
Possible Future Features
Making actions cacheable
Ability to prioritize actions
What About the API
Comprehensive Suite of APIs and Toolkits
Web Service Endpoint
Web Service Endpoint
Apex WS/REST
Outbound Messaging
Business Logic
Sync Bulk API
Streaming API Topic
CRUD
Data
Bayeux Client
Applications and Middleware Java SDK Ruby gem PHP
Toolkit Mobile
SDK Mobile
SDK 3rd Party Adapters
Apex Callouts
Salesforce1 Enterprise APIs The Salesforce “Data” APIs
• Allow programmatic access to your salesforce data through various API technologies
• Many different APIs to suit your specific needs
Rest APIs
Access and manipulate data with a RESTful pattern with JSON and XML payloads
Soap APIs
Access and manipulate data using SOAP.
Streaming APIs
Subscribe to updates using a Bayeux / CometD HTTP Streaming API.
Bulk APIs
Perform Bulk Queries and Inserts/Updates Asynchronously.
Boxcarring, what a great idea!
Boxcarring is dependent on Lightning Components
Only works with one client interface
What about all those API apps out there?
If only we could let any client batch together requests…
Many Requests Many Server Trips
POST Record
GET Server Gen Data
GET API Limits
Composite Batch REST API
.../composite/batch POST Batch
{ "batchRequests":[ {POST}, {GET}, {GET} ] }
Sample Batch Request POST: <salesforcedomain>/services/data/v35.0/composite/batch
{"batchRequests" : [ {"method" : "POST", "url" : "v35.0/sobjects/account/", "richInput" : {"Name" : "NewName", "Industry" : "Tech"}}, {"method" : "GET", "url" : "v35.0/sobjects/account/describe/"}, {"method" : "GET", "url" : "v35.0/query?q=select id, name, industry from account
order by createddate desc limit 10" }] }
Parent/Child Related Data
POST Account
POST related Contacts
POST related Cases
RESP: Account ID
RESP: Contact IDs
RESP: Case IDs
Composite Tree REST API
.../composite/tree/entity
POST Tree
”records":[ {parent1}, {parent2}, {parent3} ]
Sample Batch Request POST: <salesforcedomain>/services/data/v35.0/composite/tree/Account
{"records" :[ {"attributes": {"type":"Account", "referenceId":"ref1"}, "name" : "SampleAccount", "phone" : "1234567890", "type" : "Analyst", "industry" : "Banking", "Contacts" : { "records" : [ {"attributes": {"type":"Contact", "referenceId":"ref2"}, "lastname" : "Smith", "title" : "President"}, ...]}, "Cases" : { "records" : [ {"attributes": {"type":"Case", "referenceId":"ref3"}, "" : "", "" : "", "" : ""} ...]}, }}, ...] }
Demo
Possible Future Features
Parameter-based values
Basic Orchestration
Updates on /tree
Free Developer Edition of Force.com
http://bit.ly/webcamp-salesforce
developer.salesforce.com/trailhead
Q & A
Peter Chittum Developer Evangelist @pchittum github.com/pchittum
Signup: http://bit.ly/webcamp-salesforce
Learn: https://developer.salesforce.com/trailhead
RATE ME!
https://joind.in/15243
Thank you