Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

Build a Library App with Event Sourcing, Sekiban DCB, and AI

A practical guide to extending a Sekiban DCB template with AI for book registration, borrowing, and returns, with attention to event-sourcing rules and concurrent operations.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can use a Sekiban DCB project template and an AI coding assistant to build a small library-management app for registering books, borrowing them, and recording returns. The example uses PostgreSQL and a Blazor UI, and its author reports checking behavior under concurrent operations. It is a practical exploration of how far AI can help with feature development and verification—not a timed benchmark or a guarantee that AI makes every project faster.

What the example builds

The library application covers three basic actions: register a book, borrow it, and return it. It stores data in PostgreSQL and presents a basic Blazor interface. The author also describes checking whether concurrent operations preserve consistency. The linked DEV Community article includes a link to the BookManagement sample repository.

As an Amazon Associate I earn from qualifying purchases.

The useful question is not whether AI can generate a whole production-ready system in one prompt. It is how far a developer can take feature development and verification with AI when the project already has clear conventions, working examples, and explicit business rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start from the right Sekiban template

The article’s author reports using the .NET 10 SDK and Linux containers in Docker Desktop, then creating a project with the Decider template:

#1 Best Overall
dotnet new install Sekiban.Dcb.Templates
dotnet new sekiban-dcb-decider -n BookManagement

The generated example includes Student, ClassRoom, and Enrollment implementations. Those are useful as patterns to inspect before asking an AI assistant to add a different domain.

There is an important distinction between the article’s command and the repository’s documented quick start. The current Sekiban README shows the template installation command followed by dotnet new sekiban-dcb-orleans -n YourProjectName, a different template path. Check the Sekiban repository for current instructions and dependencies before reproducing either route; do not assume the Decider and Orleans templates are interchangeable.

Understand DCB before delegating domain logic

Dynamic Consistency Boundaries (DCB) is an event-sourcing model in which commands make decisions from events selected by a query. Instead of relying only on fixed aggregate streams, a command can define a consistency scope through the events and tags relevant to its decision. The DCB specification describes an event store that can read sequenced events matching a query and append events with an optional append condition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Queries, tags, and conditional appends

Queries can filter events by event type, tags, or both. A tag carries domain-specific information and can identify an entity; the specification gives product:p123 as an example. The event store must persist one or more events atomically and reject an append when its condition matches existing events.

In the DCB consistency model, a client makes a decision using a query-built in-memory model and the last event position it has observed. Before accepting the append, the store checks whether new events matching that query appeared in the meantime. If relevant events intervened, the command can be rejected and retried or otherwise handled by the application. The DCB explanatory site describes this as optimistic consistency.

This lets unrelated writes proceed without forcing every operation into a rigid, single-entity stream, while still allowing a query to represent an invariant that crosses entities. For a library, for example, a borrowing rule might depend on whether the relevant book is already checked out. The exact query and rule must be designed for the application; DCB does not decide the business policy for you.

That model is an architectural description, not proof that every event-store provider has identical operational behavior. Applications must account for the guarantees of the provider they actually deploy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the generated example as an AI guide

The article’s practical workflow is to read the template implementation end to end before requesting new features. Do not treat the generated project as a collection of isolated files: follow how a domain action travels through the UI, API, command, Decider, event, state, and query.

  1. Trace an existing feature. Follow one Student, ClassRoom, or Enrollment operation from its UI entry point through its API and command to the Decider, emitted event, resulting state, and query.
  2. Describe the new domain explicitly. State what registering a book means, which conditions allow borrowing, what a return changes, and what the application should do when a rule is violated.
  3. Make consistency requirements concrete. Identify which concurrent actions must not both succeed, and which unrelated actions may proceed independently. Ask the assistant to connect each invariant to the command’s decision query and the expected conflict behavior.
  4. Ask for changes that follow repository conventions. Point the assistant to the matching existing implementations and ask it to use their structure and naming patterns rather than inventing a parallel architecture.
  5. Request verification scenarios. Include ordinary registration, borrowing, and return flows, plus overlapping operations that test the invariants. Review the generated code and test outcomes yourself.

The author reports using Codex with GPT-6 Astra and adapting features from existing examples. They say that Sekiban’s conflict detection and persistence let them focus on business rules. That is the author’s qualitative experience, not a measured productivity result or a substitute for reviewing domain logic, error handling, and tests.

Verify concurrent behavior, not just the happy path

A library interface can appear correct when actions happen one at a time while failing when requests overlap. Verification should target the rule that matters, not merely whether the UI displays a success message.

  • Define the invariant. Write down what must remain true—for example, whether the same book may be borrowed by two patrons at once. The correct rule depends on the application’s requirements.
  • Construct competing operations. Run commands whose decision queries overlap in the events relevant to that invariant, rather than testing only unrelated commands.
  • Check the persistence outcome. Confirm that the conflicting append is rejected or handled according to the application’s retry and error policy, and that the resulting event history reflects the intended rule.
  • Test independent work too. Operations outside the consistency scope should not be treated as conflicts merely because they happen at the same time; confirm behavior against the chosen provider and query design.

The source article says the author checked concurrent-operation consistency, but it does not provide a quantified benchmark or establish results for every provider, deployment, or workload. Treat the sample as a starting point for your own tests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose storage by its guarantees and deployment fit

The example uses PostgreSQL. Sekiban’s repository also lists Cosmos DB on Azure and DynamoDB on AWS as event-store choices, and maps Azure Blob Storage and Amazon S3 to snapshots. It documents cloud components for Orleans clustering and streams as well. These are project-listed options, not evidence that every provider is interchangeable for every workload.

Before choosing a provider, review its consistency behavior—especially if the application depends on atomic visibility of events and tags. The Sekiban repository specifically directs users to its storage consistency contract when considering Cosmos DB for workloads with that requirement. Compare options against cloud fit, existing operational expertise, query and indexing needs, deployment and clustering requirements, and provider-specific recovery behavior. The cited project materials do not establish a workload benchmark or cost winner.

Check Sekiban’s current project status

The Sekiban repository recommends DCB for new projects and describes Sekiban.Pure and Sekiban.Core as being in maintenance mode. These are project-maintained status statements and may change; check the current repository README before committing to a new application. The DCB implementations directory lists Sekiban.Dcb among C# implementations.

What “fast” means here

The article’s title uses “fast,” but its report is an experience rather than a measured claim. It gives no development-time comparison, productivity benchmark, or success-rate figure. The defensible takeaway is that existing template examples gave the author patterns to adapt with AI; how quickly another team can do the same will depend on its domain, implementation choices, tests, and review process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.