Event sourcing and GDPR have a reputation for not getting along. An immutable log that never forgets sounds like the opposite of the "right to be forgotten." Some event stores treat this tension as an afterthought, leaving teams to migrate entire databases or build complex workarounds just to erase the data of a single customer. That is not only inefficient, it can become a real business risk.
GenesisDB takes a different approach. GDPR compliance tools are built directly into the engine.
Most event stores were never designed with data erasure in mind. When a deletion request arrives, teams face ugly options:
These approaches can work, but they were never designed with production-grade compliance in mind. In most cases, they add more moving parts than they remove.
GenesisDB separates personal data from the event metadata at write time using the storeDataAsReference option. The event stream stays intact and immutable. The referenced data can be erased surgically, without touching a single other event.
When committing events that contain personal data, set storeDataAsReference to true. The engine stores the data payload separately, linked to the event by subject.
curl --location "http://localhost:8080/api/v1/commit" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer secret" \
--data '{
"events": [
{
"source": "io.genesisdb.app",
"subject": "/user/456",
"type": "io.genesisdb.app.user-created",
"data": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
}
}
],
"options": {
"storeDataAsReference": true
}
}'When a customer exercises their right to be forgotten, a single API call removes all referenced data for that subject. The event metadata and stream order remain untouched.
curl --location "http://localhost:8080/api/v1/erase" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer secret" \
--data '{
"subject": "/user/456"
}'That is it. No migration, no stream rewrite, no downtime. The personal data is gone while the audit trail stays intact.
Compliance should be a feature, not a project
GDPR requests should not trigger emergency engineering sprints. When erasure is a native database operation, compliance becomes routine instead of risky.
GDPR compliance should feel like a routine operation, not a migration project. GenesisDB was designed from the start with data erasure as a first-class feature, so your team can handle deletion requests with confidence instead of concern.