Re:Choosing Go at American Express
by liampulles on Wednesday January 03, 2024 @05:15PM
(#38860604)
You may rejoice on the logging front: https://go.dev/blog/slog
This is nice but it’s not a simple library to use and I think that’s going to hurt it.
Re:Choosing Go at American Express
by i_am_programmer on Thursday January 04, 2024 @04:00AM
(#38864737)
It's as easy to use as other 3rd party logging libs.
I frequently make use and it's as easy as slog.Info("text", "field", value, "field", value)
It’s very simple to use, but dilly-dallying about a standard structured logging package means it’s now not widespread across third party libraries.
Many non-trivial Go apps have 4-5 logging frameworks pulled in, it’s a mess.
It’s not that hard to get librdkafka linked to your Go code.
I did it in a day, behind a corporate firewall, without root access, and an outdated GCC compiler.
Most of the day was spent compiling a new version of GCC.
Re:Choosing Go at American Express
by EdwardDiego on Wednesday January 03, 2024 @08:17PM
(#38861969)
It's not that hard, but it is an extra step.
franz-go is the least painful kafka library out there
I personally don’t trust anything other than the confluent-kafka/v2 package.
franz-go is like 4x-20x faster than standard confluent client
I’ll try it
Re:Choosing Go at American Express
by EdwardDiego on Monday January 08, 2024 @08:17PM
(#38920976)
Having looked at the benchmarking code in franz-go, I'm very dubious about those claims.
1) What settings did they use for those published numbers? 2) They don't change the default `linger.ms` for confluent-kafka-go and indeed, don't provide a argument to do so, unlike for the code to test their client.
Automatically that renders the benchmark useless - the code running franz-go defaults to linger.ms of 0, librdkafka defaults to 5ms, so already you're not comparing apples with apples.
Slightly longer linger.ms should squeeze more throughput (at the expense of higher latency) not the other way around.
I ran some tests and it does appear to be about 3x faster at consuming, for my use-case.
Re:Choosing Go at American Express
by jollyllama on Thursday January 04, 2024 @10:47AM
(#38868372)
>Go is a decent industrial programming language
Industrial?
Re:Choosing Go at American Express
by EdwardDiego on Monday January 08, 2024 @07:59PM
(#38920826)
Yeah, as in writing code in the general software industry, CRUD apps for businesses etc. Didn't mean for running machinery / sensors etc. although it could be good there? I have no experience at that level.
E.g., my manager is really interested in Dapr as a way to make basic Kafka usage easier for teams across our org.
Dapr's written in Go, and have made the reasonable decision to not use any libs that have C bindings for the same reason I don't like them.
However, this means that they can't use the Confluent Go Kafka client, as it's just a wrapper around librdkafka.
So they use Sarama, as it's written in pure Go, and is widely used, but is one of the most problematic Kafka clients I've had the misfortune to support. Although now that IBM has taken ownership of the project from Shopify, some of the more egregious bugs and oddities are finally being fixed.
But yeah, while you _can_ bind to C libs in Java, I've never encountered a library that did, so cross-platform lib compatibility wasn't something I ever had to worry about when working with Java.