Skip to content

chuchunf/goDisruptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goDisruptor main status codecov

Another LMAX disruptor port in go 1.8 with generics support.

Description

LMAX disruptor is a High Performance Inter-Thread Messaging Library as an alternative to bounded queueu, which makes use of padding to avoid memory false sharing, alignment of memory in stripe to be cache friendly etc.

This is a port in Go with generics support, NOTE, Go's approach to concurrency is "Don't communicate by sharing memory; share memory by communicating". Channel is the prefered method for concurrency. This port follows disruptor's approach for better performance.

Getting started

Prerequisites

  1. install latest go lang binary (1.18.3 and above)
  2. install latest vs code

Running Testing

running all unit testing cases

    go test -timeout 30s -tags -race goDisruptor/internal
    go test -timeout 30s -tags -race goDisruptor/pkg
    go test -timeout 30s -tags -race goDisruptor/example

running all performance testing benchmarks

    go test -benchmem -run=^$ -tags -race -bench . goDisruptor/internal
    go test -benchmem -run=^$ -tags -race -bench . goDisruptor/pkg
    go test -benchmem -run=^$ -tags -race -bench . goDisruptor/example

Usage

Please refer to example

Versioning

  • 0.1
    • Initial Release

Roadmap

  • support more waiting strategies
  • support publish N messages
  • support consume N messages
  • support proper DSL
  • more examples

License

Distributed under the MIT License. See LICENSE.txt for more information.

Acknowledgments

Thanks to the LMAX-Disruptor project.

About

another go port of LMAX disruptor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages