SShortSingh.
Back to feed

How to Design Stable Event Schemas in Event-Driven Architectures

0
·3 views

Part two of a DEV Community series on reliable event-driven systems focuses on designing event schemas that remain stable as systems evolve. Because event schemas are consumed by multiple independent services across different teams, every field effectively becomes a shared contract that is difficult to change later. The article warns against serializing internal domain models or JPA entities directly as events, as any internal refactoring can unintentionally break downstream consumers. Instead, developers are advised to define dedicated event models that represent clear business concepts, keeping the event contract decoupled from the producer's internal structure. This separation allows both the internal model and the event schema to evolve independently without causing compatibility issues.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

RxJS in Angular Series Concludes With Real-World Patterns and Production Best Practices

The final chapter of a 10-part RxJS in Angular series has been published on DEV Community, wrapping up topics covered across nine previous installments. The chapter focuses on applying RxJS concepts to real production scenarios, including state management using BehaviorSubject without relying on NgRx. It demonstrates how a centralized state service can decouple components, allowing filter and list components to communicate indirectly through shared observables. The guide also covers derived selectors, immutable state updates, and subscription cleanup using the takeUntil pattern. The series aims to equip Angular developers with practical patterns for building scalable, maintainable applications.

0
ProgrammingDEV Community ·

RAG vs Fine-Tuning: Why Confusing Knowledge with Behaviour Wastes GPU Budgets

A common and costly misconception in applied AI is that fine-tuning a model on internal documents teaches it those facts — but it does not. Fine-tuning adjusts model weights to learn patterns, tone, and output structure, not to store specific factual information. Retrieval-Augmented Generation (RAG), by contrast, leaves the model unchanged and instead injects relevant document chunks directly into the prompt at query time, keeping facts current and sources citable. Many teams spend weeks and significant GPU credits on fine-tuning for document Q&A before discovering RAG is better suited for that use case. The core distinction is that RAG addresses knowledge access while fine-tuning shapes model behaviour — and conflating the two leads to wasted resources and persistent hallucinations.

0
ProgrammingDEV Community ·

Two-line bug fix prevents Hermes AI agent from crashing on empty permission responses

A contributor named Aniruddha Adak submitted a bug fix to Hermes, an open-source AI agent that runs locally on user machines. The issue arose when the agent's permission system received no response — represented as None in Python — causing it to crash or behave unpredictably. The fix added a guard clause in the permissions module that defaults to denying the request whenever a None response is encountered. A corresponding unit test was also added to ensure the edge case remains covered against future code changes. The pull request, merged on April 21, 2026, is classified as a non-breaking bug fix that improves stability for sensitive AI agent operations.

0
ProgrammingDEV Community ·

Why React Developers Are Moving Away From useEffect in Modern Apps

A software developer argues that useEffect is widely overused in React applications, often applied to problems that simpler alternatives can solve more cleanly. Common misuses include deriving state, mirroring props, and filtering lists inside effects, all of which cause unnecessary re-renders and multiple sources of truth. For data fetching, modern libraries like TanStack Query and SWR now handle caching, retries, and loading states far more efficiently than manual effect-based fetching. The author recommends reserving useEffect for genuine external system interactions such as WebSockets, timers, and browser APIs. Splitting large components with many effects into smaller, focused hooks or components is also suggested as a practical way to reduce effect clutter.