bamboo adventures
As I'm writing my application using bamboo.Prevalence I'm hitting a few stumbling blocks and it's not the prevalence system, it's me. After my first approach I quickly realized I'm not thinking in the right mental paradigm.
First off, my state system has to interact with the database for long term storage. WRONG! That's not deterministic. When the system restores the objects' state database values may change. Inside my state system it has to be a closed box. Even date/time values need to come from the prevalence system's clock. But how do we mesh the two? That leads to the next item.
I wanted to initialize data within the state system. WRONG AGAIN! It's a command driven system. If there's no command there's no log. No log, no persistence. When interacting with the prevalence system you should think in commands. So feed the system with data from the database through commands. Read from the system using queries.
All in all the system I'm building will be easier to develop and maintained (less lines of code) and better performing. I really like how it's unfolding.
So the lesson today: When developing a prevalence system build deterministic objects and think commands.

0 Comments:
Post a Comment
<< Home