As stated in previous posts, my next short-term goal is to get triggered abilities working. The card I am attempting to get working is Megrim, because it’s so simple. Also, it’s going to be the first enchantment Mox supports. In preparation for this, I have implemented a lightweight event framework. Potentially triggered abilities will listen for these events and if all the conditions are met, will push themselves in a list of actually triggered abilities. Those will get played normally (paying costs, modal decisions, pushing a spell on the stack, etc) whenever a player gets priority and the list will be flushed.
On another note, I discovered this paper by some Google employees from 2006 about their distributed database architecture. The way they created a custom solution adapted to their needs in scalability is very interesting. Their system can handle hundreds of Terabytes and runs on clusters of hundreds of machines. It looks daunting at first, but the paper is actually quite readable and easy to follow.