Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Are batch operations on ONE element equally efficient as their single counterparts? #43

Open
Danita opened this issue Aug 5, 2013 · 2 comments

Comments

@Danita
Copy link

Danita commented Aug 5, 2013

I mean, can I just replace...

  • DELETE /rest/v2/:domain/:user/mailbox/message/:uuid with
  • DELETE /rest/v2/:domain/:user/mailbox/message

and

  • PUT /rest/v2/:domain/:user/mailbox/message/:uuid with
  • PUT /rest/v2/:domain/:user/mailbox/message

...and send a JSON array consisting of a single :uuid ?

Are there any side effects?

@rstml
Copy link
Member

rstml commented Aug 6, 2013

Batch API (http://elasticinbox.github.io/api/v2/batch/) is more efficient than single requests because EI, in turn, performs batch request to Cassandra. Therefore, if you are deleting 100 messages through batch API, there will be only one request sent to Cassandra node.

Perhaps we need to elaborate this in API docs.

@Danita
Copy link
Author

Danita commented Aug 6, 2013

Sorry, I was not clear enough 😄

Obviously, for batch operations operating on many messages the batch command is more efficient. I meant, for a single message, is it the same to call the single DELETE method than calling a batch DELETE with a single id?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants