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

For scalability look into adding queueing mechanism that will allow each command to run in parallel and not block #13

Open
avislash opened this issue Jun 8, 2021 · 1 comment

Comments

@avislash
Copy link
Owner

avislash commented Jun 8, 2021

Investigate how commands can be run concurrently in order to increase bot throughout.

@avislash avislash changed the title For scalability add queueing mechanism that will allow each command to run in parallel and not block For scalability look into adding queueing mechanism that will allow each command to run in parallel and not block Jun 8, 2021
avislash pushed a commit that referenced this issue Jun 9, 2021
… thread so other bot commands can execute while the txn is being posted to the blockchain #13
avislash pushed a commit that referenced this issue Jun 9, 2021
@avislash
Copy link
Owner Author

avislash commented Jun 9, 2021

After examination, the current largest bottleneck in the system is waiting for the Block Confirmation. The busy wait for the block confirmation blocks other code from running.

A work around has been idientified that can allow the code to be parallelezed is to leverage asyncio and the future libraries to thread the confirmation block and do an asynchronous sleep. This will allow other parts of the code to run in parallel while the network confirms the block.

Using this approach has led to approximately a 6x performance gain when trying to do multiple transactions at a time.

@avislash avislash closed this as completed Jun 9, 2021
@avislash avislash reopened this Jun 9, 2021
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