# 23년 12월 전반기 뉴스레터

## 로우 쿼리 좋아하는 건 고 개발자의 숙명일지도

[Level UP your RDBMS Productivity in GO - DEV Community](https://dev.to/this-is-learning/level-up-your-rdbms-productivity-in-go-51eo?ref=dailydev)

---

## 마이 웹소켓 멜로디

웹소켓 라이브러리가 많이 나와 있지만, 브로드캐스팅까지만 단순하게 지원하면서 유명한 친구는 이 라이브러리가 유일한 것같습니다.

[olahol/melody: :notes: Minimalist websocket framework for Go (github.com)](https://github.com/olahol/melody)

---

## 스키마 마이그레이션이 어떻게 zero downtime으로 되죠?

[Zero-downtime Postgres schema migrations need this: lock\_timeout and retries | Database branching for any Postgres DB · Postgres.ai · DBLab](https://postgres.ai/blog/20210923-zero-downtime-postgres-schema-migrations-lock-timeout-and-retries)

---

## 쉽고 빠르게 오픈 텔레메트리 적용하기

[keyval-dev/odigos: Distributed tracing without code changes. 🚀 Instantly monitor any application using OpenTelemetry and eBPF (github.com)](https://github.com/keyval-dev/odigos)

---

## ORM이 못 미더우신가요?

그래서 raw query를 써야겠나요?

하지만 저처럼 타입 맞추기 어려우면 이런건 어떠신가요?

[Compile SQL to type-safe code | sqlc.dev](https://sqlc.dev/)

[Comparing database/sql, GORM, sqlx, and sqlc | The GoLand Blog (jetbrains.com)](https://blog.jetbrains.com/go/2023/04/27/comparing-db-packages/?ref=dailydev)

---

## 고에 새로운 표준 패키지와 함수가 추가될 전망입니다.

`unique` 라는 패키지라고 하네요.

전역에 걸쳐 유니크한 값을 다루는 걸로 보입니다.

이게 들어오면 지금 하는 것처럼 패키지 레벨 private에 Get 함수는 public으로 두는 스타일을 고집하지 않아도 되겠네요.

[unique: new package with unique.Handle · Issue #62483 · golang/go (github.com)](https://github.com/golang/go/issues/62483#issuecomment-1791156853)

---

## C에 구현된 go의 채널

어쩌다..

[rochus-keller/CspChan: A pure C (-std=c89) implementation of Go channels, including blocking and non-blocking selects. (github.com)](https://github.com/rochus-keller/CspChan)

---

## SK 테크 써밋 가보셨나요?

전 애석하게도 휴가가 부족해서 못 갔습니다 ㅠ

[SK TECH SUMMIT 2023](https://sktechsummit.com/sessions/sessionsList.do)

---

## RDB 수평 확장에 대한 고찰

[Why Is It Hard to Horizontally Scale SQL Databases | by Arslan Ahmad | Dec, 2023 | Level Up Coding (gitconnected.com)](https://levelup.gitconnected.com/why-is-it-hard-to-horizontally-scale-sql-databases-bd0aec55a5cd)

---

## fifo를 기반으로 한 캐시 자료구조

[scalalang2/golang-fifo: Modern efficient cache design with simple FIFO queue only in Golang (github.com)](https://github.com/scalalang2/golang-fifo)

---

## 시계열 데이터베이스의 성능 향상을 위해

CPU가 할 수 있는 만큼만 갈구도록 합시다.

[Performance optimization techniques in time series databases: Limiting concurrency (victoriametrics.com)](https://victoriametrics.com/blog/tsdb-performance-techniques-limiting-concurrency/)

[Performance optimization techniques in time series databases: sync.Pool for CPU-bound operations (victoriametrics.com)](https://victoriametrics.com/blog/tsdb-performance-techniques-sync-pool/)

---

## 도커파일 잘 만들고 계시나요?

전 좀 한다고 느낍니다. 이 글을 읽기 전까지는요.

[Docker optimization guide: 8 tricks to optimize your Docker image size (augmentedmind.de)](https://www.augmentedmind.de/2022/02/06/optimize-docker-image-size/?ref=dailydev)

---

## 고에서 에러 추적을 어떻게 하시나요?

저의 경우엔 `zerolog`를 래핑해서 다계층의 로그 구조를 설계했던 적이 있었는데요.

이게 있었다면 아마 안 그랬을 거 같기도 합니다.

[bracesdev/errtrace: An alternative to stack traces for your Go errors (github.com)](https://github.com/bracesdev/errtrace)

---

## 고에서 event driven 아키텍처를 구현하는 방법

펍섭을 곁들인.

[Building an event-driven system in Go using Pub/Sub - DEV Community](https://dev.to/encore/building-an-event-driven-system-in-go-using-pubsub-4l0h?ref=dailydev)

---

## 자료구조 복습하고 가시죠!

[https://www.freecodecamp.org/news/data-structures-the-key-to-scalable-software/](https://www.freecodecamp.org/news/data-structures-the-key-to-scalable-software/)

---

## 문자열 연산 최적화에 관심이 있으신가요?

[Optimizing Go string operations with practical examples | by Alex Bledea | Dec, 2023 | Medium](https://medium.com/@ozoniuss/optimizing-go-string-operations-with-practical-examples-83df39b776fb)

---

## 올해가 끝나가네요.

이 뉴스레터를 읽으시는 모든 분들께 남은 한해 건강하고 행복하게 보내시길 바랍니다.
