smarty-prototypes / go-disruptor

A port of the LMAX Disruptor to the Go language.
Apache License 2.0
1.37k stars 212 forks source link

Ask : Is Go-Disruptor ready / safe for production ? or Is there any inprogress job ? #14

Open devararendy opened 11 months ago

devararendy commented 11 months ago

Hi @joliver, i'm very interested to use LMAX Disruptor in Golang. But i would like to know whether this library is ready / safe for Production or is there any inprogress job ? Previously I'm using ported LMAX Disruptor in C++

So it's very interesting to use Disruptor in Go.

Thank You

joliver commented 11 months ago

Unfortunately using Go code this isn't possible due to the Go Memory Model. The only solution would be to write processor-specific assembly code that creates the appropriate write/read memory barriers.

Further, now that Go has generics, it would be easier to hold the RingBuffer[T] inside of the Disruptor.

Again, this is not anywhere close to being ready for production.

sshelll commented 10 months ago

Unfortunately using Go code this isn't possible due to the Go Memory Model. The only solution would be to write processor-specific assembly code that creates the appropriate write/read memory barriers.

Hi @joliver , I would like to know the reason why this component can't be used in the production environment.

Is it because the go-mem-model limits the implementation of multiple producers?

Or is there just a possible problem with the current version(single-producer : multi-consumer)?