-
Notifications
You must be signed in to change notification settings - Fork 213
CLIENT-3090: added document demonstrating the async way of using client api to invoke server ops #562
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
base: stage
Are you sure you want to change the base?
Conversation
docs/async_api_usage.md
Outdated
|
|
||
| Before using async operations, ensure you have: | ||
|
|
||
| 1. **Go 1.18+** installed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: Match the version of go set in go.mod
Go version in go.mod is set to 1.24.0.
docs/async_api_usage.md
Outdated
|
|
||
| ``` | ||
|
|
||
| ### Operate Operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: format of the title
(Operate) Operation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will omit this comment for other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/async_api_usage.md
Outdated
|
|
||
| **Note**: A single Get/Put call does not require a goroutine; it can be invoked directly. The provided examples use goroutines only to show how these operations can participate in concurrent workflows. | ||
|
|
||
| ### Write Operations (Put) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: format of the title
(Write) Operation
docs/async_api_usage.md
Outdated
|
|
||
| ## Batch Async Operations | ||
|
|
||
| Batch operations in the Aerospike Go client already use internal concurrency (via goroutines) to process multiple nodes in parallel. However, you can run multiple batch operations concurrently for even better performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: reword
Replace However, you can run multiple batch operations concurrently for even better performance. with Wrap batch operations in go routine to avoid blocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
mirzakaracic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would give this document to Stever Renekar. The ticket was asking to create a doc on we portal not here. I think there is some confusion what I suggested would be nice to have for reviews.
docs/async_api_usage.md
Outdated
|
|
||
| ``` | ||
|
|
||
| ### Operate Operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will omit this comment for other places.
Yes, the idea is to avoid adding these documentation files to the code repository. I’ve only placed the document in the docs directory for review, since that’s where the other documents are stored. |
Added examples to showcase Single Async Operation, Batch Async Operation that a enduser could do with Go client Api