balanced / balanced-api

Balanced API specification.
221 stars 72 forks source link

Batch / Transactional Endpoints #547

Open janhartigan opened 10 years ago

janhartigan commented 10 years ago

Would love to see support for this. We would like to batch together our hold captures to be settled once per day and not have to make potentially hundreds or thousands of API requests in order to accomplish this. Another semi-outlandish scaling scenario might be if we process an insane number of captures or charges per minute and we want to queue them up for a per-minute batch job. Would suck to have to have dedicated servers for just this purpose making a shit ton of api calls with no concern for scaling.

chadwhitacre commented 10 years ago

+1 from @Gittip.

chadwhitacre commented 10 years ago

Though I'll add that we'd be looking for a batch endpoint that returns immediately, not one that runs once per day (not sure exactly how to read your scenario, @janhartigan). I want to post 100 holds in a single HTTP call, because HTTP calls are expensive.

chadwhitacre commented 10 years ago

Our use case is that we run almost all of our transactions at a set time each week. Right now we loop through all users and make an API call to hold, then an API call to capture, then an API call to deposit. Right now this takes an hour or two to run each week. Still room to grow there, but ultimately I think the most natural way to scale our application will be with batch endpoints.

chadwhitacre commented 10 years ago

IRC