callout architecture
DESCRIPTION
from October North Bay salesforce DUG. How to use a callout proxy and non-blocking rolling curl to break through force.com governor limits.TRANSCRIPT
![Page 1: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/1.jpg)
High performance Web Service Callouts on force.com
![Page 2: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/2.jpg)
Problem #1
Per-Transaction limits
![Page 3: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/3.jpg)
Problem #2
Platform limits
![Page 4: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/4.jpg)
Native solution
callout 1callout 2callout 3…callout 100
HTTP:callout 1callout 2…callout 10
BACKLOG:callout 11…callout 100
HTTP:callout 11callout 12…callout 20
BACKLOG:callout 21…callout 100
HTTP:callout 91callout 92…callout 100
BACKLOG:
…
![Page 5: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/5.jpg)
Native solution code demo• https://na15.salesforce.com
• http://some.webservice.com/viewer.php
![Page 6: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/6.jpg)
demo
![Page 7: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/7.jpg)
demo
![Page 8: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/8.jpg)
demo
![Page 9: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/9.jpg)
Scalable, but slow.
![Page 10: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/10.jpg)
Proxy solution
1 calloutInfinite
records
calloutproxy
request full record data from IDs
Some web service
Receive full record data
![Page 11: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/11.jpg)
Rolling curl• Smarter Implementation of php’s
curl_multi_exec
• https://code.google.com/p/rolling-curl
![Page 12: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/12.jpg)
demo
![Page 13: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/13.jpg)
![Page 14: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/14.jpg)
Demo code on github
https://github.com/danieljpeter/high_performance_force.com_callouts
![Page 15: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/15.jpg)
Scalable, fast, but another thing to maintain.
![Page 16: Callout architecture](https://reader033.vdocument.in/reader033/viewer/2022061208/548b5141b4795900298b467e/html5/thumbnails/16.jpg)
Thanks!@danieljpeter