feat(relay): irn_batchRequest method#222
Open
heilhead wants to merge 1 commit intomain-lfs-DO-NOT-USEfrom
Open
feat(relay): irn_batchRequest method#222heilhead wants to merge 1 commit intomain-lfs-DO-NOT-USEfrom
irn_batchRequest method#222heilhead wants to merge 1 commit intomain-lfs-DO-NOT-USEfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
xDarksome
reviewed
Apr 10, 2024
| "method": "irn_batchRequest", | ||
| "params" : { | ||
| "batch": Request[], | ||
| "mode": "sequence" | "concurrent" |
Member
There was a problem hiding this comment.
I thought we had a use-case where we need both sequence and concurrent at the same time.
Like:
- execute 3 requests concurrently
- afterwards execute another request
Isn't it the case?
Author
There was a problem hiding this comment.
Correct. So with the suggested implementation you'd combine requests like this:
{
"method": "irn_batchRequest",
"params": {
"mode": "sequence",
"batch": [
// First execute a batch of requests concurrently.
{
"method": "irn_batchRequest",
"params": {
"mode": "concurrent",
"batch": [
// Concurrent requests, e.g. subscriptions.
]
},
...
},
// Then another request once the first batch is processed.
{
"method": "irn_publish",
...
},
]
},
...
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the
irn_batchRequestmethod which would allow to combine multiple requests into a single one, specifying execution mode (either concurrent or sequential). See this slack conversation for context.