These are chat archives for DevrexLabs/OrigoDB

3rd
Nov 2016
Harry McIntyre
@mcintyre321
Nov 03 2016 12:41
Hi Robert, I was having a discussion about how my Sourcery project deals with Exceptions during command execution. I throw away the read model as it's in an unknown state, but this results in a need for a rebuild, but this gets dangerous if lots of writers start doing Exception throwing things...
whats the approach in Origo?
Robert Friberg
@rofr
Nov 03 2016 15:06
Hi, commands that throw CommandAbortedException (or descendant of) are considered to not have corrupted the model. For any other exception a rollback marker is written to the log and then the model is rebuilt to the state just prior of the bad command.
Harry McIntyre
@mcintyre321
Nov 03 2016 15:09
rebuilt from the most recent snapshop?
Robert Friberg
@rofr
Nov 03 2016 15:10
yes, most recent snaphot followed by a replay of commands
actually, I find that snapshots are usually not faster to read than just replaying the entire log
that of course depends on the model
Harry McIntyre
@mcintyre321
Nov 03 2016 15:14
Hmm, my system that I've got running (on Sourcery) takes a few mins to spin up (that's mainly time in the domain, too much LINQ!). Thankfully it doesn't throw unexpected exceptions anymore.
Whats the licence on Origo, it's a bit confusing (code is MIT but website says you need a prod licence)?
Robert Friberg
@rofr
Nov 03 2016 15:15
pretty simple actually, engine is open source, server and enterprise features are commercial
engine runs in-proc, server is standalone console app or windows service
Harry McIntyre
@mcintyre321
Nov 03 2016 15:16
Ah gotcha, server is a separate thing!
Robert Friberg
@rofr
Nov 03 2016 15:18
gotta go now, late for squash practice. but nice talking to you again, let's do some more catching up later!
Harry McIntyre
@mcintyre321
Nov 03 2016 15:18
re: write errors - I did spend some time wondering if I could make a proxy that would allow you to do software transactions against the single model (i.e. open a write session, causing any field getters/setter to be deferred into session variables). Then my brain ran out of steam. Ever considered that?
Laters!
Robert Friberg
@rofr
Nov 03 2016 15:19
Interesting question but I'll respond later!
Robert Friberg
@rofr
Nov 03 2016 18:53
I have done a lot of thinking around transactions but always conclude that the command is sufficient as the transactional unit
the command can be arbitrarily complex so no need for the framework to support grouping multiple commands into a single transaction when the user can simply define a composite command that achieves the same result