Cluster membership management on AWS
2025-02-07
In continuation with my previous post, I have now finished porting hedge to AWS. It’s a trimmed-down version for now; only the features directly related to cluster membership are ported. I decided to make a separate repo, called hedge-cb (in keeping with the -cb theme), instead of updating hedge directly. And it’s mainly due to CGO. I didn’t really fancy the idea of introducing CGO to hedge as it could break a lot of the CI builds at work.
Aws · Cgo · Clockbound · Cluster · Distributed-Systems · Ffi · Go · Golang · Hedge · Leader-Election · Memberlist · Programming · Software · Systems · Tech · Timesync · True-Time
2 minutes
Distributed locking on AWS (ClockBound)
2025-02-02
After some testing time, I now have a working port of spindle in AWS. There were some slight changes from the original library to account for some of the differences between Cloud Spanner and PostgreSQL, but not really by much. It’s called spindle-cb, if you’re interested. It’s still half the battle though; I still have to port hedge as well before I could really use it for some of the planned projects in my pipeline.
Aws · Cgo · Clockbound · Distributed-Locking · Ffi · Go · Golang · Locking · Programming · Software · Spindle · Systems · Tech · Timesync · True-Time
2 minutes
AWS ClockBound client for Go (update)
2025-01-27
A week ago I published a short blog about clockbound-client-go. After some testing, turns out there’s an issue in reading the actual time from ClockBound’s shared memory segment; it seems to provide only the elapsed time since boot. However, using the Rust client and the FFI bindings produce the correct results. Either there is a problem in the code that reads the shared memory segment, or the SHM contents are wrong.
Aws · Cgo · Clockbound · Ffi · Go · Golang · Programming · Software · Systems · Tech · Timesync · True-Time
1 minute
2025-01-22
I’ve written a Go client for AWS ClockBound called clockbound-client-go. It uses the newer, shared memory segment protocol instead of the older, socket-based protocol. This is a prerequisite library needed to port spindle (and maybe even hedge) to AWS (for an upcoming project). As great a tech Google’s TrueTime is, there is no available API for it. It is only through Spanner that spindle achieves its locking mechanisms with TrueTime. Currently, it’s the cheapest way, surprisingly, to do distributed locking that I’ve tried so far, compared to the likes of Redis, Zookeeper, etcd, Consul, etc.
Aws · Clockbound · Go · Golang · Programming · Software · Systems · Tech · Timesync · True-Time
1 minute
Using Homebrew for distributing Go apps (part 2)
2023-04-13
For personal reference: This is a followup on a previous post that is a bit more manual. This is a little bit easier. a) Create your own Homebrew tap Create a new GitHub public repository with a prefix homebrew-, i.e. homebrew-tap. This will host all the apps that you want to distribute via your tap. Users will install your apps using the following commands: No need to include the 'homebrew-' prefix $ brew tap flowerinthenight/tap $ brew install <toolname> # Or one-liner $ brew install flowerinthenight/tap/<toolname> b) Let’s use Github Actions to setup goreleaser First, add a .
Go · Golang · Goreleaser · Homebrew · Ruby · Tech
1 minute
Using Homebrew for distributing Go (golang) apps
2019-07-30
For personal reference: a) Create your own homebrew tap Create a new GitHub public repository with a prefix homebrew-, i.e. homebrew-tap. This will house all the apps that you want to distribute via your tap. Users will install your apps using the following commands: No need to include the 'homebrew-' prefix $ brew tap flowerinthenight/tap $ brew install <toolname> The toolname part will correspond to the filename inside your repository tap.
2 minutes
Mobingi’s Kubernetes clusters repo
2018-12-27
I posted an article for @mobingi about its Kubernetes clusters repo. Please check it out. Thanks.
Go · K8s · Kubernetes · Mobingi · Repo
1 minute
2018-09-25
I posted an article for @mobingi about its Golang-based monorepo. Please check it out. Thanks.
Go · Golang · Mobingi · Monorepo
1 minute
A golang-based monorepo example
2018-02-06
I uploaded an example of a golang-based monorepo in GitHub. This is a stripped down version of what we have @mobingi. If you are planning to have a golang-based monorepo, please have a look.
1 minute
Using OS specific stores for storing CLI credentials for golang apps
2017-10-30
This post is to show a simple way of using Docker’s credential helper package to utilize the system’s native credential store as storage for your Golang-based CLI applications’ login credentials. This means Keychain for OSX, wincred for Windows, and pass for Linux. We use pass here since secretservice, although supported, doesn’t work out of the box in headless servers. Here’s a simple implementation of our Set, Get, and Del functions.
Go · Keychain · Nativestore · Pass · Wincred
1 minute
Using Docker’s ETW log driver in Windows
2017-09-20
In Docker’s ETW logging driver doc, it uses the tool logman to view the logs. In this article, I will show you how to use mftrace to view Docker ETW logs in real-time. First, here’s a simple application written in Go that logs to STDERR every second. Next, let’s create a Docker image (Windows) using the Dockerfile below. assuming the code above is saved in a directory called 'demoapp' $ docker build -t demoapp .
1 minute
Wrapper for amqp library for RabbitMQ
2017-06-30
I uploaded a simple wrapper to streadway/amqp library for RabbitMQ with support for auto reconnections. This is a simplified version of what I’m using in production.
1 minute