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

Imp: support batch write #15

Closed
wongoo opened this issue Jul 9, 2019 · 1 comment
Closed

Imp: support batch write #15

wongoo opened this issue Jul 9, 2019 · 1 comment

Comments

@wongoo
Copy link

wongoo commented Jul 9, 2019

Package is write one by one currently, it can be changed to batch write to improve the performance.

The key points of design:

  1. add a []byte response for Writer.Write, which can be aggregated to write in batch:
type Writer interface {
  // if @Session is udpGettySession, the second parameter is UDPContext.
  Write(Session, interface{}) ([]byte, error)
}
  1. enable user to config to use batch or single write mode.
  2. aggregate bytes of packages to write in batch, set default batch size to 10.
@wongoo wongoo changed the title Imp: change single write to batch write Imp: support batch write Jul 9, 2019
@wongoo
Copy link
Author

wongoo commented Sep 10, 2019

ref: #26

@wongoo wongoo closed this as completed Sep 10, 2019
gaoxinge pushed a commit to dubbo-x/getty that referenced this issue Sep 30, 2019
add reconnectInterval & wheel.Now -> time.Now
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