wrote on 2012-05-01:
We're currently evaluating pdfcrowd for use in our web application. The API works brilliantly and with the code examples I was generating pdfs in mere minutes.
Looking at the documentation I read in the rate limiting section that you cannot send simultaneous requests, but that you should serialize your api calls. Ours is a multi user application, so there's a significant chance that 2 users may click to generate a pdf concurrently. The suggestion of simply resending failed requests is ok but is a bit wasteful of network traffic if it can be avoided. Just wanted a clarification on 'serializing' your api calls. Does that allow you to send multiple pdf calls in a single http request?
wrote on 2012-05-02:
in this context it means that if multiple users click to generate a pdf at the same time you should somehow ensure that the individual pdf calls are sent one after another, one at a time, each in a separate http request.
There are different ways how to achieve this, mostly depending on your software stack. Some examples:
- a background task queue having exactly one worker
- a memcached lock
However, as the documentation states, simply resending a failed request (ideally after some delay that corresponds to an average PDF creation time) is perfectly ok.
Hope it is clearer now.