加拿大外贸
APIs: A Leap Forward, but Also a New Constraint for DevelopersModern Internet apps are built on a web of APIs that help query, gather and share information with other applications and users. This is clearly a step in the right direction as it speeds the creation of richer applications with less programming required.
At the same time, though, APIs represent a brand new constraint to developers and testers because of various call limits imposed by all of the popular sites, from Google to Facebook to LinkedIn.
On the one hand, it makes sense for big vendors to place limits on their interfaces to protect their investment and also to ensure good performance for the existing users and applications. If not for limits, one developer or one wrong line of code could ruin it for everyone by deluging a service with requests.
During the initial development process, these limits are more than sufficient to assess whether the programming logic of new code behaves as expected. However, when organizations decide to push their applications to failure for performance and load-testing purposes, these limits can leave blind spots as to how new applications will behave at scale.
Throttling can dramatically increase the time required for thorough testing, which might lead some companies to cut corners. That’s a very bad idea.
To get a handle on how call limits vary from site to site and because we couldn’t find a list anywhere, we decided to compile a list of restrictions from some of the most popular services. It turned out to be no trivial task. For example, LinkedIn has more than 40 different types of limitations, based on the operation being performed.
APIs can be limited by user, per-second, per month, per application, just for starters. Here’s what we found:
Amazon Product Advertising API – Applications are throttled based on the vendor’s 30-day sales. Vendors with less than $720 in monthly sales are limited to 3,600 API calls per hour. Vendors with $20,000 in monthly sales can make up to 18,000 API calls per hour. The policy is here.
eBay – New applications are limited to 5,000 API calls per day. If the developer is able to get the application certified by eBay as a “compatible application,” the limits rise to between 500,000 and 1.5 million calls per day, depending on the service. However the feedback API is limited to 10 calls per day for all applications. The policy is here.
Facebook – Application testing is limited to 2,000 test users. Some developers have reported working with the test users from multiple applications to test the scalability of applications across a larger potential base of users. Details are here, and there’s a good discussion of the Facebook issue here.
Foursquare – Foursquare call limits include up to 5,000 userless requests per hour to venues, 500 userless requests per hour to other groups, and 500 authenticated requests per hour using OAuth. These limits can be increased upon request. Read about it here.
Google Analytics – The general Google Analytics API call limits include 50,000 requests per day, per project and 10 queries per second, per IP address. However the management API allows only up to 500 write requests per project, per day and 50 upload operations per project, per day. The policy is here.
Google Maps – The Google Maps API has call limits based on requests, waypoints and elements. All services are limited to 10 requests per second, per web service. The Directions Web Service is limited to 100,000 requests per day and 23 waypoints per request. The Distance Matrix Service is limited to 100,000 elements per day, 625 elements per query, and 1,000 elements per 10 seconds. Read about it here.
Instagram – The Instagram API is limited to 5,000 requests per hour, per access token or client ID. The policy is here.
LinkedIn –There are currently about 40 different types of API call limits for LinkedIn. These range from only 5 calls per day, per user for posting network updates to 100,000 calls per day for returning profile data. Read the policy here.
Salesforce – Salesforce has concurrent API request limits ranging from five to 25 calls with duration of 20 seconds or longer. It also has total API request limits ranging from 1,000 to 1,000,000 calls per day, depending on the license. Here’s the policy.
Twitter – Twitter throttles most API call requests on a per user, per window basis. Most of these are constrained to 15 requests per user, per 15 minutes. A few calls for applications and friendship request support up to 180 per 15-minute period. Read about it here and here.
Yelp – If you want to interface with Yelp, you’ll be limited to 10,000 API calls per day to build a prototype. Here’s the lowdown.
Service Virtualization Can Ease the Call-Limit Constraint
Developers have found all kinds of ways to cope with the limits, including writing “sleeps” or artificial intervals into the code or eliminating duplicate messages sent to APIs to conserve calls. Other times, they struggle to even figure out why their apps are being throttled.
A better approach would be to develop in a simulated environment without using API calls at all – or at least to minimize their use.
Service Virtualization techniques can mimic the dependent service – whatever it might be – to allow developers to push new code to the limits without running into the various types of API call limits.
Service Virtualization also is more “livelike” than the API sandboxes provided by some vendors for testing new apps. Sandboxes can differ from the live APIs in subtle ways that can limit the reliability of performance testing.
http://servicevirtualization.com ... int-for-developers/
评论
先收藏,谢谢啦
加拿大电商做区块链为什么都注册新加坡基金会 目前做区块链项目的客户都会通过注册基金会来作为项目的主体,为什么都在新加坡注册基金会,首先性价比高,而且新加坡市场也比较成熟,项目 加拿大电商露天电影首发——葡中双语字幕《中央车站》 http://bbs.shanghai.com/thread-1714999-1-1.html screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoo
·中文新闻 驻扎在北端地区的日本军队向中国发出明确信息
·中文新闻 Bluesky:社交媒体网站吸引了大量当地 X 难民