Important things

302 http response with Location header for url redirection(GET and Head) - 307 for temporary redirection ,==> Spring Sleuth - tracing in microservices, ==> https://astikanand.github.io/techblogs/high-level-system-design/design-bookmyshow, https://www.hellointerview.com/learn/system-design/in-a-hurry/introduction

Friday, 13 December 2024

Golang basics

 

Summary of Useful Go Commands

  • go run: Compile and run code in one step.
  • go build: Compile code into an executable binary.
  • go test: Run tests.
  • go fmt: Format code according to Go's style.
  • go install: Install a binary from your Go code.
  • go get: Download and install dependencies.
  • go mod: Manage Go modules (dependencies).
  • go clean: Clean up build artifacts.
  • go doc: View documentation.
  • go env: View environment variables.
  • go tool: Run various Go tools (like pprof or vet).
  • go version: Check the installed Go version.
  • go vet: Analyze code for potential issues.
  • go build -race: Run with race detection to catch concurrency bugs.

In Go, the GOOS and GOARCH environment variables are used to control cross-compilation—the ability to build executables for different operating systems and architectures. By setting these variables, you can compile Go code on one platform (e.g., Linux) and generate a binary for another platform (e.g., Windows or macOS).
  • GOOS=windows GOARCH=386 go build -o myapp_win32.exe

Project Structure:

myapp/
├── cmd/
│   ├── app1/
│   │   └── main.go          # Entry point for app1
│   ├── app2/
│   │   └── main.go          # Entry point for app2
│   └── cli-tool/
│       └── main.go          # Entry point for a command-line tool
├── internal/
│   └── service/
│       └── service.go       # Internal code used by cmd apps
├── pkg/
│   └── utils/
│       └── utils.go         # Shared utility functions
├── go.mod
├── go.sum
└── README.md


go run main.go  - to run go project

go mod tidy - for removing unused dependencies

go get github.com/gin-gonic/gin - to download dependency

go mod init <module-name> - to intialize module

go mod vendor - command in Go is used to create a vendor/ directory in your Go project, where it copies all the dependencies (modules) that your project relies on. This directory includes the source code of the dependencies, which makes your project self-contained in terms of its dependencies. It is particularly useful for scenarios where you want to ensure that your project works offline or when you need to bundle all your dependencies in a single place for deployment or versioning.

Thursday, 24 October 2024

All Design Patterns

 ๐Ÿ‘จ‍๐Ÿ’ป ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—Ÿ๐—ฎ๐—ป๐—ด๐˜‚๐—ฎ๐—ด๐—ฒ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป ๐—ฃ๐—ฎ๐˜๐˜๐—ฒ๐—ฟ๐—ป๐˜€ ๐Ÿ’ก


Go: https://lnkd.in/gY828zKF
Java: https://lnkd.in/gvAQh5H3
Javascript​: https://lnkd.in/gd89jgyX

๐—–๐—น๐—ผ๐˜‚๐—ฑ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป ๐—ฃ๐—ฎ๐˜๐˜๐—ฒ๐—ฟ๐—ป๐˜€ ๐ŸŒง

⛅ AWS cloud design patterns: https://lnkd.in/gk5-Xv9C

๐ŸŒจ Azure cloud design patterns: https://lnkd.in/gThwDH8m

๐ŸŒฉ GCP cloud architecture patterns: https://lnkd.in/gGqbCsde

๐ŸŒค Cloud Computing Patterns: https://lnkd.in/gehR6-zB


๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ๐˜€ & ๐——๐—ถ๐˜€๐˜๐—ฟ๐—ถ๐—ฏ๐˜‚๐˜๐—ฒ๐—ฑ ๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ๐˜€

๐ŸŽฏ Microservices patterns collection: https://lnkd.in/gX-J9cvB

๐ŸŽฏ Microservices Anti Patterns: https://lnkd.in/gsjj7eEm

๐ŸŽฏ Patterns of Distributed Systems: https://lnkd.in/gzz2cHef

๐ŸŽฏ Distributed System Patterns from AWS: https://lnkd.in/g8Ah8Q5s

๐—ข๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜ ๐—ข๐—ฟ๐—ถ๐—ฒ๐—ป๐˜๐—ฒ๐—ฑ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป ๐Ÿ”ฎ

✅ ๐—ฆ๐—ข๐—Ÿ๐—œ๐—— principles in pictures: https://lnkd.in/gs96iuDG

✅ ๐—–๐—ฟ๐—ฒ๐—ฎ๐˜๐—ถ๐—ผ๐—ป, ๐—ฆ๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฎ๐—น, ๐—•๐—ฒ๐—ต๐—ฎ๐˜ƒ๐—ถ๐—ผ๐˜‚๐—ฟ๐—ฎ๐—น Design Partterns: https://lnkd.in/gHV3HCWv


๐——๐—ฎ๐˜๐—ฎ๐—ฏ๐—ฎ๐˜€๐—ฒ๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—ฆ๐˜๐—ผ๐—ฟ๐—ฎ๐—ด๐—ฒ

๐Ÿ“— MongoDB Design Patterns: https://lnkd.in/gjJZ6BSW

๐Ÿ“™ DynamoDB Design Patterns : https://lnkd.in/g_YhsDee

๐Ÿ“” Redis Design Patterns: https://lnkd.in/ghJSSQTm

๐Ÿ“šS3 Design Patterns: https://lnkd.in/g4DPZVep


๐——๐—ฒ๐˜ƒ๐—ข๐—ฝ๐˜€ & ๐—–๐—ผ๐—ป๐˜๐—ฎ๐—ถ๐—ป๐—ฒ๐—ฟ๐˜€

๐Ÿ“ฆ Container Patterns: https://lnkd.in/g8YDMAGK

๐Ÿšข Kubernetes Production Patterns: https://lnkd.in/gD-pVibE


๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜†

๐Ÿ” Security Architecture Patterns: https://lnkd.in/gNMrgDNN

๐Ÿ”Azure-Security: https://lnkd.in/g7rjbeXv