Re:Processing 40TB of code from 10M projects with a dedicate...
by twic on Tuesday October 01, 2019 @09:24AM
(#21125029)
> I was writing a Docker image built around Prometheus' jmx_exporter intended to be used as a mixin for our Java apps, and part of what I needed to do was provide a simple script to preprocess separate config files to produce the config used by jmx_exporter
Did you consider, and stop me if this suggestion is completely wild, Java?
Re:Processing 40TB of code from 10M projects with a dedicate...
by EdwardDiego on Monday October 07, 2019 @06:54AM
(#21179375)
It's a script that merges YAML objects, there's an overhead to Java for this use case. I did consider Kotlin, but that same overhead of a POM, plugins to build capsules/fat jars etc.
My initial thought was Python, but it needed a couple of 3rd party dependencies, and there wasn't an overly clean _and_ simple way to copy the script in from the mixin and run locally.
So I shrugged, rewrote my script in Go, and then used a multi-stage build to copy in the binary and nothing else.
Ending up with a single statically linked binary was cool, even if Go does some stuff that made my eyebrows quirk a tad (I still can't believe that an idiomatic set in Go is map[T]struct{}...)