mtchuyen / Golang-Tips

Tips in Golang programming
3 stars 2 forks source link

Golang Article #32

Open mtchuyen opened 2 years ago

mtchuyen commented 2 years ago

Shortener & Shortlink

https://medium.com/@jrstupkadev/golang-url-shortener-22ba6c970792

mtchuyen commented 2 years ago

Tính chất bất biến (Immutability)

tính bất biến của dữ liệu = immutability

Trong lập trình hướng đối tượng và hàm, đối tượng bất biến (tiếng Anh: immutable object hay unchangeable object) là một đối tượng mà trạng thái của nó không thể bị thay đổi sau khi được tạo ra.

Nó trái ngược với đối tượng biến đổi (mutable object hay changeable object), mà có thể được thay đổi sau khi được tạo ra.

Trong vài trường hợp, một đối tượng được xem là bất biến nếu ngay cả khi vài thuộc tính bên trong thay đổi nhưng trạng thái của đối tượng dường như không thay đổi theo cái nhìn từ bên ngoài.

Immutability in Golang

https://levelup.gitconnected.com/immutability-in-golang-7a13199060bb

Làm thế nào để thiết kế hệ thống có tính bất biến?

Tuân thủ theo Immutability Patterns: Immutability Patterns in Go

https://www.youtube.com/watch?v=vtYTl4pNDSI

mtchuyen commented 2 years ago

Graphviz + Golang: The geeky tools to speed up technical brainstorming

https://levelup.gitconnected.com/graphviz-golang-the-geeky-combo-for-technical-brainstorming-76d8992d5812

Thực ra muốn giải quyết vấn đề user-flow để giải quyết bài toán UID dynamic

mtchuyen commented 1 year ago

Golang with flame graph

Trong bài viết này có nói tới flame graph - một cách đo hiệu năng hoạt động của app viết bằng Go.

mtchuyen commented 1 year ago

Heavy load request system

https://thienthn.medium.com/how-i-manage-to-handle-1-million-requests-of-updating-per-minute-with-rust-7785368c2e9f

https://thienthn.medium.com/improving-performance-for-handling-million-of-requests-af9437184968

https://waclawthedev.medium.com/golang-handling-tens-of-thousands-of-simultaneous-http-requests-even-on-raspberry-pi-5115ca9b152d

Golang: Handling tens of thousands of simultaneous HTTP requests even on Raspberry Pi

https://waclawthedev.medium.com/golang-handling-tens-of-thousands-of-simultaneous-http-requests-even-on-raspberry-pi-5115ca9b152d