Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7807035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:43:32+00:00 2026-06-02T02:43:32+00:00

We’re starting a new project where we want to implement CQRS + Event Sourcing

  • 0

We’re starting a new project where we want to implement CQRS + Event Sourcing architecture with MongoDB. We already have some experience with CQRS approach: in our previous project we took Fohjin framework as a starting point (well, we refactored it significantly). We used Oracle as a storage and also implemented a 2PC with TransactionScope in that case.

But for our new project we want to use MongoDB due to its scalability and performance. We definitely want to use it for read (report) part and cosidering it for an event store. The alternative here is to use SQL Server for event storage. So we need to make a choice. What I don’t like about hybrid solution is TransactionScope which is expensive and slow and necessity to support different Db types (Mongo and SQL).

We looked at NCQRS, but it seems that we do not want to depend highly on any framework, which dictates a lot of things that can be implemented differenly from our point of view. So now we’re thinking of something more lightweight like Jonathan Oliver’s Event Store. I like the concept of streams and commits and it also supports MongoDB. What I still do not understand, how it handles all that 2PC stuff (it is stated, that for NoSQL). In our case we need to dipatch events to several event handlers: some kind of denomalizer which updates the read database and task sheduler for a certain types of events. If something goes wrong with these handlers and we got an exeption, there is no way to roll back a commit for MongoDB. Is there any trick to handle this?

I appreciate any comments on how to make the right decision and what are pros and cons.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:43:34+00:00Added an answer on June 2, 2026 at 2:43 am

    The EventStore uses a Guid to uniquely identify a commit against the database to prevent the same stream of events from being persisted more than once. Typically this Guid is embedded directly in a message, uniquely identifying that particular message, and can be used as the CommitId when calling CommitChanges on the event stream. You could use a similar approach when handling events on the query side of your system.

    Some more info on 2PC and avoiding distributed transactions:

    • http://blog.jonathanoliver.com/2010/04/extending-nservicebus-avoiding-two-phase-commits
    • http://blog.jonathanoliver.com/2011/04/how-i-avoid-two-phase-commit
    • https://github.com/elliotritchie/NES/wiki/Transactions
    • http://bill-poole.blogspot.com/2008/06/idempotent-messages.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.