Skip to content
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

EveesService updatePerspectiveData reentrancy #338

Open
pepoospina opened this issue Jul 8, 2021 · 0 comments
Open

EveesService updatePerspectiveData reentrancy #338

pepoospina opened this issue Jul 8, 2021 · 0 comments

Comments

@pepoospina
Copy link
Contributor

EveesService.updatePerspectiveData() build a head update computed on the current client head.

However, if a new call to this method is received before the current head has been updated, two heads will be built on top of the same parent head.

We should build a queue of data updates and build a queue of head updates so that new data updates are built on top of the existing head updates being computed.

Its pretty tricky as the head of the new update must await for the previous head update to be ready in order to be computed.

Then, we should also support debounce, were consecutive calls to update the data of the same perspective overwrite the privious one if they are done before a time deadline.

I'm postponing this for its complexity, meaning that, for now, applications should take care of not making concurrent calls to updatePerspectiveData, unless they want them to be debounced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant