{"id":2385,"date":"2026-11-18T22:14:04","date_gmt":"2026-11-18T21:14:04","guid":{"rendered":"https:\/\/denbeke.be\/blog\/?p=2385"},"modified":"2026-11-19T08:54:47","modified_gmt":"2026-11-19T07:54:47","slug":"introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library","status":"publish","type":"post","link":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/","title":{"rendered":"Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Today I&#8217;m releasing&nbsp;<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/github.com\/DenBeke\/collie\">Collie<\/a>, my Go implementation of Dynamic Consistency Boundaries (DCB) event sourcing, with a Postgres event store. It started as a late-night experiment in February. Nine months later it runs a project with tens of millions of events, and I think it&#8217;s ready for other people to try.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In my day life at Eurostar, I built the core event store of my current project as a hybrid: part classic aggregates, part DCB. (Collie has nothing to do with that work. It&#8217;s a personal side project, built in my own time, but that experience is what inspired it). The more I learned about DCB, the more it felt like it was solving problems instead of creating new ones. Its flexibility lets you simplify complex projects in ways that regular event sourcing always struggled with.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To me, it combines the best of both worlds: the freedom of a CRUD application, with the history and guarantees of event sourcing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why I built my own<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When a colleague, Jef, introduced me to DCB, I was hooked pretty quickly. We talked about it endlessly and kept sending each other ideas. At some point I wanted to stop talking and put those ideas into practice.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As an experienced Go developer, Go felt like the natural choice. I love clean Go applications, and the DCB interface is clean too: read, decide, append. For storage I wanted a database everyone already knows, one that every cloud provider offers as a managed service. That&#8217;s Postgres, which makes Collie usable pretty much anywhere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">More importantly, I didn&#8217;t want to vibe code it. I went old school: I designed and tested the interfaces myself. I did use Claude to quickly visualize the ideas I had in my head, but Collie is handcrafted. It&#8217;s not one of those projects where nobody has read the code the AI wrote&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And honestly, I enjoyed it. That kind of programming doesn&#8217;t happen that often for me anymore.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Collie is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Classic event sourcing fixes your consistency boundaries at design time: one aggregate, one stream, and a business rule that spans two aggregates needs a saga. DCB gets rid of aggregates and streams. There is one global log, every event carries tags, and every decision names the events it depends on with a query. An append is refused only if a matching event arrived after the decision read the log. The consistency boundary is exactly what the decision read, nothing more.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie-1024x548.png\" alt=\"Collie DCB event sourcing mascotte\" class=\"wp-image-2386\" style=\"width:331px;height:auto\" srcset=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie-1024x548.png 1024w, https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie-300x161.png 300w, https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie-768x411.png 768w, https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie.png 1027w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s also where the name comes from. Instead of fixed fences that keep the sheep together, a border collie decides on the spot which sheep to round up. The mascot completes the picture: a collie herding sheep through a gate, while a gopher ticks them off on a clipboard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wrote about the &#8216;<em>why&#8217;<\/em>&nbsp;in more depth in&nbsp;<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/denbeke.be\/blog\/software\/dynamic-consistency-boundaries-dcb-for-event-sourcing\/\">Dynamic Consistency Boundaries (DCB) for Event Sourcing<\/a>. In code, a decision is three steps. Here&#8217;s a username that can only be claimed once:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"go\">func signUp(ctx context.Context, store collie.Store, username string) error {\n\t\/\/ 1. Read the events this decision depends on.\n\ttaken := usernameTaken(username)\n\tcondition, err := collie.BuildDecisionModel(ctx, store, &amp;taken)\n\tif err != nil {\n\t\treturn err\n\t}\n\t\/\/ 2. Decide.\n\tif taken.State {\n\t\treturn fmt.Errorf(\"username %q is already taken\", username)\n\t}\n\t\/\/ 3. Append, on the condition that nothing changed since step 1.\n\tevent, err := collie.NewEventFrom(\"UserSignedUp\", UserSignedUp{Username: username})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn store.Append(ctx, &#91;]collie.Event{event}, condition)\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If two requests claim&nbsp;<code>alice<\/code>&nbsp;at the same time, both pass step 2, but only one append succeeds. The other gets&nbsp;<code>ErrAppendConditionViolated<\/code>, and when it retries, it sees the winner&#8217;s event and is refused in step 2. No locks on aggregates, no sagas.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">From February to now<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The first version was easy to write. It was also nowhere near enough. It used a global lock, which is of course not exactly fast, and the database wasn&#8217;t optimized at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So I went down the rabbit hole. Trying to replace the global lock with locks on the consistency boundaries, I ended up deep in the world of auto-increment IDs and the moments transactions actually commit. In the end I settled on a staging approach, which I explain (with numbers) in&nbsp;<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/denbeke.be\/blog\/software\/can-dcb-event-sourcing-be-fast-and-flexible-a-postgres-benchmark\/\">Can DCB event sourcing be fast and flexible? A Postgres benchmark<\/a>. Getting the right indexes in place did the rest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It was never a project I worked on every day. It was more of a slow burner: for days I wouldn&#8217;t touch it, but it was always somewhere in the back of my mind.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then I needed a solid backend for a new project,&nbsp;<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/belgiancompanies.be\/\">belgiancompanies.be<\/a>, and using my own Go implementation was the obvious choice. It now holds tens of millions of events, and that number grows every day. Running it myself showed me what to optimize next, and slowly turned an experiment into something other people could use. That&#8217;s why I&#8217;m open sourcing it now.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Along the way I also wanted the things a real application needs to work out of the box, like attachments and encryption. These days, handling personal data properly shouldn&#8217;t be an afterthought. So those are also part of the first version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s in this release<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This release covers the core DCB paradigm, with two store implementations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>In-memory<\/strong>, for tests. It enforces the same rules as Postgres, so your tests catch mistakes before production does.<\/li>\n\n\n\n<li><strong>Postgres<\/strong>, for the real world. Collie is a library that uses Postgres as its event store directly. And yes, multiple instances can append at the same time while staying consistent. I checked \ud83d\ude09<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In the future, when my own projects need it, I want to add a third option: a client-server event store that several applications can easily share.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Creating events is meant to feel natural. You tag an event with struct tags, and the same goes for encryption and attachments:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"go\">type UserRegistered struct {\n\tUserID string `json:\"userId\" dcb:\"tag:user\"`\n\tName   string `json:\"name\"   dcb-encrypt:\"tag:user\"` \/\/ encrypted with this user's key\n}\ntype DocumentUploaded struct {\n\tDocumentID string `json:\"documentId\" dcb:\"tag:document\"`\n\tFileName   string `json:\"fileName\"`\n\tContent    &#91;]byte `json:\"content\"    dcb-attachment:\"blob\"` \/\/ stored in a blob store\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Encryption uses a key per data subject. Deleting that key makes their data permanently unreadable, so you can forget a person without rewriting history (crypto-shredding, for GDPR). Attachments move large fields to a blob store and put them back when you read the event.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On top of the read, decide, append loop I also built a command framework. It handles retries on conflicts, authorization, and work that has to happen outside the loop, such as calling an external service. Working with the store then comes down to implementing a small interface per command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"go\">err := command.Execute(ctx, store, &amp;SignUp{Username: \"alice\"}, command.WithMaxAttempts(3))<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The rest, including projections for the read side, is in the&nbsp;<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/github.com\/DenBeke\/collie\">README<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Is this thing production ready?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I run it in production on a side project, but that doesn&#8217;t automatically make it production ready. I&#8217;m quite confident it works well, but let&#8217;s talk again in a year \ud83d\ude09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the meantime I&#8217;ll keep improving it. That&#8217;s also why I don&#8217;t promise a stable interface yet: I&#8217;m pretty sure I&#8217;ll introduce breaking changes whenever I find a way to make things better. The optional packages (reactor, envelope, encryption and attachments) are younger than the core, so they&#8217;re the most likely to change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Thanks<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you to everyone who challenged my ideas and reviewed my code. Special thanks to <a href=\"https:\/\/www.linkedin.com\/in\/jef-wauters-a9783a115\/\" data-type=\"link\" data-id=\"https:\/\/www.linkedin.com\/in\/jef-wauters-a9783a115\/\" target=\"_blank\" rel=\"noreferrer noopener\">Jef Wauters<\/a>, for all the long conversations about DCB and all the knowledge sharing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I hope some of you find Collie useful and give it a try:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>go get github.com\/DenBeke\/collie<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m looking forward to your feedback, issues and ideas on&nbsp;<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/github.com\/DenBeke\/collie\">GitHub<\/a>. Happy herding!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I&#8217;m releasing&nbsp;Collie, my Go implementation of Dynamic Consistency Boundaries (DCB) event sourcing, with a Postgres event store. It started as a late-night experiment in February. Nine months later it runs a project with tens of millions of events, and I think it&#8217;s ready for other people to try. In my day life at Eurostar, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[235],"tags":[294,291,231,232,292],"class_list":["post-2385","post","type-post","status-publish","format-standard","hentry","category-programming","tag-dcb","tag-event-sourcing","tag-go","tag-golang","tag-postgres","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library &#8211; DenBeke<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library &#8211; DenBeke\" \/>\n<meta property=\"og:description\" content=\"Today I&#8217;m releasing&nbsp;Collie, my Go implementation of Dynamic Consistency Boundaries (DCB) event sourcing, with a Postgres event store. It started as a late-night experiment in February. Nine months later it runs a project with tens of millions of events, and I think it&#8217;s ready for other people to try. In my day life at Eurostar, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/\" \/>\n<meta property=\"og:site_name\" content=\"DenBeke\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T21:14:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-19T07:54:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1027\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mathias Beke\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MthsBk\" \/>\n<meta name=\"twitter:site\" content=\"@MthsBk\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mathias Beke\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/\"},\"author\":{\"name\":\"Mathias Beke\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#\\\/schema\\\/person\\\/386878f712fe3fe22227216f087772dc\"},\"headline\":\"Introducing Collie: nine months of DCB event sourcing in Go\\\/Postgres, rounded up into a library\",\"datePublished\":\"2026-11-18T21:14:04+00:00\",\"dateModified\":\"2026-11-19T07:54:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/\"},\"wordCount\":1185,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/collie-1024x548.png\",\"keywords\":[\"dcb\",\"event sourcing\",\"go\",\"golang\",\"postgres\"],\"articleSection\":[\"programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/\",\"url\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/\",\"name\":\"Introducing Collie: nine months of DCB event sourcing in Go\\\/Postgres, rounded up into a library &#8211; DenBeke\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/collie-1024x548.png\",\"datePublished\":\"2026-11-18T21:14:04+00:00\",\"dateModified\":\"2026-11-19T07:54:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#\\\/schema\\\/person\\\/386878f712fe3fe22227216f087772dc\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#primaryimage\",\"url\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/collie.png\",\"contentUrl\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/collie.png\",\"width\":1027,\"height\":550},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/programming\\\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing Collie: nine months of DCB event sourcing in Go\\\/Postgres, rounded up into a library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/\",\"name\":\"DenBeke\",\"description\":\"Mathias Beke\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/denbeke.be\\\/blog\\\/#\\\/schema\\\/person\\\/386878f712fe3fe22227216f087772dc\",\"name\":\"Mathias Beke\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g\",\"caption\":\"Mathias Beke\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library &#8211; DenBeke","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/","og_locale":"en_US","og_type":"article","og_title":"Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library &#8211; DenBeke","og_description":"Today I&#8217;m releasing&nbsp;Collie, my Go implementation of Dynamic Consistency Boundaries (DCB) event sourcing, with a Postgres event store. It started as a late-night experiment in February. Nine months later it runs a project with tens of millions of events, and I think it&#8217;s ready for other people to try. In my day life at Eurostar, [&hellip;]","og_url":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/","og_site_name":"DenBeke","article_published_time":"2026-11-18T21:14:04+00:00","article_modified_time":"2026-11-19T07:54:47+00:00","og_image":[{"width":1027,"height":550,"url":"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie.png","type":"image\/png"}],"author":"Mathias Beke","twitter_card":"summary_large_image","twitter_creator":"@MthsBk","twitter_site":"@MthsBk","twitter_misc":{"Written by":"Mathias Beke","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#article","isPartOf":{"@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/"},"author":{"name":"Mathias Beke","@id":"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc"},"headline":"Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library","datePublished":"2026-11-18T21:14:04+00:00","dateModified":"2026-11-19T07:54:47+00:00","mainEntityOfPage":{"@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/"},"wordCount":1185,"commentCount":0,"image":{"@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#primaryimage"},"thumbnailUrl":"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie-1024x548.png","keywords":["dcb","event sourcing","go","golang","postgres"],"articleSection":["programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/","url":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/","name":"Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library &#8211; DenBeke","isPartOf":{"@id":"https:\/\/denbeke.be\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#primaryimage"},"image":{"@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#primaryimage"},"thumbnailUrl":"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie-1024x548.png","datePublished":"2026-11-18T21:14:04+00:00","dateModified":"2026-11-19T07:54:47+00:00","author":{"@id":"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc"},"breadcrumb":{"@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#primaryimage","url":"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie.png","contentUrl":"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2026\/11\/collie.png","width":1027,"height":550},{"@type":"BreadcrumbList","@id":"https:\/\/denbeke.be\/blog\/programming\/introducing-collie-nine-months-of-dcb-event-sourcing-in-go-postgres-rounded-up-into-a-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/denbeke.be\/blog\/"},{"@type":"ListItem","position":2,"name":"Introducing Collie: nine months of DCB event sourcing in Go\/Postgres, rounded up into a library"}]},{"@type":"WebSite","@id":"https:\/\/denbeke.be\/blog\/#website","url":"https:\/\/denbeke.be\/blog\/","name":"DenBeke","description":"Mathias Beke","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/denbeke.be\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc","name":"Mathias Beke","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8889cf00cef9570a8f82e7510ed97205ccb7a1a0d2c7e0968a07e1885386f198?s=96&d=mm&r=g","caption":"Mathias Beke"}}]}},"_links":{"self":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/2385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/comments?post=2385"}],"version-history":[{"count":5,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/2385\/revisions"}],"predecessor-version":[{"id":2392,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/2385\/revisions\/2392"}],"wp:attachment":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/media?parent=2385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/categories?post=2385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/tags?post=2385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}