Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Bad design for bulk queries #9

Closed
jomo opened this issue Apr 6, 2014 · 2 comments
Closed

Bad design for bulk queries #9

jomo opened this issue Apr 6, 2014 · 2 comments

Comments

@jomo
Copy link

jomo commented Apr 6, 2014

Why does every user need an agent? This is way more data than required.
Instead of

[
  {"name":"jeb_", "agent": "minecraft"},
  {"name":"Dinnerbone", "agent":"minecraft"}
]

it would be much better (saving badwith and time) to use:

[
  {
    "agent": "minecraft",
    "names": ["jeb_", "Dinnerbone"]
  }
]

It would still be possible to get usernames for different agents (Scrolls?) in the same request although I can hardly imagine a case where that would happen.

I made a quick test with 50 users and the payload went from 2401 bytes to 938 (!)
The normal payload is more than 2.5 x the size.

Support for this doesn't break the current system, so there's only pros and no cons. :)

@codename-B
Copy link

This can be closed now :)

@jomo
Copy link
Author

jomo commented Apr 14, 2014

Indeed.

@jomo jomo closed this as completed Apr 14, 2014
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