-
Notifications
You must be signed in to change notification settings - Fork 217
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
Batch evaluation #61
Comments
Great idea. How would you expect the request body to look? Something like this, where you evaluate multiple flags but with the same entity_id and context?: {
"request_id": "string",
"flag_keys": ["string", "string"],
"entity_id": "string",
"context": {
"property1": "string",
"property2": "string"
}
} Or, would you want to have different context/entity_ids for each flag, something like this: {
"request_id": "string",
"evaluations": [
{
"flag_key": "string",
"entity_id": "string",
"context": {
"property1": "string",
"property2": "string"
}
},
{
"flag_key": "string",
"entity_id": "string",
"context": {
"property1": "string",
"property2": "string"
}
},
]
} |
Hmm...good question, the way I see it is that in the 1st case, who's consuming the API would have to guarantee that the context is appropriate to validate against all constraints in all the flags requested. Case N2 we'd repeat the context which might increase the request payload... what about allowing both scenarios? one network-friendly and another more "flexible"? {
"requestId": "1234",
"entityId": "127.0.0.1",
"globalContext": {
"country": "UK",
"property": "value"
},
"evaluations": [{
"flagKey": "foo",
}, {
"flagKey": "bar",
"context": {
"country": "US"
}
}]
} So the developer would consider
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is this actually done or just got closed due to inactivity? I would also be interested in an evaluateAll request, since a batch can grow pretty large. That would help integrate flipt into existing solutions. |
@sagikazarmark yeah it was closed due to inactivity. I'll reopen it if its a feature you'd like to see added. Question about |
Hm, I'm not really interested in the order, I just need a list of the flags evaluated for a certain user. |
Good point, I guess the order wouldnt matter if the response returned |
@markphelps actually that's what needs to happen. It's just to avoid multiple HTTP roundtrips for each flag you know? |
Maybe not a top priority right now...but do you think there's a way to batch-evaluate a set of flags?
I plan to use the REST API instead of grpc—so like, it'd be nice if I could send a single request with a set of flags to be evaluated instead of 1 request per flag. Just to avoid all the roundtrips.
Thoughts?
The text was updated successfully, but these errors were encountered: