You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In web applications, most actions taken by the user require an API call or need to be executed in the order in which they are created. Consider the following queued actions:
User posts to timeline [postID: 6]
User likes another user's profile
User deletes post from timeline [postID: 6]
While it may not matter the order in which actions 1 and 2 may be executed, it is rather crucial that action 1 is executed before action 3. Since both actions 1 and 3 require API calls, it is possible that the API call for action 3 is executed faster than that of action 1, causing an error or the delete post action to not be executed on the server-side.
Hence it is a better architecture for the queued actions to be executed asynchronously, i.e wait for each action to be executed (saga completed) before dispatching the next queue action. Can we implement this architecture instead of blasting off all the queued actions at once with the forEach loop?
The text was updated successfully, but these errors were encountered:
In web applications, most actions taken by the user require an API call or need to be executed in the order in which they are created. Consider the following queued actions:
While it may not matter the order in which actions 1 and 2 may be executed, it is rather crucial that action 1 is executed before action 3. Since both actions 1 and 3 require API calls, it is possible that the API call for action 3 is executed faster than that of action 1, causing an error or the delete post action to not be executed on the server-side.
Hence it is a better architecture for the queued actions to be executed asynchronously, i.e wait for each action to be executed (saga completed) before dispatching the next queue action. Can we implement this architecture instead of blasting off all the queued actions at once with the forEach loop?
The text was updated successfully, but these errors were encountered: