Getting Started with Trollr.Net

These are the instructions to get you up and running with As you can see from the example on the home page there isn't a huge impact on the client codebase required to support trollr. As utilises another of my open source projects to provide the service infrastructure the bulk of the instructions are to do with setting this up.

PLEASE READ utilises the capability of the Castle/Windsor IoC container in order to work. So in order for you to use to manage your configuration your application must use Castle/Windsor for DI/IoC - if it doesn't then cannot be used. Now the good news! The important aspect that leverages from Castle/Windsor is interception - any IoC container that has equivalent functionality can be used. is designed to allow other IoC containers to be plugged in - it initially ships with a Castle/Windsor adapter but I'm sure in time other container wrappers will be implemented. also uses MonitorWang to provide the windows service infrastructure. You will need to download and install MonitorWang to get the trollr central configuration and control service up and running.
  1. Download the latest MonitorWang binary release v1.0.7.0 (or above).
    1. Refer to the MonitorWang getting started guide to install it
    2. Edit the data.connection.config file in the MonitorWang Config folder - edit the "trollr" connection string to point to a sqlserver instance (currently trollr only supports sql server for the configuration store).
  2. Download the latest release.
  3. Build the trollr solution and from the Trollr.Contrib.MonitorWang\bin\debug folder...
    1. Copy the Trollr.Contrib.MonitorWang.dll file to the MonitorWang installation folder.
    2. Copy the Trollr.Core.Services.dll file to the MonitorWang installation folder.
  4. Copy the trollr.castle.config file to the MonitorWang Config folder.
  5. Start MonitorWang (start the windows service if you installed it as a service or just run the .exe (as a console app) if you don't want to install it.
    1. Two new tables will be created in your Trollr database - ConfigurationStore and Subscriptions. The ConfigurationStore table will have two rows added to it - these are required by the sample apps (but can be deleted once you start using trollr).
    2. The task to monitor the central configuration store will start - the ConfigurationStore is checked for changes every 5 seconds.
  6. Two sample trollr client projects are included in the solution, a console app and an ASP.Net website.
    1. Run the console app (Trollr.Console.exe) in the Trollr.Console\bin\debug folder. This continuously calls a business component and outputs the trollr controlled property values.
    2. Run the ASP.Net website (Set as startup project then F5, this is the easiest way to spin it up). The webpage auto refreshes every 10 seconds and displays the trollr controlled property values.
  7. The Subscriptions table in the Trollr database should have two rows in it, one for each sample application.
  8. Change a value in the Trollr database, ConfigurationStore table, Value column.
    1. Update the LastModifiedOnUtc column to a datetime just ahead of now (this ensures the change is picked up)
    2. This new value will be published (pushed) to both sample subscribers (console & website)
    3. The console will print out the value
    4. The webpage will display the new value when it next automatically refreshes.

Last edited Feb 9, 2011 at 7:42 PM by jimbobdog, version 9


No comments yet.