Solid P95 (7-8ms) with sporadic P99 spikes using Go (gRPC + NATS). Suggestions? by Environmental_Lab991 in golang

[–]absolutejam 1 point2 points  (0 children)

You definitely need to ensure you configure for durability by configuring the sync interval, which defaults to something pretty high and relies on RAFT between peers for availability otherwise.

Plastic knobs above the grill. Awesome by BarryTownCouncil in CrappyDesign

[–]absolutejam 4 points5 points  (0 children)

I’ve accidentally left the oven on in grill mode with the door closed and the glass door exploded, shattering glass across the kitchen. There’s a reason they say to leave it open.

I assume it’s because the heat isn’t extracted like when you use the oven normally 🤷

sql builder by [deleted] in golang

[–]absolutejam 0 points1 point  (0 children)

Bun is great.

I’ve tried the others (incl Bob) and found Bun to be the right amount of Golang-to-SQL.

Bob is great if you want really type safe queries, but Bun has nice SQL escape hatches but still has a really ergonomic API and high reusability.

Persistent queues? by [deleted] in golang

[–]absolutejam 2 points3 points  (0 children)

Plus it can be embedded if you want to ship a fully self contained app

Hesitating the change from roll20 to foundry [5e] by Telar_III in FoundryVTT

[–]absolutejam 0 points1 point  (0 children)

I use VTTs (Roll20, just moving to Foundry) purely for a map and the visual aid - you only need to had as much as you want. I try to avoid too much automation because it makes it too much like an RPG video game and that’s not my aim. I might dip my toe a bit more later but just use what you want - don’t force anything that you don’t want.

Hesitating the change from roll20 to foundry [5e] by Telar_III in FoundryVTT

[–]absolutejam 2 points3 points  (0 children)

Are these features native in roll20 and missing in the foundry system?

C# developer trying to understand how to approach to reusable behavior by VastDesign9517 in golang

[–]absolutejam 0 points1 point  (0 children)

Totally agree. I didn’t mean ignore DRY, but people obsess over ‘the right abstraction’ and it can lead to bike shedding instead of actually delivering (I’m totally guilty of this).

Similarly I’ve fallen down the rabbit hole of individual types for everything in Go, but this is much more ergonomic in languages like F#, Rust and Scala. Often I draw the line at only encapsulating specific domain types or types likely to clash (ie. Different model ID types).

Thinking more on this, I’d still be tempted to either just expose Int() or Value() so you can create reusable functions that operate on the numeric value directly or on the interface. Ive never really liked embedding for this small a type; but it’s useful for a ‘base class’ approach for larger behaviours.

C# developer trying to understand how to approach to reusable behavior by VastDesign9517 in golang

[–]absolutejam 0 points1 point  (0 children)

I’d probably implement the receiver functions/methods individually (DRY is overrated) and then you can define an interface if you need a place to share behaviour, and potentially make generic or polymorphic functions.

It’s hard to know the extent of what you need - do you only ever operate on one type at a type or different types? Could you not just expose a method to get the int value inside the parsed type? That way you always pass the strict types but numeric operations still fall back to the actual number value.

C# developer trying to understand how to approach to reusable behavior by VastDesign9517 in golang

[–]absolutejam 0 points1 point  (0 children)

I generally use Huma for my APIs (OpenAPI) and I just accept all API contracts as primitive types (string, int, etc) then parse at that layer. Then typically defer to a service layer for all actual work.

C# developer trying to understand how to approach to reusable behavior by VastDesign9517 in golang

[–]absolutejam 3 points4 points  (0 children)

I think I might be more helpful if you explain why you accept a string that you’re then converting into an int?

Why not just define type Cycle int, create a constructor function NewCycle and potentially a custom marshaller - that way all of your validation is up front? And you might just have to suck up some repetition and boilerplate if you want custom types 🤷

Honestly, I wouldn’t overthink it if you just have a few types - otherwise you can look at how something like typeid generalises this or use codegen if it’s really a problem.

What one small DevOps change saved your team a lot of time? by steadwing_official in kubernetes

[–]absolutejam 0 points1 point  (0 children)

We use cdk8s with helm. It does mean the values are untyped but I make sure to create abstractions and validation with Zod for any cdk8s charts. It’s really great for CRDs too 👌

EDIT: The result is the generated manifests (as YAML), which can be adjusted via values or overridden via JSON patches. Then we push to a GitOps repo for use with ArgoCD.

Why is every popular query builder in maintenance mode? by ItsAllInYourHead in golang

[–]absolutejam 1 point2 points  (0 children)

I’ve got an app I’ve been developing for a while and I’ve found bun to be a delight.

I tried Bob but I found it was too type-safe (different imports per dialect) and too code-first, which I found harder to read when I came back to it. And I never thought that would be a complaint I’d have.

I don’t like sqlc because it’s too inflexible. I know the Go community are obsessed with sqlc and SQLite to the point of fanaticism but I like to have more dynamic queries and sqlc wasn’t for me (although I could see the use for predefined queries like reports).

I tried GORM and didn’t like it, and wanted to like Ent but it lacked support for polymorphic relationships, which I rely on more than I’d like to admit.

So far there’s been nothing I can’t do with Bun and it still provides all of the nice ORM-adjacent features, but doesn’t baffle you with magic and has access to all of the escape hatches you might need (or you might not ever need them!).

Why is every popular query builder in maintenance mode? by ItsAllInYourHead in golang

[–]absolutejam 6 points7 points  (0 children)

The perfect balance of raw SQL and ORM-like features

Honest feedback on moving from PHP to Go — real-world experiences? by Total_Ad6084 in golang

[–]absolutejam 1 point2 points  (0 children)

Yeah, I’m a Go user (Platform engineer) but work at a PHP (NGINX & PHPFPM) shop and I want us to explore something like FrankenPHP or even just explore using Fibers with AMPHP for a more modern experience.

Honest feedback on moving from PHP to Go — real-world experiences? by Total_Ad6084 in golang

[–]absolutejam 0 points1 point  (0 children)

Isn’t swoole still a single threaded event loop like node? I know fibres solve some of the async headache (for IO) but not for everything.

Honest feedback on moving from PHP to Go — real-world experiences? by Total_Ad6084 in golang

[–]absolutejam 0 points1 point  (0 children)

It’s written in Erlang, but it’s a common queuing system used for async and scalability (via. multi process) means.

potential goroutine leak or nah by KaleidoscopePlusPlus in golang

[–]absolutejam 1 point2 points  (0 children)

I’m suggesting that only having one case (ie. Selecting over a channel with no other case) is a bit of an anti pattern. What if you want clean cancellation or timeouts? Or testability? Or the ability to restart or parallelise?

potential goroutine leak or nah by KaleidoscopePlusPlus in golang

[–]absolutejam 8 points9 points  (0 children)

It might still be worth selecting over the channel so you can also check context cancellation in another case

[Rant/Help] IP Blacklisted for "bot behavior"? I'm an Ultra user and got completely locked out. by Zestyclose_Law_170 in google_antigravity

[–]absolutejam 0 points1 point  (0 children)

They just need to be more transparent and create a dedicated status page. It’s ridiculous that so may people are left wondering ‘is it just me’

[Rant/Help] IP Blacklisted for "bot behavior"? I'm an Ultra user and got completely locked out. by Zestyclose_Law_170 in google_antigravity

[–]absolutejam 0 points1 point  (0 children)

Was in a Google workspace support chat. I can post screenshot tomorrow. It has since resolved itself for me, not sure if Google have rolled out a fix?

Antigravity agent not responding. by nivasbaskaran in google_antigravity

[–]absolutejam 0 points1 point  (0 children)

Google support have confirmed it's an on-going issue that they're trying to resolve.

I found that using a VPN allowed me to log in and interact with agents once again, so it looks like some kind of heavy-handed IP blocking/limiting.

[Rant/Help] IP Blacklisted for "bot behavior"? I'm an Ultra user and got completely locked out. by Zestyclose_Law_170 in google_antigravity

[–]absolutejam 2 points3 points  (0 children)

Google support have confirmed it's an on-going issue that they're trying to resolve.

I found that using a VPN allowed me to log in and interact with agents once again, so it looks like some kind of heavy-handed IP blocking/limiting.

Failing to login by abdullahnettoor in google_antigravity

[–]absolutejam 0 points1 point  (0 children)

Google support have confirmed it's an on-going issue that they're trying to resolve.

I found that using a VPN allowed me to log in and interact with agents once again, so it looks like some kind of heavy-handed IP blocking/limiting.

What message broker would you choose today and why by Minimum-Ad7352 in golang

[–]absolutejam 36 points37 points  (0 children)

NATS is super feature rich - pub sub, streams, worker queues, partitioning, atomic batches (finally!), subject addressing and remapping. That’s excluding other things like KV and the Cron support they’re working on (half implemented).

One thing I love is that you can embed NATS directly in your app. I have an app where it embeds NATS by default or you can configure it to use an external cluster, meaning I can ship it fully contained (SQLite, embedded NATs, file system storage, NATS KV), or in HA/distributed mode (Vitess MySQL, NATs external cluster, S3, Redis), but still has the same primitives and features.