▸case-01 You are designing the backend architecture for an internal corporate admin utility that allows HR staff to edit employee desk phone extension notes. The utility processes about 15 updates per day, requires simple editing of a single table, and has a small engineering team with limited operational budget. Recommend an architecture strategy for this utility, explaining whether CQRS with separate read and write databases or standard CRUD on a single database should be used. | pass→pass | 13,561 | 11,689 | -14% | 1 | 1 | 0% | 2,166 | 1,853 | -14% | 0 | 0 | — |
▸case-02 A financial core-banking application processes real-time peer-to-peer balance transfers. Every balance check preceding a transfer must guarantee strict immediate consistency across all read queries with zero tolerable lag. Provide an architectural recommendation on whether to implement CQRS with asynchronous event-driven read projections for the core balance transfer validation path. | pass→pass | 20,416 | 16,883 | -17% | 1 | 1 | 0% | 3,115 | 2,948 | -5% | 0 | 0 | — |
▸case-03 An existing monolithic web application maintains a simple relational schema. The engineering team is unable to operate separate read and write datastores or maintain projection synchronization pipelines due to strict infrastructure and staffing constraints. Provide guidance on whether this team should adopt CQRS architecture. | fail→pass | 15,788 | 9,343 | -41% | 1 | 1 | 0% | 2,387 | 1,656 | -31% | 0 | 0 | — |
▸case-04 In a SaaS invoice management platform, a developer is implementing CreateInvoiceCommand. To save a network roundtrip, the developer wants the command handler to execute the write operation and return the full denormalized invoice view model (including customer summary and tax breakdowns) directly in the command response. Evaluate this design and specify the return contract rule for command handlers in a CQRS architecture. | pass→pass | 16,290 | 20,261 | +24% | 1 | 1 | 0% | 2,490 | 3,450 | +39% | 0 | 0 | — |
▸case-05 An e-commerce reporting dashboard needs to render complex sales analytics aggregated across millions of order items. Currently, queries execute multi-table JOINs and GROUP BY operations directly against the normalized transactional database tables used for order processing, causing lock contention during flash sales. Provide a CQRS architectural solution for this performance bottleneck. | pass→pass | 24,509 | 23,460 | -4% | 1 | 1 | 0% | 4,124 | 4,544 | +10% | 0 | 0 | — |
▸case-06 In a collaborative document editing tool, when a user submits a RenameDocumentCommand, the backend updates the write database and dispatches an event. However, immediate web browser redirects query the read model before the asynchronous projection finishes updating, displaying the old document title. The developer proposes adding a Thread.sleep(5000) on the server before completing the HTTP request. Provide a client/API strategy for handling this eventual consistency issue. | pass→pass | 17,245 | 18,213 | +6% | 1 | 1 | 0% | 2,802 | 3,333 | +19% | 0 | 0 | — |
▸case-07 In an online reservation system, a developer plans to update the read model by having the write repository directly execute SQL UPDATE statements on the read model's database tables inside the write transaction block. Evaluate this approach and explain how CQRS models should synchronize read projections. | pass→pass | 19,277 | 20,602 | +7% | 1 | 1 | 0% | 2,982 | 3,511 | +18% | 0 | 0 | — |
▸case-08 An application service class CustomerService contains a method ManageCustomer(CustomerFilter query, CustomerUpdateData data, bool isWrite). When isWrite is false, it fetches customer records; when true, it updates customer records. Redesign this class pattern according to CQRS principles. | pass→pass | 14,671 | 15,506 | +6% | 1 | 1 | 0% | 2,693 | 3,253 | +21% | 0 | 0 | — |
▸case-09 In a fintech transaction processing API, a team is debating where to place validation logic. Developer A wants to put account credit limit checks and overdraft history calculations inside the API payload validator (before command creation). Developer B wants to put structural JSON schema checks inside the command handler. Provide the correct responsibility boundaries for payload validation versus domain validation in CQRS. | pass→pass | 15,224 | 16,986 | +12% | 1 | 1 | 0% | 2,563 | 3,158 | +23% | 0 | 0 | — |
▸case-10 A digital retail application requires complex full-text product search with dynamic filtering facets across thousands of attributes. The write model stores product data in a normalized relational database schema. The team is considering running SQL LIKE queries on JSON columns in the write tables for search queries. Propose a CQRS read-model architecture for this feature. | pass→pass | 29,886 | 22,157 | -26% | 1 | 1 | 0% | 5,173 | 4,097 | -21% | 0 | 0 | — |
▸case-11 A bug in a read projection consumer service resulted in corrupted rows across the read database for OrderSummaryView. A developer suggests writing raw SQL UPDATE queries directly against the read database to patch the corrupted data rows manually. Provide the recommended CQRS recovery procedure for corrupted read projections. | pass→pass | 14,637 | 14,476 | -1% | 1 | 1 | 0% | 2,398 | 2,551 | +6% | 0 | 0 | — |
▸case-12 A media streaming platform experiences a 200:1 read-to-write traffic ratio. The architecture currently scales the unified monolithic cluster (combining read and write operations) identically across all nodes. Explain how scaling should be configured when adopting CQRS for this workload. | pass→pass | 15,652 | 18,304 | +17% | 1 | 1 | 0% | 2,449 | 3,041 | +24% | 0 | 0 | — |
▸case-13 An account management UI currently sends a generic payload PUT /users/{id} containing 30 optional fields whenever a user updates their email address, changes notification preferences, or deactivates their account. Provide guidance on how to define commands for these operations in CQRS. | pass→pass | 15,669 | 18,564 | +18% | 1 | 1 | 0% | 2,674 | 3,456 | +29% | 0 | 0 | — |
▸case-14 Network instability causes duplicate ProcessPaymentCommand messages to arrive at the command handler. The developer proposes allowing the command handler to execute every incoming message without checking for duplicates. Provide the required command handling safeguard to prevent duplicate payment processing. | pass→pass | 11,877 | 13,999 | +18% | 1 | 1 | 0% | 1,993 | 2,825 | +42% | 0 | 0 | — |
▸case-15 A mobile app user profile screen requires displaying user info, active subscriptions, payment methods, and recent activity log simultaneously. The developer suggests making 4 separate REST API calls from the mobile device to individual write services and assembling the response on the phone. Propose a CQRS read side solution for this UI screen. | pass→pass | 16,899 | 15,092 | -11% | 1 | 1 | 0% | 2,871 | 2,911 | +1% | 0 | 0 | — |
▸case-16 In an order fulfillment system, a command handler updates the PostgreSQL order record and then immediately calls an external HTTP API to update a search engine index. If the HTTP call fails due to a network outage, the order transaction commits while the search index becomes out of sync. Recommend a pattern to ensure atomic consistency between write model commits and projection event publishing. | pass→pass | 16,180 | 14,208 | -12% | 1 | 1 | 0% | 2,669 | 2,604 | -2% | 0 | 0 | — |
▸case-17 The development team needs to update the schema of SubmitOrderCommand by renaming fields and making previously required parameters optional. Provide the strategy for managing command and event schema evolution without breaking existing clients or message logs. | pass→pass | 16,605 | 15,968 | -4% | 1 | 1 | 0% | 2,832 | 2,868 | +1% | 0 | 0 | — |
▸case-18 Two customer service agents attempt to update the same support ticket status simultaneously. Developer A suggests ignoring concurrent modifications and letting the last write win without tracking versions. Recommend the concurrency strategy for write models in CQRS. | pass→pass | 14,188 | 14,071 | -1% | 1 | 1 | 0% | 2,360 | 2,621 | +11% | 0 | 0 | — |
▸case-19 A logistics management dashboard runs an end-of-day batch query that calculates average delivery times across 500,000 shipments, causing severe database locks on the live shipment write tables for over 30 minutes every evening. Provide a CQRS projection design to resolve this issue. | pass→pass | 16,426 | 21,735 | +32% | 1 | 1 | 0% | 2,935 | 4,387 | +49% | 0 | 0 | — |
▸case-20 A developer implements GetProductCatalogQueryHandler and includes logic that decrements the product view counter in the transactional database every time a product detail query is executed. Evaluate this implementation against CQRS principles. | pass→pass | 12,985 | 14,474 | +11% | 1 | 1 | 0% | 2,087 | 2,461 | +18% | 0 | 0 | — |
▸case-21 An administrator needs to perform a bulk price adjustment for 10,000 products. A developer proposes creating an unvalidated raw SQL batch update script executed directly against both write and read databases simultaneously in a single raw query. Recommend a CQRS-compliant architecture for handling bulk operations. | pass→pass | 17,654 | 19,606 | +11% | 1 | 1 | 0% | 3,101 | 3,658 | +18% | 0 | 0 | — |
▸case-22 When an event consumer fails to update a read model projection due to a transient database deadlock, the developer proposes catching the exception, discarding the event, and logging a line to console. Recommend the proper error handling and recovery strategy for failed projection updates in CQRS. | pass→pass | 15,772 | 14,259 | -10% | 1 | 1 | 0% | 2,593 | 2,734 | +5% | 0 | 0 | — |