Wednesday, July 3, 2013

Upcoming presentations

I'll be presenting at Central WI Developers Group this July 31st on Google App Engine. Please check it out if you're interested.

I will also be presenting the same topic at this years That Conference.


That Conference

Tuesday, May 22, 2012

I'll be speaking at "That Conference" this August on the impact of using your domain model for query purposes as well as how to use CQRS to separate your reads from  your writes. Check it out.


That Conference

Sunday, March 4, 2012

Fox Valley .Net User Group - Day of .Net

I'll be presenting at this years Day of .Net on April 28th. The topic is "CQRS and Event Sourcing : How it impacts the UI". I recently gave a presentation to this group on CQRS so I'm really excited to take the next step and discuss how developing a system using CQRS and Event Sourcing change the way you develop your UIs.

In this presentation we will dive into Event Sourcing. Event Sourcing is a pattern where we capture an applications state as a sequence of events. When applying this pattern alongside of CQRS you’ll notice that it has an interesting effect on how you code and design your UI. The Event Store becomes your applications source of state, while your separate query/read model is updated to reflect these changes. For this presentation we will cover the following:
1.)    Overview of CQRS
2.)    Create a demo application
  a.      Creating an event store
  b.      Model a simple domain
  c.      Writing events
  d.      Hydrating aggregate roots from the event store
  e.      Writing event handlers to react to state changes
  f.       Patterns for handling these changes in the UI

If you're interested please register at http://dayofdotnet.fvnug.org/

Tuesday, April 19, 2011

Domain Events, MSMQ, and long running processes

How often have you dealt with the following scenario?

You are tasked with designing a new feature on your website where users have the ability to import data. Typically this is accomplished by some sort of a interface that allows a user to upload a file. The file is then either put into some sort of storage mechanism such as a database or a file system. At this point you have to make a decision.

Do we?
A.) Process the data right away during the same request?
B.) Create some sort of process/application that runs on an application server to run at some sort of predetermined time interval?

Both options A and B above will work given the right scenario. Option A is a bit more risky due to the fact that depending upon the size of the import it could possibly timeout during the request. In my experiences, option B is typically the method that is used.

So assuming we choose option B. We end up having to create a new application, have it copied/installed on the application server and then finally have it scheduled to run throughout the day. Nothing wrong with this implementation, but it ends up becomming more cumbersome when we have to deal with it several times. Regardless if it is a file upload process or any other long running process, when the user issues a command that would normally timeout we end up having to make a decision on how to handle it.

When I read the article by Udi Dahan Domain Events - Salvation I realized there is a better way to handle the problem described above. The fact that the user uploaded a file for import is an important concept within our domain. Here is where domain events come into play. Domain events can be used for multiple situations. A common scenario is when you need to bridge bounded contexts, or to seperate out our concerns. For this post I'll be using domain events to publish a message to MSMQ for processing. This way we don't have to worry about any timeout issues. The file is uploaded and the domain publishes an event that the file has been uploaded. The other advantage to handling long running processes this way is that whenever you need to implement something similar, all you have to do is add another handler to your windows service that is monitoring the queue instead of creating a new application.

In my next post I'll put together some example code on how this is accomplished.

Sunday, April 17, 2011

Greetings

Lately I've felt compelled to start blogging my ideas, or at least the ideas of others that I feel are important. Hopefully the development community will find them helpful as well. I'm going to attempt to post something "real" in the next few days. I plan on covering how to use domain events to handle long running processes. The inspiration for my first blog post comes from an excellent article by Udi Dahan called Domain Events - Salvation. I suggest reading his post because it's well worth the read.