Condense Light

Condense Light Condense.Light Condense Light is a runtime that is designed to be embedded in your web or desktop application. ´╗┐Everything in this document is based on an early preview of the Condense runtime. Prerequisites The Preview is available on Nuget. Condense.Core:, or Install-Package Condense.Core Condense.Light:, or Install-Package Condense.Light Couchbase Server (recommended): This can be installed locally, or remotely (eg: EC2 - with AMIs available).

Condense Technical Overview

Condense In Brief Condense is a reliable event driven architecture implementation, leveraging a durable persistence store, with flexible integration options. You provide an in-code description of your business data model and process in a regular .Net assembly project, referred to as your business domain. This domain assembly can then be hosted by a Runtime which fulfills the promises of the framework. This could be the in-process Condense Light framework, the SaaS Condense Cloud offering, or a private cluster.

Development Server

´╗┐Everything in this document is based on an early preview of the Condense runtime. This preview is not publicly available. Your Project Checklist Reference Condense.Core. Create your entities as POCO object. Decorate them with the Entity attribute. Create your lambda methods, either on domain objects, or on service classes. Decorate these with the Lambda attribute. If on a service type, be sure to set the ContextType, you generally care that inputs have some sort of shared lineage.

Entity, Context, and IUnitOfWork

Entity In the Condense Framework, an Entity is a persisted atomic snapshot of your business information. In code it is represented by a plain C# class definition, decorated with the [Condense.Core.Entity] attribute. The creation of an entity (or new revision) is an event, which may trigger lamdba methods in your domain. Identifiers Entity identifiers are automatically generated and managed by the framework. The identifier is what makes the entity unique - in addition to it’s type.


Scope of problem Unlike the simple examples, the Condense framework is aimed at more complex domain models that change over time and may contain multiple code-versions of business logic. The event-based nature also means that from a given perspective, eg a user interface, a portion of the domain is irrelevant or out of scope. For example; Additional processing that continues after a relevant result is achieved. After a successful payment in a web application, the various pieces of the shipment process are orchestrated for back office systems.

Lambda Execution

Lambda Definition In the Condense framework, a lambda is a method executed in response to one or more events. This method is a declared in a domain assembly, and marked with the Condense.Core.Lambda attribute. Further information can be declared using the properties on this attribute, as well as per-input attributes on parameters (Condense.Core.Param). This rather long document describes the steps that the Condense runtime performs. It describes when your method is executed, how it fills the parameters, and importantly how you can control this.

Simple Example 1

For a very brief intro to Condense, we’ll start with the classic “Hello world”. Our system will take a name, and then provide a greeting as a response. We start by defining entities to represent this data. The Entity attribute marks them as a type of interest to Condense, and allows various behaviours to be configured. On GuestArrival, we wish to create a Greeting in response. Converting this requirement into a method is simple.

Simple Example 2

Following from our Simple 1 example, we will make a couple of changes to demonstrate how service calls into the runtime are decoupled from the business logic. Referring to the service contract: On GuestArrival, we will now emit a GreetingRequest. We will respond to this request with a Greeting. After this Greeting we will also arrange a coffee order for the person. New entities are required: The business logic is then updated to look like this:

Simple Example 3

For this example, we will scrap the pointless GreetingRequest, and mockup a scheduler for our guests to demonstrate the very important concepts of context and lineage. Context is how the Condense framework selects specific business entities from scant details - such as only their type eg: IUnitOfWork.Get<T>(). The full file for this example is here: This example turned from a step-by-step into a description of core concepts and probably needs to be cleaned up!

Simple Example 4

Part 4 placeholder.