Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Study how we could add the possibility to execute multiple queries in one API call #34

Open
ddolcimascolo opened this issue Mar 6, 2016 · 4 comments

Comments

@ddolcimascolo
Copy link
Contributor

The idea is to minimize roundtrips to the backend.
The spec defines back references that can help for the implementation I suppose...

@dbenchi
Copy link
Contributor

dbenchi commented Mar 6, 2016

If I got it well you mean doing stuffs like saveAsDraft and moveToOutbox in one roundtrip?

@ddolcimascolo
Copy link
Contributor Author

Yes @abenchi. The spec defines back references so that you can reference an entity created earlier in the same jmap operation. This will look like this:

[ 
  [ "setMessages", { "create": { "clientIdForCreatedMessage": { ... } } }, "#0" ] 
  [ "setMessages", { "update": { "clientIdForMoveMessage": { "id": "#clientIdForCreatedMessage", mailboxIds: [...] } } }, "#1" ] 
] 

This will make both operations run in a single HTTP request, which is great as far as performance is concerned.

@aduprat
Copy link

aduprat commented Mar 12, 2016

And the server is soo performent that you can send him hundred of commands at once.

@dbenchi
Copy link
Contributor

dbenchi commented Mar 12, 2016

great

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

No branches or pull requests

3 participants