Skip to content
Compare
Choose a tag to compare

Gnet v1.6.0

Pre-release
Pre-release

Gnet client is now available for production!

Features

Enhancements

  • Prevent the event-list from expanding or shrinking endlessly b220dfd
  • Reduce the potential system calls for waking pollers up 9ce41f3
  • Eliminate the code for preventing false-sharing 0bfade3
  • Support so_reuseaddr (#280)
  • Make several improvements for logger 58d2031
  • Optimize the buffer management and network I/O 6aba6d7
  • Improve the project layout 2e172bd
  • Improve the logic of reading data from socket into ring-buffer a7f07b3
  • Get as much data read from socket per loop as possible 148ee16
  • Improve the network read with ring-buffer and readv 0dcf599
  • Avoid memory allocations when calling readv 15611b4
  • Refactor the logic of handling UDP sockets d72d3de
  • Make the mixed-buffer more flexible 4ac906c
  • Improve the management logic of the mixed-buffer b8d571d

Bugfixes

  • Resolve the data race of stdConn on Windows (#235)
  • Fix the data corruption in some default codecs a56d2f3
  • Fix the issue of panic: runtime error: slice bounds out of range 30311e9

Docs

Misc

Compare
Choose a tag to compare

Features

  • Move the logging module out of the internal package and refactor to make it serviceable for users d566061 b6b1cfb 8837a92

Enhancements

  • Support writev and readv in eventloop f299a8e
  • Reduce GC pause frequency for Conn.AsyncWrite (#218) 477bb4f
  • Improve logging module 8837a92 b6b1cfb
  • Refactor the inside AsyncTaskQueue to make it more generic 2d1a463
  • Reduce GC pause frequency for accepting connections 2d1a463

Docs

Misc

  • Add debugging log when error occurs in Accept() (#222)
  • Make some trivial changes to ring-buffer 1bdd3aa
Compare
Choose a tag to compare

Features

  • Support TCP_NODELAY socket option 525df8e
  • Implement the lock-free queue for dispatching tasks faster (#181)

Enhancements

  • Shrink the ring-buffer for saving memory 14fd04a
  • Improve event poll fc042cc
  • Improve the buffered channels 83b96ed
  • Shrink the poll event list when it need to 1587638
  • Improve the I/O in event-loop c554f4e
  • Prioritize writable events 0f08c8f
  • Make it more robust when running async jobs 6509b85
  • Improve the poller waking logic 4d8accb

Bugfixes

  • Re-enqueue the subsequent jobs when a error occurs 1af3f6c
  • Close and release a socket when error occurs 9d86c92
  • Check outbound buffer in case the socket has been released 035f614
  • Avoid starving sockets e315252

Docs

  • Enrich the doc about using UDP packets 0047c15
  • Add more user cases of gnet 076b16c
  • Update benchmark results 028bab2
  • Update the description about ring-buffer 38b086a

Misc

Compare
Choose a tag to compare

Features

  • Determine logging mode by environment variable 2a7977f
  • Support locking each I/O event-loop goroutine to an OS thread 6fd6413

Enhancements

  • Improve the implementation of Least-Connections load-balancing b6a5f56
  • Speed up the Least-Connections load-balancing b5fbbda
  • Leverage system calls instead of net package to create listeners ccc8c64
  • Refine the logging module f46da44
  • Reorg errors in gnet 1c2f4b0
  • Move logging module into internal package 00af504
  • Take off the codec from eventloop bc85c34
  • Refactor for buffer in Conn 455c5ae
  • Refactor the load-balancing algorithm of source addr hash abbf582
  • Make channel buffered if necessary 43f93ca

Bugfixes

  • Fix a bug that led to negative counter of sync.WaitGroup on Windows 16ed4ab
  • Add "windows" build tag under SO_REUSEPORT mode 7862f3e
  • Supplement all the formal protocol formats of TCP and UDP 258253c
  • Resolve the issue of closing one fd twice b5a5c71
  • Fix concurrent loopCloseConn causes panic (#111)
  • Eliminate duplicate calls to loopCloseConn a72f5fd

Docs

  • Add a customized codec example (#90)
  • Add placeholder for user cases and new relevant article 5197f18
  • Renew results of techempower benchmark 61eee8f
  • Add the list of donors 42e04dd
  • Add xs:code 33a3e57
  • Build an official website for gnet 49363cd
  • Move the majority of content to website and simplify READMEs 903ff84

Misc

  • Fix a typo and improve code comments 37d75cc
  • Use SyscallError to wrap system calls errors c3907e0
  • Refine go build tags of operating systems 637144b
  • Format copyright info 6872c20
  • Remove all examples from the source-code repo a704e06
  • refine the usage of os.NewSyscallError 2d54d80
Compare
Choose a tag to compare

Features

  • Support graceful shutdown with OS signals (Fixes #82)

Enhancements

  • Improve the creation processes of netpoller (Fixes #72) ccc6c25
  • Reuse slice struct when resetting buffer 916c255
  • Make a big allocation on ring-buffer at the first time 61963bd

Docs

  • Update Features section in READMEs a0d53f5
  • Add a new article about gnet d500bf4
  • Supplement the missing acknowledgment item b031357

Misc

  • Enable ReadN(int) to handle corner cases 2e89e25
  • Leverage reviewdog as automated code review tool 5db42f9
  • Use customized logger to log errors instead of std log package 3a69701
  • Remove useless field of server 47817a0
  • Unexport some errors 5287bd8
Compare
Choose a tag to compare

Features

  • Support new load-balancing algorithm of least-connections (#63)
  • Support new load-balancing algorithm of source-addr-hash (#64)
  • Add a new API to get the number of currently active connections 5ae4849

Bugfixes

  • Fix an issue of not recycling byte-buffers 3b6edfd
  • Fix a bug of reading data from the full ring-buffer a9caa26

Enhancements

  • Improve several methods of ring-buffer 828e845
  • Refine the range indexes when re-slicing 008c0c9
  • Lazily allocate memory for ring-buffers 095ef52

Docs

Misc

  • Rename the eventloop_group.go to load_balancing.go 24203f4
  • Add unit test for ring-buffer ecf3473 94246dc
Compare
Choose a tag to compare

🚀 Features

  • High-performance event-loop under networking model of multiple threads/goroutines
  • Built-in load balancing algorithm: Round-Robin
  • Built-in goroutine pool powered by the library ants
  • Built-in memory pool with bytes powered by the library bytebufferpool
  • Concise APIs
  • Efficient memory usage: Ring-Buffer
  • Supporting multiple protocols/IPC mechanism: TCP, UDP and Unix Domain Socket
  • Supporting two event-driven mechanisms: epoll on Linux and kqueue on FreeBSD
  • Supporting asynchronous write operation
  • Flexible ticker event
  • SO_REUSEPORT socket option
  • Built-in multiple codecs to encode/decode network frames into/from TCP stream: LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec and LengthFieldBasedFrameCodec, referencing netty codec, also supporting customized codecs
  • Supporting Windows platform with event-driven mechanism of IOCP Go stdlib: net
  • Additional load-balancing algorithms: Random, Least-Connections, Consistent-hashing and so on
  • TLS support
  • Implementation of gnet Client