# README
Zap Logger
Pkg Url : https://github.com/uber-go/zap
- It is very fast in comparision to other golang logging packages.
- It provides both structured logging and printf style logging.
- It includes reflection-free, zero-allocation JSON encoder.
- The base 'Logger' avoids serialization overhead and allocations wherever possible.
- The base 'Logger' only supports strongly-typed, structured logging. Advisable to use where every microsecond and every allocation matter.
- The 'SuggaredLogger' is a bit slower in comparision to base 'Logger' as it supports both structured and printf-style logging.
Prometehus
Pkg Url : https://github.com/prometheus/client_golang
- It is used as a monitoring tool.
- It can provide insight on hardware and software metrics like response latency, resource overload, app errors, request count, request duration, etc.
- Provides automated monitoring coupled with alerting.
- Edge over other monitoring tools like NewRelic, datadog, etc. with polling strategy to pull metrics rather than pushing [by apps/services] to monitoring tools.
- Human readable text based format for dsiplaying metrics.
Realize
Pkg Url : https://github.com/oxequa/realize
- This is used as a watcher like nodemon in nodejs.
- High performance Live Reload.
- Custom env variables for project.
- Manage multiple projects at the same time.
GRPC over Rest
Pkg Url : google.golang.org/grpc & github.com/hitesh-sureify/grpc-template/proto
- Protobuf instead of JSON : Protobuf serializes and deserializes structured data to communicate via binary.
- Built on HTTP 2 instead of HTTP 1.1 : supports bidirectional client-response communication.
- Code generation features are native to gRPC via its in-built protoc compiler versus use a third-party tool such as Swagger to auto-generate the code for API calls.
- gRPC is approx 7 times faster than REST when receiving data & almost 10 times faster than REST when sending data for a specific payload.
grpc-template
Pre-Requisite
- protoc must be installed
Step 1 : Define communication protocol
- Define message types and services in a .proto file. Example format : proto-file
- Compile the .proto file using a proto compiler protoc using command format : protoc --proto_path= --go_out=.
- After successfull complilation, a .pb.go file will get created.
Step 2 : Implementation of service interface
- In '.go' file where service needs to be implemented, import the auto-generated .pg.go file. Please see : service-implementation.
- Implement ServiceServer interface here.
Step 3 : Create a client and implement client interface
- In '.go' file where client needs to be implemented, import the auto-generated .pg.go file. Please see :
- Implement ServiceClient interface here.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author