How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
Matthew Lewter - Demystified
1. The Ultimate Event for Small Business Success.
Demystified: OAuth2,
DataService & Performance
Matthew Lewter
Engineering Manager, Infusionsoft
@matthew_lewter
2. The Ultimate Event for Small Business Success.
Agenda
• Infusionsoft API
• OAuth2.0
• Data Service & API Best Practices
• Q & A
3. The Ultimate Event for Small Business Success.
Introduction
• Software Engineer - 9 years (Java)
• Joined Infusionsoft in 2012
• Currently managing two engineering teams
that are focused on the creation of a next-gen
platform that supports small business
6. The Ultimate Event for Small Business Success.
Infusionsoft: The API
Let’s talk about it…
7. The Ultimate Event for Small Business Success.
Infusionsoft: The API
• XMLRPC
• Accounts for approximately 50% of all
Infusionsoft traffic!
• 65% of that traffic is handled via Data Service
8. The Ultimate Event for Small Business Success.
Infusionsoft: The API
Data Service Traffic (4 weeks)
10. The Ultimate Event for Small Business Success.
Infusionsoft: The API
Authentication
•Legacy: Infusionsoft API Key
•New: OAuth2.0 Standard
11. The Ultimate Event for Small Business Success.
Infusionsoft: The API
OAuth2.0 (Beta)
•Provides a standard, tried-and-true means of
authenticating API consumers
•API Rate Limiting
– Consumers are throttled based on their own
usage, not the usage of others!
12. The Ultimate Event for Small Business Success.
“OAuth2 is rapidly becoming a preferred
authorization protocol, and is used by major
service providers such as Facebook and Github.”
-SpringSource
14. The Ultimate Event for Small Business Success.
…To the developer center!
15. The Ultimate Event for Small Business Success.
Infusionsoft: The API
OAuth2.0 Client Libraries (oauth.net/2)
•PHP
•Java
•Python
•.NET
•Ruby
•Javascript
16. The Ultimate Event for Small Business Success.
Get the most out of the API
Best Practices
17. The Ultimate Event for Small Business Success.
Use an SDK today!
• PHP (Infusionsoft Supported)
– help.infusionsoft.com/developers/api-basics
• iOS (Infusionsoft Supported)
– On its way!
• Java
– bitbucket.org/dietsoda/yail
18. The Ultimate Event for Small Business Success.
Data Service
• Favor the specific interface over Data Service
– Upgrade Path
– Performance
– Implementation improvements
– Help us, help you
19. The Ultimate Event for Small Business Success.
Data Service
• Limit Results (default is 1000)
• Leverage new DataService.count
• I/O Docs!
• https://developer.infusionsoft.com/docs/tabl
e_documentation
20. The Ultimate Event for Small Business Success.
Exception Handling
• Just do it!
• Look for exceptions
• Provide reasonable fallbacks
• Fail gracefully
21. The Ultimate Event for Small Business Success.
Exception Handling
“Applications in complex distributed
architectures have dozens of dependencies, each
of which will inevitably fail at some point. If not
isolated from these external failures, the host
application is at risk of being taken down with
them.”
-Netflix (Hystrix)
22. The Ultimate Event for Small Business Success.
Manage API Traffic
• Limit API Queries
• Questions to ask
– Do I absolutely have to make this call?
– Can I pull from a cache?
– How up to date does my data have to be?
• Leverage API Count
– Provides number of results
– Paging
23. The Ultimate Event for Small Business Success.
Cache Results
• Caching Libraries/Services
– Memcached
– APC (Alternative PHP Cache)
– Redis
– EhCache
– AngularJS ($cacheFactory)
– EmberJS (Ember Data)
24. The Ultimate Event for Small Business Success.
Throttling
• Plan for it
• Provide reasonable fallbacks
• Current
– Timeout (fail fast) – don’t block
• Future
– Watch for 403 Exception
25. The Ultimate Event for Small Business Success.
Avoid
• Assuming that everything is available at all
times
• Unhandled throttling
• Pulling the same, static data too many times
(Cache it!)
• Not reading the documentation
** A square-shaped photo will work best in this circle-photo layout.
To add photo inside the circle shape:
click the icon inside the photo
Navigate to the location of desired photo on your computer and select the file
Click ‘insert’ and your photo will be inserted