# README
implementing distributed services with Golang
features:
- commit log
- networking with gRPC
- encrypting connection, mutual TLS authentication, ACL based authorization using Casbin and peer-to-peer grpc connection
- Observability using zap, ctxtags and OpenCensus for tracing. all in gRPC interceptors ⚭
- Server-to-Server Service Discovery
implementation:
- commit log:
- using store and index files approach for each log segment
- using go-mmap library to memory map index file for performance issues.
- tests for each segment and it's store and index files
- gRPC Services: v2.0.0
- using bidirectional streaming APIs on the client and server side to stream the content between them.
- using status, codes and errdetails packages to customize error messages between client and server.
- Dependency Inversion using Interfaces. (DIP principle). --> wanna know more?
- Security: v3.0.0
- security in distributed services can be broken down into three steps:
- encrypt data in-flight to protect against man-in-the-middle attacks
- authenticate to identify clients
- authorize to determine the permission of the identified clients
- the adoptiveness of mutual authentication in distributed services. interested? learn how cloudflare adopt it.
- building access control list-based authorization & differentiate between authentication and authorization in case of varying levels of access and permissions.
- using cloudflare's open source Certificate Authority (CA) called CSFFL for signing, verifying and bundling TLS certificates.
- v3.0.2(Authentication) has compeleted mutual communication between client and server + containing tests.
- Authorization: - using Casbin: Casbin supports enforcing authorization based on various control models—including ACLs. Plus Casbin is well adopted, tested, and extendable.
- v4.0.0 --> encrypting connection, mutual TLS authentication, ACL based authorization using casbin
- security in distributed services can be broken down into three steps:
- Observability: v4.0.0
- using zap for structured logs
- using request context tags to set value for request tags in context. it'll add a Tag object to the context that can be used by other middleware to add context about a request.
- using OpenCensus for tracing
- Service-to-Service Discovery:
- implementing Membership using Serf on each service instance to discover other service instances.
- implementing Replication to duplicate each server's data
- after implementing our replicator, membership, log and server components, we'll implement and import an Agent type to run and sync these components on each instance. just like Hachicorp Consul.
- updated on v6.0.0