有没有办法确定批量响应中的响应顺序?
我有一个关于批量响应的问题。
如果我在一批请求中查询 20 个不同用户(A、B、C、D 等)的主页,是否可以保证批次的响应将是。 批量请求的顺序相同(A、B、C、D 等)?
因为如果响应顺序与用户的请求顺序不同,那么我的应用程序就会出现很大的问题。
或者我可以知道哪个响应属于哪个用户等的任何其他方式?
通过指定请求中操作之间的依赖关系(对于每个用户)是否足够安全?有更好的解决方案吗?
问候,格蕾丝
I have a question regarding to batch response.
If I query home of 20 different users(A, B,C, D,etc..) in one batch request, is there any guarantee that the response of batch will be the.
same order of the batch request (A, B,C, D,etc..)?
Because if the response order is different from the request order of users, then there is a BIG problem for my application.
or any other way that I can know which response belongs to which users, etc?
Is is safe enough using by specifying dependencies between operations in the request (for each users)? any better solutions?
Regards, Grace
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上我认为顺序是有保证的,否则你如何将你的结果与你的要求相匹配?请参阅此评论:
Graph Batch API
Actually I think order is guaranteed, because otherwise how would you even match up your results to your requests? See this comment:
Graph Batch API
这个问题可能在 facebook 开发者论坛 中可以得到更好的回答,但是请阅读文档,看起来顺序无法保证:
您可以通过使用依赖项强制执行顺序(如同一页面中所述),但我宁愿重新考虑如何处理响应。
This is probably a question that could be better answered in the facebook developers forum, but reading the documentation, it looks like the order is not guaranteed:
You could force an execution order by using dependencies (as explained in the same page), but I would rather rethink how you handle the responses instead.