View on GitHub

Cqrsmessagingtools

Download this project as a .zip file Download this project as a tar.gz file

CQRS Messaging Tools

Readme

These concepts wouldn't have happened without the Microsoft Patterns & Practices group's CQRS-Journey project and team. See below for instructions and warnings

NEW! MilGenerator command-line tool

The MilGenerator.exe utility will analyze a given solution file, outputting (optionally) a raw dump of messaging information to the console.

Basic Usage:

  1. the -s parameter is the full path to the VS 2010 .SLN file of the target application
  2. (recommended) pass the -d option to get a full dump of data. Otherwise, there isn't much to see :)
  3. help on options is available by passing -?, -h, or --help as a parameter

Tool Installation Instructions and Walkthrough

These tools are the product of a week's spent poking around a lot of unfamiliar territory, so be warned: Your Mileage May Vary!

  1. Clone or download project source
  2. Although the LINQPad scripts do not require it, the Roslyn CTP must be installed in order to install and run the tools for Visual Studio.
  3. Open the CqrsMessagingTools solution in VS. You should be able to Ctrl+F5 to build and run the tools. A new instance of VS will start up. It distinguishes itself from other instances by having (Roslyn) in the title bars. The tools are now loaded and listening.
  4. (optional, but best supported) Open the CQRS Journey Conference solution in the Roslyn instance of VS. Browse to the ReigstrationController.cs in the public conference registration website project and observe syntax highlighting in action!
  5. (use at your own risk!) Go to the View -> Other Windows -> Roslyn Syntax Visualizer. The tools window has two tabs: one for the syntax visualizer sample for reference and troubleshooting, and the other is the command listing.
  6. (use at your own risk!) If you don't see anything in the interface drop-down box, click the refresh button and try again. Make sure you have a solution loaded. Select an interface in your solution from the drop-down, and you'll see a list of classes implementing that interface. These are all of the possible commands that are known to this solution and projects.

Making the case: Here's the issue

What the tools can accomplish

Current components of the tools

Messaging Intermediate (or -ary) Language (MIL)

For a detailed walkthrough of MIL, click here

Goals:

MIL Example

1.  MakeSeatReservation? -> SeatsAvailabilityHandler 
2.     @SeatsAvailability:SeatsReserved! -> 
3.           -> RegistrationProcessRouter::RegistrationProcess
4.           *RegistrationProcess.State = AwaitingPayment
5.           :MarkSeatsReserved? -> 
6.           :ExpireRegistrationProcess? -> [Delay]
7.
8.   MarkSeatsReserved? -> OrderCommandHandler
9.     @Order::OrderPartiallyReserved! ->
10.     -> OrderViewModelGenerator