frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Portable C Compiler

https://en.wikipedia.org/wiki/Portable_C_Compiler
1•guerrilla•2m ago•0 comments

Show HN: Kokki – A "Dual-Core" System Prompt to Reduce LLM Hallucinations

1•Ginsabo•2m ago•0 comments

Software Engineering Transformation 2026

https://mfranc.com/blog/ai-2026/
1•michal-franc•3m ago•0 comments

Microsoft purges Win11 printer drivers, devices on borrowed time

https://www.tomshardware.com/peripherals/printers/microsoft-stops-distrubitng-legacy-v3-and-v4-pr...
2•rolph•4m ago•0 comments

Lunch with the FT: Tarek Mansour

https://www.ft.com/content/a4cebf4c-c26c-48bb-82c8-5701d8256282
1•hhs•7m ago•0 comments

Old Mexico and her lost provinces (1883)

https://www.gutenberg.org/cache/epub/77881/pg77881-images.html
1•petethomas•10m ago•0 comments

'AI' is a dick move, redux

https://www.baldurbjarnason.com/notes/2026/note-on-debating-llm-fans/
2•cratermoon•12m ago•0 comments

The source code was the moat. But not anymore

https://philipotoole.com/the-source-code-was-the-moat-no-longer/
1•otoolep•12m ago•0 comments

Does anyone else feel like their inbox has become their job?

1•cfata•12m ago•0 comments

An AI model that can read and diagnose a brain MRI in seconds

https://www.michiganmedicine.org/health-lab/ai-model-can-read-and-diagnose-brain-mri-seconds
1•hhs•15m ago•0 comments

Dev with 5 of experience switched to Rails, what should I be careful about?

1•vampiregrey•18m ago•0 comments

AlphaFace: High Fidelity and Real-Time Face Swapper Robust to Facial Pose

https://arxiv.org/abs/2601.16429
1•PaulHoule•19m ago•0 comments

Scientists discover “levitating” time crystals that you can hold in your hand

https://www.nyu.edu/about/news-publications/news/2026/february/scientists-discover--levitating--t...
1•hhs•21m ago•0 comments

Rammstein – Deutschland (C64 Cover, Real SID, 8-bit – 2019) [video]

https://www.youtube.com/watch?v=3VReIuv1GFo
1•erickhill•21m ago•0 comments

Tell HN: Yet Another Round of Zendesk Spam

1•Philpax•21m ago•0 comments

Postgres Message Queue (PGMQ)

https://github.com/pgmq/pgmq
1•Lwrless•25m ago•0 comments

Show HN: Django-rclone: Database and media backups for Django, powered by rclone

https://github.com/kjnez/django-rclone
1•cui•28m ago•1 comments

NY lawmakers proposed statewide data center moratorium

https://www.niagara-gazette.com/news/local_news/ny-lawmakers-proposed-statewide-data-center-morat...
1•geox•29m ago•0 comments

OpenClaw AI chatbots are running amok – these scientists are listening in

https://www.nature.com/articles/d41586-026-00370-w
2•EA-3167•29m ago•0 comments

Show HN: AI agent forgets user preferences every session. This fixes it

https://www.pref0.com/
6•fliellerjulian•32m ago•0 comments

Introduce the Vouch/Denouncement Contribution Model

https://github.com/ghostty-org/ghostty/pull/10559
2•DustinEchoes•34m ago•0 comments

Show HN: SSHcode – Always-On Claude Code/OpenCode over Tailscale and Hetzner

https://github.com/sultanvaliyev/sshcode
1•sultanvaliyev•34m ago•0 comments

Microsoft appointed a quality czar. He has no direct reports and no budget

https://jpcaparas.medium.com/microsoft-appointed-a-quality-czar-he-has-no-direct-reports-and-no-b...
2•RickJWagner•35m ago•0 comments

Multi-agent coordination on Claude Code: 8 production pain points and patterns

https://gist.github.com/sigalovskinick/6cc1cef061f76b7edd198e0ebc863397
1•nikolasi•36m ago•0 comments

Washington Post CEO Will Lewis Steps Down After Stormy Tenure

https://www.nytimes.com/2026/02/07/technology/washington-post-will-lewis.html
13•jbegley•37m ago•3 comments

DevXT – Building the Future with AI That Acts

https://devxt.com
2•superpecmuscles•37m ago•4 comments

A Minimal OpenClaw Built with the OpenCode SDK

https://github.com/CefBoud/MonClaw
1•cefboud•38m ago•0 comments

The silent death of Good Code

https://amit.prasad.me/blog/rip-good-code
3•amitprasad•38m ago•0 comments

The Internal Negotiation You Have When Your Heart Rate Gets Uncomfortable

https://www.vo2maxpro.com/blog/internal-negotiation-heart-rate
1•GoodluckH•40m ago•0 comments

Show HN: Glance – Fast CSV inspection for the terminal (SIMD-accelerated)

https://github.com/AveryClapp/glance
2•AveryClapp•41m ago•0 comments
Open in hackernews

CQRS and Event Sourcing for the Rest of Us

7•odinellefsen•8mo ago
Many teams love the idea of an immutable event log yet never adopt it because classic Event Sourcing demand aggregates, per-entity streams, and deep Domain-Driven Design. Each write often means replaying thousands of events to rebuild an aggregate in memory before a new event can be appended. That guarantees perfect consistency, but it also raises the cost of entry.

In Domain Driven Development + Event Sourcing you design an Aggregate, for example Order. For the Aggregate you design Domain Events like OrderCreated, OrderInfoUpdated, OrderArchived, and OrderCompleted. This means that every Event stored for the Order aggregate is one of those designed Domain Events. At this point you create instances of the Order aggregate (one instance for each actual product order in the system). And this looks like Order-001, Order-002, and so on. For each instance, for example, Order-001, you append Domain Events corresponding to what has happened to that order in that orders event stream.

You have to make sure that a user action is valid before you append a Domain Event to the event stream (which is your source-of-truth). Validating a user-action/Command is done by rehydrating/replaying every past event for the aggregate instance in question. For an aggregate called BankAccount with it’s aggregate instances, i.e. BankAccount-1234, there can be millions of Domain Events/events which can take a long time to rehydrate/replay every time a person does an action on their bank account where you have to validate the action, which is where a concept called snapshots comes in to make this faster.

The point of rehydrating the entire event history is because you want to recreate the current state your application or more specifically the current state of the entity/aggregate-instance, i.e. BankAccount or Order. You do this to be confident that you’re validating a new user action against the latest application state and not an old application state.

There is another approach to achieve validation (and achieve the core concept of event sourcing) that doesn’t require you to handle the complexity of rehydrating your entire event stream nor designing aggregates just to be able to validate a new user action. This alternative that I’m going to explain lowers the barrier to entry for CQRS + Event Sourcing because it removes DDD design complexity, and widens use-cases and accessibility significantly (some classic use-cases may not be a good fit for this approach). But at the same time it requires a different and strong infrastructure.

The approach I'm suggesting repurposes Domain Events to instead serve the function of being the stream of events what we call Event Types. Instead of having event streams for each individual order you’d group every created, updated, archived, or completed order in it’s respective Event Type. This means that for the provided example you’d have 4 event streams for the Order aggregate instead of having an event stream for every order in your system.

How I achieving Event Sourcing is by doing simple SQL business logic checks against real time Read Models. These contain the latest state of my application with a lag, in high-throughput critical situations, of single digit milliseconds, and in less critical smaller throughput situations, single digit seconds.

Both approaches use the current state of your application, either by calling the read model or by rehydrating all past events to recreate the current state. Rehydration really matters only when an out-of-sync Read Model is unacceptable. The production database is a downstream service in CQRS, so a slight delay always exists. In high-contention or ultra-low-latency domains such as real-money transfers you should replay a single account stream to avoid risk. If the Read Model is updated within a few milliseconds to a few seconds then validating against it is completely sufficient for the vast majority of applications.

Comments

revskill•8mo ago
THe confusion comes from "Aggregate", what's it ? Is it contextual ? How do you EXACTLY determine your aggregate without any brainstorming ?