The Ultimate Event for Small Business Success.
Demystified: OAuth2,
DataService & Performance
Matthew Lewter
Engineering Manager, Infusionsoft
@matthew_lewter
The Ultimate Event for Small Business Success.
Agenda
• Infusionsoft API
• OAuth2.0
• Data Service & API Best Practices
• Q & A
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
The Ultimate Event for Small Business Success.
The Ultimate Event for Small Business Success.
The Ultimate Event for Small Business Success.
Infusionsoft: The API
Let’s talk about it…
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
The Ultimate Event for Small Business Success.
Infusionsoft: The API
Data Service Traffic (4 weeks)
The Ultimate Event for Small Business Success.
The Ultimate Event for Small Business Success.
Infusionsoft: The API
Authentication
•Legacy: Infusionsoft API Key
•New: OAuth2.0 Standard
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!
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
The Ultimate Event for Small Business Success.
Infusionsoft: The API
The Ultimate Event for Small Business Success.
…To the developer center!
The Ultimate Event for Small Business Success.
Infusionsoft: The API
OAuth2.0 Client Libraries (oauth.net/2)
•PHP
•Java
•Python
•.NET
•Ruby
•Javascript
The Ultimate Event for Small Business Success.
Get the most out of the API
Best Practices
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
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
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
The Ultimate Event for Small Business Success.
Exception Handling
• Just do it!
• Look for exceptions
• Provide reasonable fallbacks
• Fail gracefully
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)
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
The Ultimate Event for Small Business Success.
Cache Results
• Caching Libraries/Services
– Memcached
– APC (Alternative PHP Cache)
– Redis
– EhCache
– AngularJS ($cacheFactory)
– EmberJS (Ember Data)
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
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
The Ultimate Event for Small Business Success.
The Ultimate Event for Small Business Success.
Examples can be found here:
https://github.com/mlewter
The Ultimate Event for Small Business Success.
Q & A

Matthew Lewter - Demystified

  • 1.
    The Ultimate Eventfor Small Business Success. Demystified: OAuth2, DataService & Performance Matthew Lewter Engineering Manager, Infusionsoft @matthew_lewter
  • 2.
    The Ultimate Eventfor Small Business Success. Agenda • Infusionsoft API • OAuth2.0 • Data Service & API Best Practices • Q & A
  • 3.
    The Ultimate Eventfor 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
  • 4.
    The Ultimate Eventfor Small Business Success.
  • 5.
    The Ultimate Eventfor Small Business Success.
  • 6.
    The Ultimate Eventfor Small Business Success. Infusionsoft: The API Let’s talk about it…
  • 7.
    The Ultimate Eventfor 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 Eventfor Small Business Success. Infusionsoft: The API Data Service Traffic (4 weeks)
  • 9.
    The Ultimate Eventfor Small Business Success.
  • 10.
    The Ultimate Eventfor Small Business Success. Infusionsoft: The API Authentication •Legacy: Infusionsoft API Key •New: OAuth2.0 Standard
  • 11.
    The Ultimate Eventfor 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 Eventfor Small Business Success. “OAuth2 is rapidly becoming a preferred authorization protocol, and is used by major service providers such as Facebook and Github.” -SpringSource
  • 13.
    The Ultimate Eventfor Small Business Success. Infusionsoft: The API
  • 14.
    The Ultimate Eventfor Small Business Success. …To the developer center!
  • 15.
    The Ultimate Eventfor Small Business Success. Infusionsoft: The API OAuth2.0 Client Libraries (oauth.net/2) •PHP •Java •Python •.NET •Ruby •Javascript
  • 16.
    The Ultimate Eventfor Small Business Success. Get the most out of the API Best Practices
  • 17.
    The Ultimate Eventfor 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 Eventfor Small Business Success. Data Service • Favor the specific interface over Data Service – Upgrade Path – Performance – Implementation improvements – Help us, help you
  • 19.
    The Ultimate Eventfor 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 Eventfor Small Business Success. Exception Handling • Just do it! • Look for exceptions • Provide reasonable fallbacks • Fail gracefully
  • 21.
    The Ultimate Eventfor 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 Eventfor 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 Eventfor Small Business Success. Cache Results • Caching Libraries/Services – Memcached – APC (Alternative PHP Cache) – Redis – EhCache – AngularJS ($cacheFactory) – EmberJS (Ember Data)
  • 24.
    The Ultimate Eventfor 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 Eventfor 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
  • 26.
    The Ultimate Eventfor Small Business Success.
  • 27.
    The Ultimate Eventfor Small Business Success. Examples can be found here: https://github.com/mlewter
  • 28.
    The Ultimate Eventfor Small Business Success. Q & A

Editor's Notes

  • #2 ** 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