Generally, I would suggest a single store. What would be your reason for
separating the events?
The only reason I can think of to separate stores is to be able to
multi-thread or multi-process the domain and avoid having to coordinate
calls to the event storage.
Lateron, it is kind of trivial to split one store into many based on the
event source ids, so you can always separate if the need should arise.
If you have multiple BCs/ABCs which employ event sourcing, I would
consider to use separate stores for them, to avoid any accidental or
convenient coupling.
Cheers
Phil
Also from wikipedia (who is luckily up today)...
Random UUID probability of duplicates
Randomly generated UUIDs like those generated by the java.util.UUID
class have 122 random bits. There are 128 bits altogether with 4 bits
being used for the version ('Randomly generated UUID'), and 2 bits for
the variant ('Leach-Salz'). With random UUIDs, the chance of two
having the same value can be calculated using probability theory
(Birthday paradox). Using the approximation
these are the probabilities of an accidental clash after calculating n
UUIDs, with x=2122:
n probability
68,719,476,736 = 236 0.0000000000000004 (4 × 10-16)
2,199,023,255,552 = 241 0.0000000000004 (4 × 10-13)
70,368,744,177,664 = 246 0.0000000004 (4 × 10-10)
To put these numbers into perspective, one's annual risk of being hit
by a meteorite is estimated to be one chance in 17 billion,[31] that
means the probability is about 0.00000000006 (6 × 10-11), equivalent
to the odds of creating a few tens of trillions of UUIDs in a year and
having one duplicate. In other words, only after generating 1 billion
UUIDs every second for the next 100 years, the probability of creating
just one duplicate would be about 50%. The probability of one
duplicate would be about 50% if every person on earth owns 600 million
UUIDs.
However, these probabilities only hold when the UUIDs are generated
using sufficient entropy. Otherwise the probability of duplicates may
be significantly higher, since the statistical dispersion may be
lower.
--
Le doute n'est pas une condition agréable, mais la certitude est absurde.
public ActiveAccount CreateNewAccount(string accountName){IsClientCreated();var activeAccount = ActiveAccount.CreateNew(Id, accountName); // Calls constructor belowApply(new AccountToClientAssignedEvent(activeAccount.Id)); // used for keeping a list of accounts in clientreturn activeAccount;}private ActiveAccount(Guid clientId, string accountName) : this(){var accountNumber = SystemDateTime.Now().Ticks.ToString();Apply(new AccountOpenedEvent(Guid.NewGuid(), clientId, accountName, accountNumber));}Is this a problem, to update two ARs in one command?I'm thinking it is easier to follow than the saga solution and the fail scenario is simpler when having everything in one transaction.What are the cons?Regards Sop Killen