How to Manage Interfaces Gracefully in Event-Driven Architecture

This could be a large topic and there are many ways of handle interfaces gracefully, and here I’m going to use one simple example to explain this. Please see below code: I have interface defined in package domain: I have interface implementation embeded in package grpc: Package domain: This package defines an interface named StoreRepository. This interface specifies a set of methods that any concrete type (struct) must implement to satisfy the interface....

September 28, 2023 · 4 min · 675 words · David Lee

Event Streaming v.s Event Sourcing

Event streaming and event sourcing are two related but distinct concepts in the world of event-driven architecture. Event streaming is the process of continuously capturing and storing events as they occur in a system. These events can then be processed and analyzed in real-time or stored for later analysis. Event streaming is often used in systems that require real-time processing of large volumes of data, such as financial trading systems or social media platforms....

September 17, 2023 · 4 min · 677 words · David Lee
Featured

6 Tips on High Performance Go — Advanced Go Topics

The article aims to discuss 6 tips that could help diagnose and fix performance problems in your Go applications. Benchmarking: Writing effective benchmarks in Go is crucial for understanding the performance of your code. Benchmarks can be created by adding the suffix “_test” to a Go file and using the testing package’s Benchmark function. Here’s an example: In this example, we’re benchmarking the time it takes to calculate the 20th Fibonacci number....

April 26, 2023 · 6 min · 1166 words · David Lee
Featured

Hexagonal Architecture Deep Dive with PostgreSQL, Redis and Go Practices

Neal Ford & Mark Richards, in their book *Fundamentals of Software Architecture: An Engineering Approach, *came up with four dimensions that make up software architecture. They are often referred as the “Pillars of Software Architecture”: Common challenges in building software systems What is Hexagonal Architecture? Hexagonal Architecture, also known as Ports and Adapters Architecture or Clean Architecture, is a software architecture pattern that promotes loose coupling between the application core (business logic) and external components such as user interface, database, and external services....

April 19, 2023 · 20 min · 4121 words · David Lee