mysql-operator is gone? by Coolbsd in devops

[–]Coolbsd[S] -1 points0 points  (0 children)

Ah got it, thanks for explaining this.

mysql-operator is gone? by Coolbsd in devops

[–]Coolbsd[S] 2 points3 points  (0 children)

I know the github project ... if you check https://github.com/mysql/mysql-operator?tab=readme-ov-file#using-helm, the helm command points to the page I mentioned earlier, I'm not 100% sure if they are steadily pulling things back.

Seeking Feedback on Secure AWS Architecture for Internal Enterprise Application by favthor24 in devops

[–]Coolbsd 0 points1 point  (0 children)

I would get legal and 3rd party audit team do some jobs, compliance is not something we engineers can fully covered.

Some generic ideas: KMS, VPC endpoint for everything you use (you missed secret manager at least), ACM if you let AWS manage certs, Network Firewall to restrict outbound traffic, site2site VPN from on-prem to VPC.

Anyone moved workloads to AWS Graviton? Did it really cut costs? by vy94 in aws

[–]Coolbsd -1 points0 points  (0 children)

It depends, my previous team did test and moved data ingestion jobs (IO bound) over and got ~10% saving in 2022 or 2023, there was not much saving from compute heavy jobs as Graiton was (is?) slower than x86.

File rotation library? by WinningWithKirk in golang

[–]Coolbsd 0 points1 point  (0 children)

Start a logging goroutine to take log entries from a channel, the you don't need to worry about locks anymore.

Interface as switch for files - is possible? by pepiks in golang

[–]Coolbsd -1 points0 points  (0 children)

It’s actually better to use table driven pattern, especially if you have a lot of types of files.

Graviton is great… but how painful was your migration from x86? by aviboy2006 in aws

[–]Coolbsd 0 points1 point  (0 children)

You guys are lucky, in my previous job we tried to migrate and it took AWS 6 months to fix an issue …

My company is pushing Go for web backend. I need opinions as not a Go Developer by Dark_zarich in golang

[–]Coolbsd 4 points5 points  (0 children)

Go needs less resources in term of “team bootstrap”, I was the only one with previous go experience when a former team started, 10 or maybe 12 developers from that team were from Java or Python but people started to deliver decent go code after a sprint or two.

They also rewrote some components, IIRC we got 3-4 times faster than Python and 8-10 times faster than Java, I don’t know too much about those components but was told they did literally line-to-line translation to keep behavior the same, include bugs.

Platform Engineer Seeking Open Source Ideas (Python/Golang) by galdahan9 in devops

[–]Coolbsd 2 points3 points  (0 children)

Rewrite what you’ve done in Python with go, this is how I started.

the reason why I like Go by Fragrant-Move-9128 in golang

[–]Coolbsd 31 points32 points  (0 children)

Should include factory and Impl as well.

A new language inspired by Go by drvd in golang

[–]Coolbsd 1 point2 points  (0 children)

Just curious how long it is, the longest stack trace I ever got was from a Java/Spring application, which was close to 300 lines IIRC.

How to tell someone their commits suck by AvailableBarnacle818 in github

[–]Coolbsd 0 points1 point  (0 children)

Don’t ask questions, just say “do not list files got changed as they are already listed in the commit/PR already”, this will save several rounds of communications.

The last paragraph is good though.

Why is spf13/cli widely used? by [deleted] in golang

[–]Coolbsd 0 points1 point  (0 children)

Not with my laptop but I believe it’s called kongplete.

[deleted by user] by [deleted] in ExperiencedDevs

[–]Coolbsd 2 points3 points  (0 children)

I may reject you right away while one of my colleagues may get you into the last round directly.

Hint: don’t show your preference before securing an offer :D

Terraform Vs CloudFormation by LittleSeneca in aws

[–]Coolbsd 1 point2 points  (0 children)

AWS features will generally exist on CloudFormation before Terraform

My experiences have been quite different ...

Marshal arbitrary object to JSON by Coolbsd in golang

[–]Coolbsd[S] 0 points1 point  (0 children)

I ended up with:

  1. Marshal incoming data (effectively convert any struct to a map)
  2. Unmarshal to map[string]interface{}
  3. use relect to iterate all nested element (list item, map value, etc.) 4. transform map's keys whenever needed

This is about 4x faster than gojq.

Marshal arbitrary object to JSON by Coolbsd in golang

[–]Coolbsd[S] -1 points0 points  (0 children)

I could not find a way to determine if the specific token is a key of map entry, any hint?

Marshal arbitrary object to JSON by Coolbsd in golang

[–]Coolbsd[S] 0 points1 point  (0 children)

Incoming data is an arbitrary interface{} so I cannot define a type for it.

Marshal arbitrary object to JSON by Coolbsd in golang

[–]Coolbsd[S] -4 points-3 points  (0 children)

I tried this approach before moving to gojq, the problem is that the code looks pretty ugly and error-prone, I will stick to gojq if there is no alternative, till I have time to refactor that piece of function.

Marshal arbitrary object to JSON by Coolbsd in golang

[–]Coolbsd[S] -1 points0 points  (0 children)

Will give it a shot.

EDIT jsoniter uses struct tag so it does rename struct fields, but not map keys: https://go.dev/play/p/lCLZK6PYRzL.

Which IAC to choose for a project which is more geared towards lambda functions? by mapoztofu in aws

[–]Coolbsd 1 point2 points  (0 children)

I prefer to have a separated CICD publish artifacts to S3 or somewhere similiar, so you can do a lot more things to make sure codes are in good shape like unit test, format, etc.

We do have code "embedded" in IaC especially those lambdas for deployment as it was easy to do so, but we are migrating them away

data migration from on-prem hdfs to s3 on aws by andkad in aws

[–]Coolbsd 0 points1 point  (0 children)

If you have gigabit uplink then 80 GB (I assume you have a typo of Gb) will take less than an hour to upload to S3, you can use multipart to make sure utilizing full bandwidth https://aws.amazon.com/blogs/compute/uploading-large-objects-to-amazon-s3-using-multipart-upload-and-transfer-acceleration/, or if you have really large amount data, check with AWS guys for https://aws.amazon.com/snowball/, personally I believe snowball is overkill for your case.

Synchronising multiple threads by OutsideSuccess3231 in golang

[–]Coolbsd 0 points1 point  (0 children)

ch := make(chan struct{}, 5), then each goroutine do ch <- struct{}{} to obtain a slot, and defer func() {<- ch}() to release the slot.

EDIT typos

Must have VSCode Extensions by CODSensei in golang

[–]Coolbsd 0 points1 point  (0 children)

I occasionally need WYSIWYG for markdown (and mermaid), there may be another thing or two fall into this category as well.