TastyPie batch request mode?

775 views
Skip to first unread message

Ash

unread,
May 3, 2012, 11:15:18 PM5/3/12
to django-...@googlegroups.com
Hi guys, does TastyPie have a batch mode or any way of grouping HTTP requests together to reduce latency? 

I have scoured the web but have not found a thing related to this which seems weird. I have written an API layer that includes batch mode and I saw a massive speed up once it was enabled (I am doing a lot of bulk operations for a sync).

Any idea of if this functionality will be added in future or if there is an alternative speed up available?

Josh Bohde

unread,
May 3, 2012, 11:18:28 PM5/3/12
to django-...@googlegroups.com
PATCH is supported out of the box.


Is there something else you might need? 

Ash

unread,
May 15, 2012, 1:12:31 AM5/15/12
to django-...@googlegroups.com
Hi thanks for the reply - I didn't see it until now, PATCH is great and would help a lot with updates and deletes but the main slow down I have been seeing is in triggering multiple GETs. The API layer I have written can batch together all the reads into one package so that only one HTTP connection setup/teardown is required. This has massively increased throughput but I would still like to switch to TastyPie so there is less to maintain.

Basically I am looking for something similar to PATCH but for GETs.


On Friday, 4 May 2012 13:18:28 UTC+10, Josh Bohde wrote:
Is there something else you might need? 

Daniel Gerzo

unread,
May 15, 2012, 3:22:15 AM5/15/12
to django-...@googlegroups.com
On 15.05.2012 06:12, Ash wrote:
> Hi thanks for the reply - I didn't see it until now, PATCH is great
> and would help a lot with updates and deletes but the main slow down
> I
> have been seeing is in triggering multiple GETs. The API layer I have
> written can batch together all the reads into one package so that
> only
> one HTTP connection setup/teardown is required. This has massively
> increased throughput but I would still like to switch to TastyPie so
> there is less to maintain.
>
> Basically I am looking for something similar to PATCH but for GETs.

You can do multiple GETs with this:

http://django-tastypie.readthedocs.org/en/latest/interacting.html#selecting-a-subset-of-resources

Is that what you mean?


> On Friday, 4 May 2012 13:18:28 UTC+10, Josh Bohde wrote:
>
>> PATCH is supported out of the box.
>>
>>
>
> http://django-tastypie.readthedocs.org/en/latest/interacting.html#bulk-operations
>> [1]
>>
>> Is there something else you might need?
>>
>> On Thu, May 3, 2012 at 10:15 PM, Ash wrote:
>>
>>> Hi guys, does TastyPie have a batch mode or any way of grouping
>>> HTTP requests together to reduce latency?
>>>
>>> I have scoured the web but have not found a thing related to this
>>> which seems weird. I have written an API layer that includes batch
>>> mode and I saw a massive speed up once it was enabled (I am doing
>>> a lot of bulk operations for a sync).
>>>
>>> Any idea of if this functionality will be added in future or if
>>> there is an alternative speed up available?
>
>
> Links:
> ------
> [1]
>
> http://django-tastypie.readthedocs.org/en/latest/interacting.html#bulk-operations

--
S pozdravom / Best regards
Daniel Gerzo

Anurag Jain

unread,
Aug 12, 2013, 2:48:05 AM8/12/13
to django-...@googlegroups.com
Hi Josh, 

I am using same method for bulk operations, but it is very very slow. I know the reason.

Reason is: According to use case (on I am working), I have to insert more than 15000 bundles at a time and it makes API very slow. 

Do you have any other solution ?

Database: MySQL
For 1000 bundles:- it took 33 second.
Target:- for 1000 bundles max 5 second.

Please Reply.

Thanks

srikant...@gmail.com

unread,
Nov 25, 2017, 2:57:00 PM11/25/17
to Tastypie

Dear Sir,

I have written a WEB API using Tastypie.

But want example how to use PATCH for bulk insertion, Could anyone please help me with small example what changes to make for Bulk Insert

and how the client has to invoke bulk request using patch command curl to insert multiple records in single http request

my email id is srika...@gmail.com

Thanks 
Reply all
Reply to author
Forward
0 new messages