function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Danny5Danny5 

WSDL / API - API usage metering concerns

I am looking over http://www.salesforce.com/us/developer/docs/API/Content/implementation_consideration's

 

This brings out questions about how an application I have written might be impacted by all these implementation details of salesforce.

Any additional details / experiences that anyone could share would be greatly appreciated.

 

The client application that accesses salesforce through the API.

- Desktop application that sends a report and attaches it to the Account object.

- The application wakes up at certain intervals and performs the above.

- There will be many instances of this application installed on various PC's (a few hundred)

- All these applications will send reports at the same time, using the same salesforce logon.

- The end user of the application doesn't know anything about salesforce, they just know that a report is sent into a company that they have a relationship with (that company being the owner of the salesforce environment.

- Each instance of the application would make 3 round trip API request/responses each time it wakes up and performs it's task.

 

So this leads to the following questions: BOLD is content from document at URL above:

10 QueryLocator cursors are open when a client application, logged in as the same user, attempts to open a new one, then the oldest of the 10 cursors is released 

- How long is a QueryLocator open for a request? If 250 client applications are accessing data on salesforce at the same time (it won't be the same data) Am I going to run into client applications getting errors?  Is there a way to increase to allow more?

 

If one of the client applications calls logout(), it invalidates the session for all the client applications

- Right now, I don't specifically call logout() since I am only using one salesforce logon.  Is this best practice considering my applications parameters above?

 

Concurrent Usage Limits -  limit for number of calls with a duration of 20 seconds or longer - 25 is the limit

- How does this effect the 10 QueryLocator cursors open at one time requirement? Is the 20 seconds the time from when I send a request until a response is sent back?  If my interaction with Salesforce takes less than 20 seconds, do I not worry about this limit?

 

Total API limits in one 24 hour period

For Enterprise, lets say I have 40 sf licenses, so I have 40,000 available calls in a 24 hour period.  Correct?

Can all of those 40,000 occur within one of my 40 licenses or am I limited to 1,000 per license?

I can acquire higher total API limits by purchasing them from salesforce.  Correct?

 

Thanks for any responses providing a greater level of detail, lessons learned from past experience

 

 

SuperfellSuperfell

1. if you have 250 requests using the same login and they generate cursors (i.e. they call query, and receive a response that requires a queryMore call), then you'll very quickly run into the 10 cursor limit, this'll result in errors when you call queryMore. There's no way to increase this limit (other than to use different user accounts).

 

2. no need to call logout, just let the session expire on timeout.

 

3. this is unrelated to the 10 query locator limit. requests that process very quickly don't get registered in the concurrent limits.

 

4. yes the api calls are a pool, you can use them all by a single user account. Yes you can buy additional api calls.

SuperfellSuperfell

BTW, you probably should do something to stagger the scheduling regardless.

Danny5Danny5

SimonF,

 

Thanks for the quick, detailed reponse.  Great stuff!

 

1. if you have 250 requests using the same login and they generate cursors (i.e. they call query, and receive a response that requires a queryMore call), then you'll very quickly run into the 10 cursor limit, this'll result in errors when you call queryMore. There's no way to increase this limit (other than to use different user accounts).

I only issue one Query that will ever only contain one record in the response, so I assume the response would not designate that a queryMore call is enabled, that would all be set/controlled by the saleforce side. Correct? Nothing specific that I need to set on the query?

 

3. this is unrelated to the 10 query locator limit. requests that process very quickly don't get registered in the concurrent limits.

So if my 3 request/responses (for one instance of my application) total 10 seconds, they wouldn't get registered in concurrent limits. Correct?

 

Thanks again