Getting Started

Brighter is intended to be a library and not a framework, so you can use it with ASP.NET MVC or WebAPI, Nancy, OpenRasta, Topshelf etc. You use it to decouple your Invoker and Receiver via a Command without coupling the Invoker to a concrete Command. In addition, you can support orthogonal requirements such as Retry, Timeout, Circuit Breaker and Logging without polluting your domain code. Finally, we let you defer work that does not need synchronous execution to a task queue, using a Broker architectural style so that this is seamless to the invoker.

Requirements

Brighter depends on .NET 4.5.

It should be possible to support earlier versions once the build process for the project improves from its mostly manual proposition today. It's on the roadmap.

Brighter uses a number of NuGet packages

The core package Brighter.CommandProcessor depends on:

The major pain point here is the Json.NET dependency as it is likely other projects you depend on will also pull in this project. If you have conflicts, try using Assembly Redirection to resolve. It is less likely that you will have conflicts with Polly, but again use the strategy above. In a worst case scenario, fork the code, rebuild with the required version, fix any issues, and deploy as a lib not a package.

We support LibLog for logging by Brighter.* projects with the namespace Brighter.commandprocessor.Logging and the interface ILog.

The core package Brighter.ServiceActivator depends on:

In addition a number of the packages implement interfaces provided by CommandProcessor and depend specific NuGet packages for those implementations.

Brighter.CommandProcessor.MessageStore.RavenDB depends on

Brighter.CommandProcessor.MessageStore.MSSql depends on

Brighter.CommandProcessor.MessagingGateway.RMQ depends on

Brighter.CommandProcessor.MessagingGateway.RestMS depends on

Get the Library

The Brighter packages are available on NuGet by searching for Brighter

The following packages are currently available:

  • Brighter.CommandProcessor - the core library, provides a Command Dispatcher and Command Processor
  • Brighter.ServiceActivator - provides consumer support for deferring long-running work to a task/work queue The core library provides support for the producer
  • Brighter.MessagingGateway.RMQ - provides support for using RabbitMQ as a broker
  • Brighter.MessageStore.RavenDB - provides support for using RavenDB to replay messages sent to the broker
  • Brighter.MessageStore.MSSQL - provides support for using MSSql to replay messages sent to the broker

First Steps

First Steps provides a simple sample to handle a command message synchronously

Next Steps

Afterwards Next Steps looks at the examples provided and discusses event publishing, and asynchronous events via a Broker

Configuration

As ever with this kind of library, configuration is one of the most painful parts. We try to ease the pain through a fluent interface