REQUEST A DEMO

Tag: Kevin Miller

Clock – A Super Simple Carrier Extension

December 16, 2009 Let’s set aside TwitterAgent for a bit and create the simplest extension to Dovetail Carrier possible, a timepiece, a clock, a chronometer of sorts. The intent of this post is to document in one place all the pieces required to create a Carrier Extension.The MarkerFor now we need to mark the assembly with an attribute announcing it as a Carrier extension. [assembly: CarrierExtension]You just need to put this code somewhere but it usually goes in your AssemblyInfo.cs file.The MessageWe first need to create the message we’ll be publishing and consuming. public class ClockMessage { public string Announcement { get; set; } }The PublisherNext up we need to create a service which will publish these messages. public class ClockMessageService : IMessagePublishingService<ClockMessage> { private readonly MessageBusSettings _messageBusSettings; private readonly IEndpointFactory _endpointFactory; private readonly ILogger _logger; private Timer _timer; public ClockMessageService(MessageBusSettings messageBusSettings, IEndpointFactory…

Customizing Dovetail Carrier – Consuming Messages With Rule Sets

December 10, 2009 The next step in our plan to implement a Twitter version of Email Agent using Dovetail Carrier is to consume the direct messages coming from Twitter which we published last time. Message consumers basically…er, well they consume messages. The beauty of the message bus is that we have the ability to subscribe many consumers to the types of messages which we publish. Dovetail Carrier provides a way to compose your message consumers by assembling a set of conditions and actions called RuleSets.This RuleSet we’ll be examining will investigate an incoming tweet, find the case id (731), and log a note the case.A Note before I continue: we will be including the Twitter Agent code with future releases of Dovetail Carrier. Additionally, with each release of Carrier you get a lot more extension code examples as we include the source code…

Customizing Dovetail Carrier – Creating and Publishing Messages

December 7, 2009 Previously we made a plan to go get Twitter direct messages and publish them into the Dovetail Carrier message bus. Thankfully the Twitter API is pretty simple but there are a few things to worry about.We need to listen to Twitter for direct messages.Transforming and publishing the direct message into the message bus.Host your Twitter polling and publishing service with Carrier.First Things FirstThis is not a cookbook post. I don’t describe each step along the way that I took to create a Carrier Twitter extension. That said I hope to provide the Visual Studio solution and code for this example in a future version of Carrier.A general house keeping item. To start I created a new project solution called Carrier.Extension.Twitter and added references to Carrier.Core and Dovetail.Commons.Carrier Extension AttributeFor now we need a way to tell Carrier that your assembly…

Customizing Dovetail Carrier – Making A Plan

December 4, 2009 Dovetail Carrier facilitates the creation of an enterprise message bus where messages can be produced and more importantly consumed. We have included a framework for creating sets of rules that act as consumers of messages coming into the system. I will be doing a series of posts around creating custom extensions for Carrier. The goal of these posts is to educate you and to force me to shine a light on the Carrier customization story in order find the rough edges begging to be smoothed out. Here is what we are going to cover. Making A Plan (you are here) Creating and Publishing Messages Consuming messages with RuleSets Whatever Shall We Do? To make all this a little more bearable. Let’s set the stage by creating a goal to shoot for while learning how to customize Carrier. This will all…

Thank You Mass Transit Team

December 1, 2009 I just wanted to extend a thank you from Dovetail and myself to the Mass Transit project team of Chris Patterson and Dru Sellers for the great framework they put together and the excellent attention and support that they give to the community of users around the project. A few weeks ago we went live at a customer site with a product that uses Mass Transit and so far things are going very well.

Adding a Custom Dialog To Your Wix Installer

November 4, 2009   Recently I made the move to Wix3 for a couple of projects and I have been quite happy. One of the things that has been simplified is adding a a custom step into the installer process.   I’ll leave the heavy lifting of how to insert the custom dialog to Jan Schepens’ post Making a custom setup dialog using WiX 3.0. He tells you how to customize your UI layout and insert a new dialog into the process. Read this post it explains it well. Neil Sleightholm has a similar post Customised UI’s For Wix that is about removing dialogs from the layout.   I’m going to be straight with you. This post is mainly for myself. I want to have this resource six months from now when I need to do the same thing again. Wiring Up Your…

Simplification

November 3, 2009 Just replaced this VB (shudder) code ' Build up additional info string using ' research time as formatted string addnl_info = "Elapsed time = " t_long = research_time If t_long > 86400 Then t_long2 = t_long 86400 Else t_long2 = 0 End If t_long = t_long - t_long2 * 86400 addnl_info = addnl_info & VB6.Format(t_long2, "000") & " " If t_long > 3600 Then t_long2 = t_long 3600 Else t_long2 = 0 End If t_long = t_long - t_long2 * 3600 addnl_info = addnl_info & VB6.Format(t_long2, "00") & ":" If t_long > 60 Then t_long2 = t_long 60 Else t_long2 = 0 End If t_long = t_long - t_long2 * 60 addnl_info = addnl_info & VB6.Format(t_long2, "00") & "." With this VB (shudder) code: addnl_info = "Elapsed time = " & GetElapsedTime(research_time) & "." ... Private Function GetElapsedTime(ByVal researchTimeInSeconds As…

What Is Under The Hood In Dovetail Mobile?

October 13, 2009 Dovetail Mobile is our first shipping ASP.NET MVC based application. Because this is a newer technology one of our customers asked for some guidance on customizing the application. The following is a distillation of that guidance which I hope might come in handy for future Mobile customers. Customizing Dovetail Mobile (Agent Lite) Dovetail Mobile and its desktop skinned alter ego Agent Lite is a ASP.Net MVC 1.0 application. There are lots of reading and tutorial resources available that will translate directly to understanding how this type of application works and thus how to customize Dovetail Mobile. It is important to understand Model View Controller based web applications to know where the part you wish to change is most likely found. Controllers If you need to customize behavior you will likely need to add or modify controllers and their related views.…

Running Multiple Instances of a Windows Service Using TopShelf

September 24, 2009 Here is another one where I post about something Josh and team did that I borrowed and am using to great effect. When a console app or a windows service needed we like to use TopShelf to get the job done. In this post I’ll show how to get two instances of a Windows service running on one machine using TopShelf. Updated: As Mike points out in the comments below as of revision 46 Dru added a command line parameter to handle this scenario. Great! Much better than our hacky solution below (written before this revision). Please skip this post and just add a service install /instance:<name> argument at the command line to install additional windows services. Here is an example: YourApplication.exe service install /instance:NumeroDos Now back to the original post which should be ignored so stop reading now <grin>.…

Extension Methods I Use A Lot

September 23, 2009 C# extensions have been around for some time and it was a fad for a while to post your favorites. I am following way behind the extension party bus with this post of my favorite extensions. Most of these are poached from Chad and Jeremy and Josh with a few sadly only one of my own mixed in. Below is the Basic Extensions class that is common to a lot of our Dovetail projects. I am not a big believer in class libraries for simple little things like these as extensions that are useful on one project will be useless on another. using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Web.Script.Serialization; namespace Dovetail.Commons { public static class BasicExtensions { /// <summary> /// Write string to the console. /// </summary> public static void WriteToConsole(this string stringValue) { Console.WriteLine(stringValue); } ///…